1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-12-22 14:58:08 +00:00

Merge pull request #1195 from pi-hole/fix/logrotate

Change how user and group are stored in the logrotate config file
This commit is contained in:
DL6ER 2017-01-29 21:35:31 +01:00 committed by GitHub
commit fddc515ee1
2 changed files with 2 additions and 1 deletions

View File

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

View File

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