]> git.apps.os.sepia.ceph.com Git - autobuild-ceph.git/commitdiff
setsid ./loop.sh to not be killed when sudo exits
authorLoic Dachary <ldachary@redhat.com>
Fri, 6 Mar 2015 10:30:29 +0000 (11:30 +0100)
committerLoic Dachary <ldachary@redhat.com>
Fri, 6 Mar 2015 10:35:35 +0000 (11:35 +0100)
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>
autobuild-ceph.init

index cfae2effd435d22862afe7d957975c6fe6bddac5..14913292d0cc392dcb584e003b19fbf34a7203de 100755 (executable)
@@ -13,7 +13,7 @@ case $1 in
         start)
                 pgrep loop.sh && exit 0
                 cd /srv/autobuild-ceph
-                ./loop.sh &
+                setsid ./loop.sh &
                 ;;
         stop)
                 killall -g loop.sh