From de102fde5c2007d9c6ca649394a62cea8b9558f7 Mon Sep 17 00:00:00 2001 From: Promofaux Date: Sun, 22 Jan 2017 20:38:09 +0000 Subject: [PATCH] Add line count and size check for pihole.log --- advanced/Scripts/piholeDebug.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/advanced/Scripts/piholeDebug.sh b/advanced/Scripts/piholeDebug.sh index 09d9a786..c961f103 100755 --- a/advanced/Scripts/piholeDebug.sh +++ b/advanced/Scripts/piholeDebug.sh @@ -365,6 +365,17 @@ header_write "Analyzing gravity.list" && log_write "${GRAVITYFILE} is ${gravity_length} lines long." \ || log_echo "Warning: No gravity.list file found!" +header_write "Analyzing pihole.log" + + pihole_length=$(wc -l "${PIHOLELOG}") \ + && log_write "${PIHOLELOG} is ${pihole_length} lines long." \ + || log_echo "Warning: No pihole.log file found!" + + pihole_size=$(du -h "${PIHOLELOG}") \ + && log_write "${PIHOLELOG} is ${pihole_length}." \ + || log_echo "Warning: No pihole.log file found!" + + # Continuously append the pihole.log file to the pihole_debug.log file dumpPiHoleLog() { trap '{ echo -e "\n::: Finishing debug write from interrupt... Quitting!" ; exit 1; }' INT