1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-26 23:52:33 +00:00
nixpkgs/pkgs/os-specific/linux/upstart/jobcontrol.nix
Michael Raskin c2c528b6fa Added PostgreSQL job.
svn path=/nixpkgs/trunk/; revision=9831
2007-12-03 04:48:44 +00:00

16 lines
413 B
Nix

args: with args;
stdenv.mkDerivation {
name = "upstart-jobcontrol";
buildCommand = "
mkdir -p \$out/bin
echo '
file=/etc/event.d/\$1
shift
controlscript=\$(egrep exec\\|respawn \$file | tail | sed -e s/^\\\\s\\\\+//g | sed -e s/\\\\s\\\\+/\\ /g | cut -f 2 -d \\ )
echo Running \$controlscript \"\$@\"
\$controlscript \"\$@\"
' >\$out/bin/jobcontrol
chmod a+x \$out/bin/jobcontrol
";
}