diff --git a/contrib/initscripts/debian-upstart.init b/contrib/initscripts/debian-upstart.init index e4b51bc7..f48ad757 100644 --- a/contrib/initscripts/debian-upstart.init +++ b/contrib/initscripts/debian-upstart.init @@ -36,7 +36,7 @@ do_start_daemon() { # (warning about -m and -p only deepest - we use -p to ignore if already exists) # shellcheck disable=SC2174 mkdir -m 0700 -p /var/run/log-courier - chown "${LOG_COURIER_USER}:${LOG_COURIER_GROUP}" /var/run/log-courier + chown -R "${LOG_COURIER_USER}:${LOG_COURIER_GROUP}" /var/run/log-courier start-stop-daemon --start --quiet --pidfile "$PIDFILE" --user "${LOG_COURIER_USER}" --chuid "${LOG_COURIER_USER}:${LOG_COURIER_GROUP}" --exec /bin/sh --test > /dev/null || return 1 start-stop-daemon --start --quiet --make-pidfile --background --pidfile "$PIDFILE" --user "${LOG_COURIER_USER}" --chuid "${LOG_COURIER_USER}:${LOG_COURIER_GROUP}" --exec "$DAEMON" -- $LOG_COURIER_ARGS || return 2 diff --git a/contrib/initscripts/log-courier-systemd.env b/contrib/initscripts/log-courier-systemd.env index a65e8487..cc9949a8 100644 --- a/contrib/initscripts/log-courier-systemd.env +++ b/contrib/initscripts/log-courier-systemd.env @@ -1,6 +1,8 @@ ## User # To change the user or group that log-courier runs as, modify the systemd unit # file. This is usually found at /usr/lib/systemd/system/log-courier.service. +# Remember to update the ownership of /var/lib/log-courier to the new user and +# group. ## Command line arguments # See: https://github.com/driskell/log-courier/blob/master/docs/CommandLineArguments.md diff --git a/contrib/initscripts/log-courier.env b/contrib/initscripts/log-courier.env index 18038b9c..55032a4b 100644 --- a/contrib/initscripts/log-courier.env +++ b/contrib/initscripts/log-courier.env @@ -1,7 +1,8 @@ ## User # Set the user to run log-courier as. Be sure to stop the service cleanly before # changing these values, as the service stop only looks for processes matching -# these values +# these values. Remember to update the ownership of /var/lib/log-courier to the +# new user and group. LOG_COURIER_USER="log-courier" LOG_COURIER_GROUP="log-courier"