mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-23 07:40:15 +00:00
Add logrotate for pihole.log
This commit is contained in:
parent
10f77df8bb
commit
3fd2ffd466
3 changed files with 18 additions and 1 deletions
|
@ -11,5 +11,10 @@
|
|||
# (at your option) any later version.
|
||||
|
||||
echo -n "::: Flushing /var/log/pihole.log ..."
|
||||
echo " " > /var/log/pihole.log
|
||||
# Test if logrotate is available on this system
|
||||
if command -v /usr/sbin/logrotate &> /dev/null; then
|
||||
/usr/sbin/logrotate --force /etc/.pihole/logrotate
|
||||
else
|
||||
echo " " > /var/log/pihole.log
|
||||
fi
|
||||
echo "... done!"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue