From 3792f4af2dc138f1f70c654129ddcdb8c71a7d46 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Wed, 7 Nov 2007 18:11:45 +0000 Subject: [PATCH] * if citadel doesn't come down by sendcommand in 10 seconds, send it a TERM, after another 10 seconds be rude and send it KILL --- citadel/debian/citadel.init | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/citadel/debian/citadel.init b/citadel/debian/citadel.init index 37f98d4c3..20f948881 100644 --- a/citadel/debian/citadel.init +++ b/citadel/debian/citadel.init @@ -74,10 +74,18 @@ do_stop() # other if a failure occurred if $SENDCOMMAND "DOWN" >/dev/null 2>&1 ; then rm -f $PIDFILE - + count=1; while test -S /var/run/citadel/citadel.socket; do + count=$(($count+1)) sleep 1 echo -n "." + if test "$count" == "10"; then + killall citserver + fi + if test "$count" == "20"; then + killall -9 citserver + rm -rf /var/run/citadel/* + fi done return 0 else -- 2.30.2