From f3a3bf6204841cb803f44e9a882796c7203946b8 Mon Sep 17 00:00:00 2001 From: Daniel van Dorp Date: Fri, 5 Aug 2016 16:15:32 +0200 Subject: [PATCH] dist/init/linux-sysvinit: improve legacy compatibility (#1002) * dist/init/linux-sysvinit: pass --oknodo for --start as well * dist/init/linux-sysvinit: manually rm PIDFILE Since start-stop-daemon --remove-pidfile is new and not present everywhere. --- dist/init/linux-sysvinit/caddy | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dist/init/linux-sysvinit/caddy b/dist/init/linux-sysvinit/caddy index 12b03155..52d89acf 100644 --- a/dist/init/linux-sysvinit/caddy +++ b/dist/init/linux-sysvinit/caddy @@ -37,12 +37,13 @@ ulimit -n 8192 start() { $USERBIND $DAEMON start-stop-daemon --start --quiet --make-pidfile --pidfile $PIDFILE \ - --background --chuid $DAEMONUSER --exec $DAEMON -- $DAEMONOPTS + --background --chuid $DAEMONUSER --oknodo --exec $DAEMON -- $DAEMONOPTS } stop() { - start-stop-daemon --stop --quiet --remove-pidfile --pidfile $PIDFILE \ - --retry=$STOP_SCHEDULE --name $NAME --oknodo + start-stop-daemon --stop --quiet --pidfile $PIDFILE --retry=$STOP_SCHEDULE \ + --name $NAME --oknodo + rm -f $PIDFILE } reload() {