Debug auto mode engaged

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
This commit is contained in:
Dan Schaper 2017-02-26 18:22:06 -08:00
parent ba5bbf3523
commit 9b060aab34
No known key found for this signature in database
GPG Key ID: 572E999E385B7BFC
1 changed files with 13 additions and 10 deletions

View File

@ -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}"