From 39b6210657613de53a2abb48f866b8d75fda7c2b Mon Sep 17 00:00:00 2001 From: Jan Losinski Date: Sat, 6 Sep 2014 19:33:30 +0200 Subject: [PATCH] Bugfixes (cherry picked from commit 87f430d9a3d60c9d7c4cb93cb6e63186f5c01a8f) --- debian/init.d | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/debian/init.d b/debian/init.d index fceb2b0..3c3f18c 100644 --- a/debian/init.d +++ b/debian/init.d @@ -25,30 +25,24 @@ set -e case "$1" in start) echo -n "Starting $DESC: " - start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ - --exec $DAEMON -- $DAEMON_OPTS + start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid --chuid xerxes -b --exec $DAEMON -- $DAEMON_OPTS echo "$NAME." ;; stop) echo -n "Stopping $DESC: " - start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ - --exec $DAEMON + start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid --exec $DAEMON echo "$NAME." ;; force-reload) # check wether $DAEMON is running. If so, restart - start-stop-daemon --stop --test --quiet --pidfile \ - /var/run/$NAME.pid --exec $DAEMON \ - && $0 restart \ + start-stop-daemon --stop --test --quiet --pidfile /var/run/$NAME.pid --exec $DAEMON && $0 restart \ || exit 0 ;; restart) echo -n "Restarting $DESC: " - start-stop-daemon --stop --quiet --pidfile \ - /var/run/$NAME.pid --exec $DAEMON + start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid --exec $DAEMON sleep 1 - start-stop-daemon --start --quiet --pidfile \ - /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS + start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid --chuid xerxes -b --exec $DAEMON -- $DAEMON_OPTS echo "$NAME." ;; *)