Commit 0a624f87 authored by Daniel van Dorp's avatar Daniel van Dorp Committed by GitHub

Merge pull request #1884 from timothywlewis/fix-pid-error-in-linux-sysvinit

Fix pid error in linux sysvinit
parents 93bcca0c fea8f37f
......@@ -20,7 +20,7 @@ DAEMONUSER=www-data
PIDFILE=/var/run/$NAME.pid
LOGFILE=/var/log/$NAME.log
CONFIGFILE=/etc/caddy/Caddyfile
DAEMONOPTS="-agree=true -pidfile=$PIDFILE -log=$LOGFILE -conf=$CONFIGFILE"
DAEMONOPTS="-agree=true -log=$LOGFILE -conf=$CONFIGFILE"
USERBIND="setcap cap_net_bind_service=+ep"
STOP_SCHEDULE="${STOP_SCHEDULE:-QUIT/5/TERM/5/KILL/5}"
......@@ -36,6 +36,7 @@ ulimit -n 8192
start() {
$USERBIND $DAEMON
touch $LOGFILE && chown $DAEMONUSER $LOGFILE
start-stop-daemon --start --quiet --make-pidfile --pidfile $PIDFILE \
--background --chuid $DAEMONUSER --oknodo --exec $DAEMON -- $DAEMONOPTS
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment