mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 14:41:17 +00:00
c2c528b6fa
svn path=/nixpkgs/trunk/; revision=9831
16 lines
413 B
Nix
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
|
|
";
|
|
}
|