mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-21 22:38:08 +00:00
Add weekly logrotation of FTL's log (#1509)
This commit is contained in:
parent
01e091fd17
commit
8ef64dbe74
@ -8,3 +8,14 @@
|
||||
notifempty
|
||||
nomail
|
||||
}
|
||||
|
||||
/var/log/pihole-FTL.log {
|
||||
# su #
|
||||
weekly
|
||||
copytruncate
|
||||
rotate 3
|
||||
compress
|
||||
delaycompress
|
||||
notifempty
|
||||
nomail
|
||||
}
|
||||
|
@ -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!"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user