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!" }