From 9b060aab34c87193f837b206dfcd97db40917c17 Mon Sep 17 00:00:00 2001 From: Dan Schaper Date: Sun, 26 Feb 2017 18:22:06 -0800 Subject: [PATCH] Debug auto mode engaged Signed-off-by: Dan Schaper --- advanced/Scripts/piholeDebug.sh | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/advanced/Scripts/piholeDebug.sh b/advanced/Scripts/piholeDebug.sh index fae7c0b9..dc70a907 100755 --- a/advanced/Scripts/piholeDebug.sh +++ b/advanced/Scripts/piholeDebug.sh @@ -407,16 +407,19 @@ finalWork() { local tricorder echo "::: Finshed debugging!" echo "::: The debug log can be uploaded to tricorder.pi-hole.net for sharing with developers only." - read -r -p "::: Would you like to upload the log? [y/N] " response - case ${response} in - [yY][eE][sS]|[yY]) - tricorder=$(cat /var/log/pihole_debug.log | nc tricorder.pi-hole.net 9999) - ;; - *) - echo "::: Log will NOT be uploaded to tricorder." - ;; - esac - + if [[ "${AUTOMATED}" ]]; then + tricorder=$(cat /var/log/pihole_debug.log | nc tricorder.pi-hole.net 9999) + else + read -r -p "::: Would you like to upload the log? [y/N] " response + case ${response} in + [yY][eE][sS]|[yY]) + tricorder=$(cat /var/log/pihole_debug.log | nc tricorder.pi-hole.net 9999) + ;; + *) + echo "::: Log will NOT be uploaded to tricorder." + ;; + esac + fi # Check if tricorder.pi-hole.net is reachable and provide token. if [ -n "${tricorder}" ]; then echo "::: Your debug token is : ${tricorder}"