From f213c16019f6433a59ffff51b5f2bc171b9cd8ea Mon Sep 17 00:00:00 2001 From: Dan Schaper Date: Wed, 16 Nov 2016 22:16:31 -0800 Subject: [PATCH] Don't exit the script when signals are crossed. --- advanced/Scripts/piholeDebug.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/advanced/Scripts/piholeDebug.sh b/advanced/Scripts/piholeDebug.sh index b805c372..fcb4dedc 100755 --- a/advanced/Scripts/piholeDebug.sh +++ b/advanced/Scripts/piholeDebug.sh @@ -368,7 +368,7 @@ debugLighttpd() { } dumpPiHoleLog() { - trap '{ echo -e "\n::: Finishing debug write from interrupt... Quitting!" ; exit 1; }' INT + trap '{ echo -e "\n::: Finishing debug write from interrupt..." ; break;}' SIGINT echo "::: " echo "::: --= User Action Required =--" 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.)" @@ -447,11 +447,7 @@ header_write "Analyzing gravity.list" && log_write "${GRAVITYFILE} is ${gravity_length} lines long." \ || log_echo "Warning: No gravity.list file found!" -# Continuously append the pihole.log file to the pihole_debug.log file - -# Anything to be done after capturing of pihole.log terminates +dumpPiHoleLog trap finalWork EXIT -### Method calls for additional logging ### -dumpPiHoleLog