summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmmanuel Vasilakis <mrzammler@mm.st>2021-05-07 17:31:18 +0300
committerGitHub <noreply@github.com>2021-05-07 17:31:18 +0300
commit52429b0a254af2113e379d8a29a610b637e04111 (patch)
treef05574831abeab0a1b6e284ac41317de47590182
parente58768dfff3c2d4dc0382fc702ee1c4c1af30715 (diff)
Check configuration for CUSTOM and MSTEAM (#11113)
* check for DEFAULT_RECIPIENT_CUSTOM * also check for SEND_MSTEAM * unset SEND_MSTEAM during msteams migration
-rwxr-xr-xhealth/notifications/alarm-notify.sh.in4
1 files changed, 4 insertions, 0 deletions
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" ] ||