From: Loic Dachary Date: Fri, 6 Mar 2015 10:30:29 +0000 (+0100) Subject: setsid ./loop.sh to not be killed when sudo exits X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=cf06f0a2cee7d70bac0ef381db31eed715e38a52;p=autobuild-ceph.git setsid ./loop.sh to not be killed when sudo exits 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 --- diff --git a/autobuild-ceph.init b/autobuild-ceph.init index cfae2ef..1491329 100755 --- a/autobuild-ceph.init +++ b/autobuild-ceph.init @@ -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