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
|
notifempty
|
||||||
nomail
|
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
|
# the local properties of the /var/log directory
|
||||||
logusergroup="$(stat -c '%U %G' /var/log)"
|
logusergroup="$(stat -c '%U %G' /var/log)"
|
||||||
if [[ ! -z $logusergroup ]]; then
|
if [[ ! -z $logusergroup ]]; then
|
||||||
sed -i "s/# su #/su ${logusergroup}/" /etc/pihole/logrotate
|
sed -i "s/# su #/su ${logusergroup}/g;" /etc/pihole/logrotate
|
||||||
fi
|
fi
|
||||||
echo " done!"
|
echo " done!"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user