From cf06f0a2cee7d70bac0ef381db31eed715e38a52 Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Fri, 6 Mar 2015 11:30:29 +0100 Subject: [PATCH] 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 --- autobuild-ceph.init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.5