mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 10:43:55 +00:00
Add debug timeoute
This commit is contained in:
parent
bd61f38169
commit
a95ce11ca6
1 changed files with 4 additions and 3 deletions
|
@ -27,7 +27,7 @@ PIHOLELOG="/var/log/pihole.log"
|
||||||
WHITELISTMATCHES="/tmp/whitelistmatches.list"
|
WHITELISTMATCHES="/tmp/whitelistmatches.list"
|
||||||
|
|
||||||
IPV6_READY=false
|
IPV6_READY=false
|
||||||
|
TIMEOUT=60
|
||||||
# Header info and introduction
|
# Header info and introduction
|
||||||
cat << EOM
|
cat << EOM
|
||||||
::: Beginning Pi-hole debug at $(date)!
|
::: Beginning Pi-hole debug at $(date)!
|
||||||
|
@ -356,9 +356,10 @@ dumpPiHoleLog() {
|
||||||
echo -e "::: Try loading a site that you are having trouble with now from a client web browser.. \n:::\t(Press CTRL+C to finish logging.)"
|
echo -e "::: Try loading a site that you are having trouble with now from a client web browser.. \n:::\t(Press CTRL+C to finish logging.)"
|
||||||
header_write "pihole.log"
|
header_write "pihole.log"
|
||||||
if [ -e "${PIHOLELOG}" ]; then
|
if [ -e "${PIHOLELOG}" ]; then
|
||||||
|
# Dummy process to use for flagging down tail to terminate
|
||||||
|
sleep ${TIMEOUT} &
|
||||||
while true; do
|
while true; do
|
||||||
tail -f "${PIHOLELOG}" >> ${DEBUG_LOG}
|
tail -n0 -f --pid=$! "${PIHOLELOG}" >> ${DEBUG_LOG}
|
||||||
log_write ""
|
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
log_write "No pihole.log file found!"
|
log_write "No pihole.log file found!"
|
||||||
|
|
Loading…
Reference in a new issue