The sudo() of fabric will kill the process group to cleanup any
leftovers. If the loop.sh daemon does not create a process group it is
also killed. This is not an issue when start/stop is used because a
process group is created implicitly. But when /etc/init.d/autobuild-ceph
is run instead because start/stop does not work, the process group must
be explicitly created.
Signed-off-by: Loic Dachary <loic@dachary.org>
start)
pgrep loop.sh && exit 0
cd /srv/autobuild-ceph
- ./loop.sh &
+ setsid ./loop.sh &
;;
stop)
killall -g loop.sh