Change how user and group are stored in the logrotate config file (necessary on Ubuntu 16.04.1)

pull/1195/head
DL6ER 7 years ago
parent 55d39595e1
commit 8b22f435ad
No known key found for this signature in database
GPG Key ID: 00135ACBD90B28DD

@ -1,4 +1,5 @@
/var/log/pihole.log {
# su #
daily
copytruncate
rotate 5

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

Loading…
Cancel
Save