Merge branch 'debian'
authorRuss Allbery <rra@debian.org>
Sun, 3 Jan 2010 08:17:18 +0000 (00:17 -0800)
committerRuss Allbery <rra@debian.org>
Sun, 3 Jan 2010 08:17:18 +0000 (00:17 -0800)
configs/shibd-debian.in
shibd/shibd.cpp

index 75c2fa2..a3c224b 100644 (file)
@@ -99,7 +99,7 @@ start)
 stop)
     echo -n "Stopping $DESC: "
     start-stop-daemon --stop --quiet --pidfile $PIDFILE \
-        --exec $DAEMON
+        --retry TERM/30/KILL/5 --exec $DAEMON
     echo "$NAME."
     ;;
 restart|force-reload)
@@ -107,8 +107,7 @@ restart|force-reload)
 
     echo -n "Restarting $DESC: "
     start-stop-daemon --stop --quiet --pidfile $PIDFILE \
-        --exec $DAEMON
-    sleep 1
+        --retry TERM/30/KILL/5 --exec $DAEMON
     start-stop-daemon --start --quiet ${DAEMON_USER:+--chuid $DAEMON_USER} \
         --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_OPTS
     echo "$NAME."
index 2ac256d..eee5c8b 100644 (file)
@@ -387,7 +387,7 @@ int main(int argc, char *argv[])
             fprintf(stderr, "listener failure during service\n");
             listener->term();
             conf.term();
-            if (pidfile)
+            if (daemonize && pidfile)
                 unlink(pidfile);
             return -3;
         }
@@ -395,7 +395,7 @@ int main(int argc, char *argv[])
     }
 
     conf.term();
-    if (pidfile)
+    if (daemonize && pidfile)
         unlink(pidfile);
     return 0;
 }