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

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

Fix pid error in linux sysvinit
This commit is contained in:
Daniel van Dorp 2017-09-22 16:45:55 +02:00 committed by GitHub
commit 0a624f87ff

View file

@ -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
}