0
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2025-01-20 22:52:58 -05:00

Fix linux-sysvinit script to prevent missing caddy.log

Create /var/log/caddy.log and chown prior to starting caddy.
Caddy running as DAEMONUSER does not have permission to create the /var/log/caddy.log.
This commit is contained in:
Tim Lewis 2017-09-18 17:48:28 -04:00
parent a808252079
commit fea8f37f9d

View file

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