drop killall and ugly pidfile creation
This commit is contained in:
parent
22ab12dd8b
commit
a194005d4b
13
debian/init.d
vendored
13
debian/init.d
vendored
|
@ -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."
|
||||
;;
|
||||
*)
|
||||
|
|
Loading…
Reference in a new issue