change to bindsnap, since daemon forks after starting, which makes start-stop-daemon trouble
This commit is contained in:
parent
6d03565698
commit
7aeb729dc7
13
debian/init.d
vendored
13
debian/init.d
vendored
|
@ -33,23 +33,20 @@ set -e
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
echo -n "Starting $DESC: "
|
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
|
--exec $DAEMON -- $DAEMON_OPTS
|
||||||
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
|
||||||
ps aux | grep $NAME | awk '{ print $2 }' | xargs kill -9
|
|
||||||
echo "$NAME."
|
echo "$NAME."
|
||||||
;;
|
;;
|
||||||
restart|force-reload)
|
restart|force-reload)
|
||||||
echo -n "Restarting $DESC: "
|
echo -n "Restarting $DESC: "
|
||||||
#start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
|
start-stop-daemon --stop --quiet --make-pidfile --background --pidfile /var/run/$NAME.pid \
|
||||||
# --exec $DAEMON
|
--exec $DAEMON
|
||||||
ps aux | grep $NAME | awk '{ print $2 }' | xargs kill -9
|
|
||||||
sleep 1
|
|
||||||
start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
|
start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
|
||||||
--exec $DAEMON -- $DAEMON_OPTS
|
--exec $DAEMON -- $DAEMON_OPTS
|
||||||
echo "$NAME."
|
echo "$NAME."
|
||||||
|
|
Loading…
Reference in a new issue