Create dokku's /var/log/dokku/ private namespace

Rename dokku.log to events.log.
Refresh tests accordingly.
This commit is contained in:
Alessio Treglia
2015-07-01 18:25:11 +01:00
parent 172e71cac6
commit 91c691a806
3 changed files with 13 additions and 3 deletions

View File

@@ -7,6 +7,11 @@ DOKKU_LOGROTATE_FILE=/etc/logrotate.d/dokku
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"
chown syslog:dokku "$DOKKU_LOGS_DIR"
if [[ ! -f "$DOKKU_EVENTS_LOGFILE" ]]; then
touch "$DOKKU_EVENTS_LOGFILE"
# chown syslog:root might not work on SUSE
@@ -23,7 +28,7 @@ fi
if [[ ! -f "$DOKKU_LOGROTATE_FILE" ]]; then
cat >"$DOKKU_LOGROTATE_FILE" <<EOF
$DOKKU_EVENTS_LOGFILE {
$DOKKU_LOGS_DIR/*.log {
daily
rotate 7
missingok