mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
Correctly set syslog user as owner on dokku logs for non-debian systems
On debian, rsyslog runs as root, so we don't want to force the non-existent syslog owner. Fix syntax error
This commit is contained in:
@@ -10,11 +10,26 @@ flag_rsyslog_needs_restart=n
|
||||
# This can be done unconditionally as mkdir -p
|
||||
# exits gracefully if the path already exists
|
||||
mkdir -m 775 -p "$DOKKU_LOGS_DIR"
|
||||
chgrp dokku "$DOKKU_LOGS_DIR"
|
||||
case "$DOKKU_DISTRO" in
|
||||
debian)
|
||||
chgrp dokku "$DOKKU_LOGS_DIR"
|
||||
;;
|
||||
*)
|
||||
chown syslog:dokku "$DOKKU_LOGS_DIR"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ ! -f "$DOKKU_EVENTS_LOGFILE" ]]; then
|
||||
touch "$DOKKU_EVENTS_LOGFILE"
|
||||
chgrp dokku "$DOKKU_EVENTS_LOGFILE"
|
||||
case "$DOKKU_DISTRO" in
|
||||
debian)
|
||||
chgrp dokku "$DOKKU_EVENTS_LOGFILE"
|
||||
;;
|
||||
*)
|
||||
# chown syslog:root might not work on SUSE
|
||||
chown syslog:dokku "$DOKKU_EVENTS_LOGFILE"
|
||||
;;
|
||||
esac
|
||||
chmod 664 "$DOKKU_EVENTS_LOGFILE"
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user