0
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-23 22:27:38 -05:00

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.
This commit is contained in:
Daniel van Dorp 2016-08-05 16:15:32 +02:00 committed by Matt Holt
parent 81a3101efe
commit f3a3bf6204

View file

@ -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() {