1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-15 00:54:46 +00:00
nixpkgs/tests/test-upstart-job.sh
Eelco Dolstra c373ac846d * Update test-upstart-job.sh for Upstart 0.6.
svn path=/nixos/trunk/; revision=19939
2010-02-11 16:14:47 +00:00

21 lines
459 B
Bash
Executable file

#! /bin/sh -e
for i in $*; do
echo "building job $i..."
nix-build /etc/nixos/nixos -A "config.jobs.$i" -o $tmpDir/.result
# !!! Here we assume that the attribute name equals the Upstart
# job name.
ln -sfn $(readlink -f $tmpDir/.result) /etc/init/"$i".conf
done
echo "restarting init..."
initctl reload-configuration
sleep 1
for i in $*; do
echo "restarting job $i..."
initctl stop "$i" || true
initctl start "$i"
done