1
0
mirror of https://github.com/pi-hole/pi-hole synced 2025-01-10 16:10:56 +00:00

Add debug timeoute

This commit is contained in:
Dan Schaper 2016-11-17 10:58:58 -08:00
parent a95ce11ca6
commit 6d2c5b2312

View File

@ -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 TIMEOUT=15
# Header info and introduction # Header info and introduction
cat << EOM cat << EOM
::: Beginning Pi-hole debug at $(date)! ::: Beginning Pi-hole debug at $(date)!
@ -358,9 +358,7 @@ dumpPiHoleLog() {
if [ -e "${PIHOLELOG}" ]; then if [ -e "${PIHOLELOG}" ]; then
# Dummy process to use for flagging down tail to terminate # Dummy process to use for flagging down tail to terminate
sleep ${TIMEOUT} & sleep ${TIMEOUT} &
while true; do tail -n0 -f --pid=$! "${PIHOLELOG}" >> ${DEBUG_LOG}
tail -n0 -f --pid=$! "${PIHOLELOG}" >> ${DEBUG_LOG}
done
else else
log_write "No pihole.log file found!" log_write "No pihole.log file found!"
printf ":::\tNo pihole.log file found!\n" printf ":::\tNo pihole.log file found!\n"