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:
parent
81a3101efe
commit
f3a3bf6204
1 changed files with 4 additions and 3 deletions
7
dist/init/linux-sysvinit/caddy
vendored
7
dist/init/linux-sysvinit/caddy
vendored
|
@ -37,12 +37,13 @@ ulimit -n 8192
|
||||||
start() {
|
start() {
|
||||||
$USERBIND $DAEMON
|
$USERBIND $DAEMON
|
||||||
start-stop-daemon --start --quiet --make-pidfile --pidfile $PIDFILE \
|
start-stop-daemon --start --quiet --make-pidfile --pidfile $PIDFILE \
|
||||||
--background --chuid $DAEMONUSER --exec $DAEMON -- $DAEMONOPTS
|
--background --chuid $DAEMONUSER --oknodo --exec $DAEMON -- $DAEMONOPTS
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
start-stop-daemon --stop --quiet --remove-pidfile --pidfile $PIDFILE \
|
start-stop-daemon --stop --quiet --pidfile $PIDFILE --retry=$STOP_SCHEDULE \
|
||||||
--retry=$STOP_SCHEDULE --name $NAME --oknodo
|
--name $NAME --oknodo
|
||||||
|
rm -f $PIDFILE
|
||||||
}
|
}
|
||||||
|
|
||||||
reload() {
|
reload() {
|
||||||
|
|
Loading…
Reference in a new issue