Fix logrotate on Debian

Since we're creating logs as `root:dokku`, the logrotate configuration
needs an `su root dokku` line, just like `su syslog dokku` on ubuntu.
This commit is contained in:
Dan Callahan
2017-03-22 08:36:27 -05:00
parent 4e6a699140
commit 85f4023965

View File

@@ -59,7 +59,7 @@ $DOKKU_LOGS_DIR/*.log {
EOF
if [[ "$DOKKU_DISTRO" = "debian" ]]; then
sed -i '/\s*su syslog dokku/d; s/\(create [0-7][0-7][0-7]\) syslog dokku/\1 root dokku/g' $DOKKU_LOGROTATE_FILE
sed -i 's/ syslog dokku$/root dokku/g' $DOKKU_LOGROTATE_FILE
fi
flag_rsyslog_needs_restart=y