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:
commit
0a624f87ff
1 changed files with 2 additions and 1 deletions
3
dist/init/linux-sysvinit/caddy
vendored
3
dist/init/linux-sysvinit/caddy
vendored
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue