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)
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."
fprintf(stderr, "listener failure during service\n");
listener->term();
conf.term();
- if (pidfile)
+ if (daemonize && pidfile)
unlink(pidfile);
return -3;
}
}
conf.term();
- if (pidfile)
+ if (daemonize && pidfile)
unlink(pidfile);
return 0;
}