From 8b22f435adff664c1bc7361137a3bf0fe6f0c8bb Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sun, 29 Jan 2017 19:58:53 +0100 Subject: [PATCH] Change how user and group are stored in the logrotate config file (necessary on Ubuntu 16.04.1) --- advanced/logrotate | 1 + automated install/basic-install.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/advanced/logrotate b/advanced/logrotate index e9be016d..570e7548 100644 --- a/advanced/logrotate +++ b/advanced/logrotate @@ -1,4 +1,5 @@ /var/log/pihole.log { + # su # daily copytruncate rotate 5 diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 9fed0bca..94f26be9 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -949,7 +949,7 @@ installLogrotate() { # the local properties of the /var/log directory logusergroup="$(stat -c '%U %G' /var/log)" if [[ ! -z $logusergroup ]]; then - echo "su ${logusergroup}" >> /etc/pihole/logrotate + sed -i "s/# su #/su ${logusergroup}/" /etc/pihole/logrotate fi echo " done!" }