* if citadel doesn't come down by sendcommand in 10 seconds, send it a TERM, after...
authorWilfried Göesgens <willi@citadel.org>
Wed, 7 Nov 2007 18:11:45 +0000 (18:11 +0000)
committerWilfried Göesgens <willi@citadel.org>
Wed, 7 Nov 2007 18:11:45 +0000 (18:11 +0000)
citadel/debian/citadel.init

index 37f98d4c3696579ee4d106f832ec1ba0953d4178..20f94888185e36b62d016351ffa014c7c2b59d0f 100644 (file)
@@ -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