From 8ef64dbe7491c9028a45b14d415bcf86d6743bbf Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sat, 3 Jun 2017 14:51:35 +0200 Subject: [PATCH] Add weekly logrotation of FTL's log (#1509) --- advanced/logrotate | 11 +++++++++++ automated install/basic-install.sh | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/advanced/logrotate b/advanced/logrotate index 570e7548..ffed910b 100644 --- a/advanced/logrotate +++ b/advanced/logrotate @@ -8,3 +8,14 @@ notifempty nomail } + +/var/log/pihole-FTL.log { + # su # + weekly + copytruncate + rotate 3 + compress + delaycompress + notifempty + nomail +} diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index b8b44550..e8b28f62 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -1080,7 +1080,7 @@ installLogrotate() { # the local properties of the /var/log directory logusergroup="$(stat -c '%U %G' /var/log)" if [[ ! -z $logusergroup ]]; then - sed -i "s/# su #/su ${logusergroup}/" /etc/pihole/logrotate + sed -i "s/# su #/su ${logusergroup}/g;" /etc/pihole/logrotate fi echo " done!" }