From 7aeb729dc738de415c6925c0ab4493dfd1035820 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 4 Jul 2007 17:03:32 +0000 Subject: [PATCH] change to bindsnap, since daemon forks after starting, which makes start-stop-daemon trouble --- debian/init.d | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/debian/init.d b/debian/init.d index 202081c..6fde3bd 100644 --- a/debian/init.d +++ b/debian/init.d @@ -33,23 +33,20 @@ set -e case "$1" in start) echo -n "Starting $DESC: " - start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ + start-stop-daemon --start --quiet --make-pidfile --background --pidfile /var/run/$NAME.pid \ --exec $DAEMON -- $DAEMON_OPTS echo "$NAME." ;; stop) echo -n "Stopping $DESC: " - #start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ - # --exec $DAEMON - ps aux | grep $NAME | awk '{ print $2 }' | xargs kill -9 + start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ + --exec $DAEMON echo "$NAME." ;; restart|force-reload) echo -n "Restarting $DESC: " - #start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ - # --exec $DAEMON - ps aux | grep $NAME | awk '{ print $2 }' | xargs kill -9 - sleep 1 + start-stop-daemon --stop --quiet --make-pidfile --background --pidfile /var/run/$NAME.pid \ + --exec $DAEMON start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ --exec $DAEMON -- $DAEMON_OPTS echo "$NAME."