mirror of
https://github.com/pi-hole/pi-hole
synced 2025-01-03 12:40:56 +00:00
Print echos only when manual flushing is requested
This commit is contained in:
parent
4e2c6a7b8e
commit
c9042ffedd
@ -8,7 +8,6 @@
|
|||||||
# This file is copyright under the latest version of the EUPL.
|
# This file is copyright under the latest version of the EUPL.
|
||||||
# Please see LICENSE file for your rights under this license.
|
# Please see LICENSE file for your rights under this license.
|
||||||
|
|
||||||
echo -n "::: Flushing /var/log/pihole.log ..."
|
|
||||||
if [[ "$@" == *"once"* ]]; then
|
if [[ "$@" == *"once"* ]]; then
|
||||||
# Nightly logrotation
|
# Nightly logrotation
|
||||||
if command -v /usr/sbin/logrotate >/dev/null; then
|
if command -v /usr/sbin/logrotate >/dev/null; then
|
||||||
@ -25,6 +24,7 @@ if [[ "$@" == *"once"* ]]; then
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# Manual flushing
|
# Manual flushing
|
||||||
|
echo -n "::: Flushing /var/log/pihole.log ..."
|
||||||
if command -v /usr/sbin/logrotate >/dev/null; then
|
if command -v /usr/sbin/logrotate >/dev/null; then
|
||||||
# Logrotate twice to move all data out of sight of FTL
|
# Logrotate twice to move all data out of sight of FTL
|
||||||
/usr/sbin/logrotate --force /etc/pihole/logrotate; sleep 3
|
/usr/sbin/logrotate --force /etc/pihole/logrotate; sleep 3
|
||||||
@ -36,5 +36,5 @@ else
|
|||||||
echo " " > /var/log/pihole.log.1
|
echo " " > /var/log/pihole.log.1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
echo "... done!"
|
||||||
fi
|
fi
|
||||||
echo "... done!"
|
|
||||||
|
Loading…
Reference in New Issue
Block a user