From fea8f37f9d649207612cf94033c7672d751a46b0 Mon Sep 17 00:00:00 2001 From: Tim Lewis Date: Mon, 18 Sep 2017 17:48:28 -0400 Subject: [PATCH] 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. --- dist/init/linux-sysvinit/caddy | 1 + 1 file changed, 1 insertion(+) diff --git a/dist/init/linux-sysvinit/caddy b/dist/init/linux-sysvinit/caddy index 3b5d0b12..88fc9639 100644 --- a/dist/init/linux-sysvinit/caddy +++ b/dist/init/linux-sysvinit/caddy @@ -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 }