From e9591be0a888b3411044a642ced6a4b8b42eaba9 Mon Sep 17 00:00:00 2001 From: jamie Date: Wed, 7 Jul 2021 18:11:50 +0100 Subject: [PATCH] added catch for $gotifywebhook to alert.sh --- lgsm/functions/alert.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lgsm/functions/alert.sh b/lgsm/functions/alert.sh index cbd11d95c..104b4ae9e 100755 --- a/lgsm/functions/alert.sh +++ b/lgsm/functions/alert.sh @@ -146,10 +146,14 @@ if [ "${gotifyalert}" == "on" ]&&[ -n "${gotifyalert}" ]; then elif [ "${gotifyalert}" != "on" ]&&[ "${commandname}" == "TEST-ALERT" ]; then fn_print_warn_nl "Gotify alerts not enabled" fn_script_log_warn "Gotify alerts not enabled" -elif [ -z "${Gotifytoken}" ]&&[ "${commandname}" == "TEST-ALERT" ]; then - fn_print_error_nl "Gotify token not set" - echo -e "* https://docs.linuxgsm.com/alerts/gotify" - fn_script_error "Gotify token not set" +elif [ -z "${gotifytoken}" ]&&[ "${commandname}" == "TEST-ALERT" ]; then + fn_print_error_nl "Gotify token not set" + echo -e "* https://docs.linuxgsm.com/alerts/gotify" + fn_script_error "Gotify token not set" +elif [ -z "${gotifywebhook}" ]&&[ "${commandname}" == "TEST-ALERT" ]; then + fn_print_error_nl "Gotify webhook not set" + echo -e "* https://docs.linuxgsm.com/alerts/gotify" + fn_script_error "Gotify webhook not set" fi if [ "${iftttalert}" == "on" ]&&[ -n "${iftttalert}" ]; then