From b4349b41ce88beeeabadc212cf05dd01bceb6f18 Mon Sep 17 00:00:00 2001 From: RD WebDesign Date: Tue, 6 Dec 2022 15:42:36 -0300 Subject: [PATCH] Use the correct variable `digReturnCode` also use INFO instead of CROSS, because it's not an error. Signed-off-by: RD WebDesign --- advanced/Scripts/piholeDebug.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/advanced/Scripts/piholeDebug.sh b/advanced/Scripts/piholeDebug.sh index 979f5fb3..17447873 100755 --- a/advanced/Scripts/piholeDebug.sh +++ b/advanced/Scripts/piholeDebug.sh @@ -397,8 +397,8 @@ os_check() { log_write "${INFO} dig return code: ${digReturnCode}" log_write "${INFO} dig response: ${response}" - if [ "${response}" -ne 0 ]; then - log_write "${CROSS} Distro: ${COL_RED}${detected_os^}${COL_NC}" + if [ "${digReturnCode}" -ne 0 ]; then + log_write "${INFO} Distro: ${COL_RED}${detected_os^}${COL_NC}" log_write "${CROSS} Error: ${COL_RED}dig command failed - Unable to check OS${COL_NC}" else IFS=" " read -r -a supportedOS < <(echo "${response}" | tr -d '"')