mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-23 21:30:17 +00:00
Add weekly logrotation of FTL's log (#1509)
This commit is contained in:
parent
01e091fd17
commit
8ef64dbe74
2 changed files with 12 additions and 1 deletions
|
@ -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 a new issue