mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Merge pull request #2240 from pi-hole/tweak/warn_on_tail_if_log_disabled
pihole -t: Warn user if Pi-hole's logging is disabled
This commit is contained in:
commit
c2055f3514
1 changed files with 7 additions and 0 deletions
7
pihole
7
pihole
|
@ -312,6 +312,13 @@ statusFunc() {
|
||||||
}
|
}
|
||||||
|
|
||||||
tailFunc() {
|
tailFunc() {
|
||||||
|
# Warn user if Pi-hole's logging is disabled
|
||||||
|
local logging_enabled=$(grep -c "^log-queries" /etc/dnsmasq.d/01-pihole.conf)
|
||||||
|
if [[ "${logging_enabled}" == "0" ]]; then
|
||||||
|
# No "log-queries" lines are found.
|
||||||
|
# Commented out lines (such as "#log-queries") are ignored
|
||||||
|
echo " ${CROSS} Warning: Query logging is disabled"
|
||||||
|
fi
|
||||||
echo -e " ${INFO} Press Ctrl-C to exit"
|
echo -e " ${INFO} Press Ctrl-C to exit"
|
||||||
|
|
||||||
# Retrieve IPv4/6 addresses
|
# Retrieve IPv4/6 addresses
|
||||||
|
|
Loading…
Reference in a new issue