From cbc99d45c6a2ec243dc2e31e80d1681bd4b8e889 Mon Sep 17 00:00:00 2001
From: DL6ER <dl6er@dl6er.de>
Date: Tue, 7 Sep 2021 11:20:42 +0200
Subject: [PATCH] Small style change to finished debug upload display

Signed-off-by: DL6ER <dl6er@dl6er.de>
---
 advanced/Scripts/piholeDebug.sh | 15 +++++++--------
 pihole                          |  2 +-
 2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/advanced/Scripts/piholeDebug.sh b/advanced/Scripts/piholeDebug.sh
index 02e253a9..e2dba54a 100755
--- a/advanced/Scripts/piholeDebug.sh
+++ b/advanced/Scripts/piholeDebug.sh
@@ -1338,7 +1338,7 @@ curl_to_tricorder() {
     if [[ "${tricorder_token}" != "https://tricorder.pi-hole.net/"* ]]; then
         log_write "    * ${COL_GREEN}curl${COL_NC} failed, contact Pi-hole support for assistance."
         # Log curl error (if available)
-        if [ ! -z "${tricorder_token}" ]; then
+        if [ -n "${tricorder_token}" ]; then
             log_write "    * Error message: ${COL_RED}${tricorder_token}${COL_NC}\\n"
             tricorder_token=""
         fi
@@ -1386,15 +1386,14 @@ upload_to_tricorder() {
         # Again, try to make this visually striking so the user realizes they need to do something with this information
         # Namely, provide the Pi-hole devs with the token
         log_write ""
-        log_write "${COL_PURPLE}***********************************${COL_NC}"
-        log_write "${COL_PURPLE}***********************************${COL_NC}"
+        log_write "${COL_PURPLE}*****************************************************************${COL_NC}"
+        log_write "${COL_PURPLE}*****************************************************************${COL_NC}\\n"
         log_write "${TICK} Your debug token is: ${COL_GREEN}${tricorder_token}${COL_NC}"
-        log_write "${INFO}${COL_RED} Logs are deleted 48 hours after upload.${COL_NC}"
-        log_write "${COL_PURPLE}***********************************${COL_NC}"
-        log_write "${COL_PURPLE}***********************************${COL_NC}"
+        log_write "${INFO}${COL_RED} Logs are deleted 48 hours after upload.${COL_NC}\\n"
+        log_write "${COL_PURPLE}*****************************************************************${COL_NC}"
+        log_write "${COL_PURPLE}*****************************************************************${COL_NC}"
         log_write ""
-        log_write "   * Provide the token above to the Pi-hole team for assistance at"
-        log_write "   * ${FORUMS_URL}"
+        log_write "   * Provide the token above to the Pi-hole team for assistance at ${FORUMS_URL}"
 
     # If no token was generated
     else
diff --git a/pihole b/pihole
index b30f6052..31356671 100755
--- a/pihole
+++ b/pihole
@@ -409,7 +409,7 @@ tricorderFunc() {
   if [[ "${tricorder_token}" != "https://tricorder.pi-hole.net/"* ]]; then
       echo -e "${CROSS} uploading failed, contact Pi-hole support for assistance."
       # Log curl error (if available)
-      if [ ! -z "${tricorder_token}" ]; then
+      if [ -n "${tricorder_token}" ]; then
           echo -e "${INFO} Error message: ${COL_RED}${tricorder_token}${COL_NC}\\n"
           tricorder_token=""
       fi