From a194005d4b9b2400c30231a58cef5cb8c66b9226 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 4 Jul 2007 19:47:44 +0000 Subject: [PATCH] drop killall and ugly pidfile creation --- debian/init.d | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/debian/init.d b/debian/init.d index 6767a8d..4feeaee 100644 --- a/debian/init.d +++ b/debian/init.d @@ -35,23 +35,22 @@ case "$1" in echo -n "Starting $DESC: " start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ --exec $DAEMON -- $DAEMON_OPTS + ps aux | grep $DAEMON | head -1 | awk '{ print $2 }' > /var/run/$NAME.pid echo "$NAME." ;; stop) echo -n "Stopping $DESC: " start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ --exec $DAEMON - killall -9 $NAME echo "$NAME." ;; restart|force-reload) echo -n "Restarting $DESC: " - start-stop-daemon --stop --quiet --pidfile \ - /var/run/$NAME.pid --exec $DAEMON - killall -9 $NAME - sleep 1 - start-stop-daemon --start --quiet --pidfile \ - /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS + start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ + --exec $DAEMON + start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ + --exec $DAEMON -- $DAEMON_OPTS + ps aux | grep $DAEMON | head -1 | awk '{ print $2 }' > /var/run/$NAME.pid echo "$NAME." ;; *)