From e2bf7516bb95c34a4c2d507edf165a914daa722c Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 14 Aug 2017 15:25:19 +0200 Subject: [PATCH] Notification scripts: Fix duplicate variable in mail-{host,service}-notification --- etc/icinga2/scripts/mail-host-notification.sh | 4 ++-- etc/icinga2/scripts/mail-service-notification.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/etc/icinga2/scripts/mail-host-notification.sh b/etc/icinga2/scripts/mail-host-notification.sh index 38520febf..d6e22ce9a 100755 --- a/etc/icinga2/scripts/mail-host-notification.sh +++ b/etc/icinga2/scripts/mail-host-notification.sh @@ -3,7 +3,7 @@ # Copyright (C) 2012-2017 Icinga Development Team (https://www.icinga.com/) PROG="`basename $0`" -HOSTNAME="`hostname`" +ICINGA2HOST="`hostname`" MAILBIN="mail" if [ -z "`which $MAILBIN`" ] ; then @@ -93,7 +93,7 @@ SUBJECT="[$NOTIFICATIONTYPE] Host $HOSTDISPLAYNAME is $HOSTSTATE!" ## Build the notification message NOTIFICATION_MESSAGE=`cat << EOF -***** Host Monitoring on $HOSTNAME ***** +***** Host Monitoring on $ICINGA2HOST ***** $HOSTDISPLAYNAME is $HOSTSTATE! diff --git a/etc/icinga2/scripts/mail-service-notification.sh b/etc/icinga2/scripts/mail-service-notification.sh index 7fc1b2630..b94001dc9 100755 --- a/etc/icinga2/scripts/mail-service-notification.sh +++ b/etc/icinga2/scripts/mail-service-notification.sh @@ -3,7 +3,7 @@ # Copyright (C) 2012-2017 Icinga Development Team (https://www.icinga.com/) PROG="`basename $0`" -HOSTNAME="`hostname`" +ICINGA2HOST="`hostname`" MAILBIN="mail" if [ -z "`which $MAILBIN`" ] ; then @@ -98,7 +98,7 @@ SUBJECT="[$NOTIFICATIONTYPE] $SERVICEDISPLAYNAME on $HOSTDISPLAYNAME is $SERVICE ## Build the notification message NOTIFICATION_MESSAGE=`cat << EOF -***** Service Monitoring on $HOSTNAME ***** +***** Service Monitoring on $ICINGA2HOST ***** $SERVICEDISPLAYNAME on $HOSTDISPLAYNAME is $SERVICESTATE! -- 2.40.0