generate pidfile in some ugly way and drop use of killall

This commit is contained in:
Jan Wagner 2007-07-04 19:28:02 +00:00
parent 8c1a633017
commit 5360efdfa7

3
debian/init.d vendored
View file

@ -61,13 +61,13 @@ case "$1" in
echo -n "Starting $DESC: " echo -n "Starting $DESC: "
start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
--exec $DAEMON -- -c $CONFIG --daemon $DAEMON_OPTS --exec $DAEMON -- -c $CONFIG --daemon $DAEMON_OPTS
ps aux | grep $DAEMON | head -1 | awk '{ print $2 }' > /var/run/$NAME.pid
echo "$NAME." echo "$NAME."
;; ;;
stop) stop)
echo -n "Stopping $DESC: " echo -n "Stopping $DESC: "
#start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ #start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
# --exec $DAEMON # --exec $DAEMON
killall -9 $NAME
echo "$NAME." echo "$NAME."
;; ;;
restart|force-reload) restart|force-reload)
@ -77,6 +77,7 @@ case "$1" in
sleep 1 sleep 1
start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
--exec $DAEMON -- -c $CONFIG --daemon $DAEMON_OPTS --exec $DAEMON -- -c $CONFIG --daemon $DAEMON_OPTS
ps aux | grep $DAEMON | head -1 | awk '{ print $2 }' > /var/run/$NAME.pid
echo "$NAME." echo "$NAME."
;; ;;
*) *)