From 52429b0a254af2113e379d8a29a610b637e04111 Mon Sep 17 00:00:00 2001 From: Emmanuel Vasilakis Date: Fri, 7 May 2021 17:31:18 +0300 Subject: Check configuration for CUSTOM and MSTEAM (#11113) * check for DEFAULT_RECIPIENT_CUSTOM * also check for SEND_MSTEAM * unset SEND_MSTEAM during msteams migration --- health/notifications/alarm-notify.sh.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/health/notifications/alarm-notify.sh.in b/health/notifications/alarm-notify.sh.in index a22a66573e..9a3a80ad6c 100755 --- a/health/notifications/alarm-notify.sh.in +++ b/health/notifications/alarm-notify.sh.in @@ -440,6 +440,7 @@ fi msteams_migration() { SEND_MSTEAMS=${SEND_MSTEAM:-$SEND_MSTEAMS} + unset -v SEND_MSTEAM DEFAULT_RECIPIENT_MSTEAMS=${DEFAULT_RECIPIENT_MSTEAM:-$DEFAULT_RECIPIENT_MSTEAMS} MSTEAMS_WEBHOOK_URL=${MSTEAM_WEBHOOK_URL:-$MSTEAMS_WEBHOOK_URL} MSTEAMS_ICON_DEFAULT=${MSTEAM_ICON_DEFAULT:-$MSTEAMS_ICON_DEFAULT} @@ -596,6 +597,9 @@ filter_recipient_by_criticality() { # check prowl [ -z "${DEFAULT_RECIPIENT_PROWL}" ] && SEND_PROWL="NO" +# check custom +[ -z "${DEFAULT_RECIPIENT_CUSTOM}" ] && SEND_CUSTOM="NO" + if [ "${SEND_PUSHOVER}" = "YES" ] || [ "${SEND_SLACK}" = "YES" ] || [ "${SEND_ROCKETCHAT}" = "YES" ] || -- cgit v1.2.3