mirror of
https://github.com/pi-hole/pi-hole
synced 2025-01-03 04:30:55 +00:00
Only inform user about disabled logging, don't skipp printing pihole.log
Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
parent
f2cba6cad1
commit
1ae67e1de8
@ -1328,10 +1328,10 @@ analyze_pihole_log() {
|
|||||||
|
|
||||||
local logging_enabled=$(grep -c "^log-queries" /etc/dnsmasq.d/01-pihole.conf)
|
local logging_enabled=$(grep -c "^log-queries" /etc/dnsmasq.d/01-pihole.conf)
|
||||||
if [[ "${logging_enabled}" == "0" ]]; then
|
if [[ "${logging_enabled}" == "0" ]]; then
|
||||||
# No "log-queries" lines are found.
|
# Inform user that logging has been disabled and pihole.log does not contain queries
|
||||||
# Commented out lines (such as "#log-queries") are ignored
|
|
||||||
log_write "${INFO} Query logging is disabled"
|
log_write "${INFO} Query logging is disabled"
|
||||||
else
|
log_write ""
|
||||||
|
fi
|
||||||
# Put the current Internal Field Separator into another variable so it can be restored later
|
# Put the current Internal Field Separator into another variable so it can be restored later
|
||||||
OLD_IFS="$IFS"
|
OLD_IFS="$IFS"
|
||||||
# Get the lines that are in the file(s) and store them in an array for parsing later
|
# Get the lines that are in the file(s) and store them in an array for parsing later
|
||||||
@ -1348,7 +1348,6 @@ analyze_pihole_log() {
|
|||||||
log_write ""
|
log_write ""
|
||||||
# Set the IFS back to what it was
|
# Set the IFS back to what it was
|
||||||
IFS="$OLD_IFS"
|
IFS="$OLD_IFS"
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tricorder_use_nc_or_curl() {
|
tricorder_use_nc_or_curl() {
|
||||||
|
Loading…
Reference in New Issue
Block a user