]> granicus.if.org Git - icinga2/commitdiff
Notification scripts: Fix duplicate variable in mail-{host,service}-notification 5502/head
authorMichael <mcktr55@gmail.com>
Mon, 14 Aug 2017 13:25:19 +0000 (15:25 +0200)
committerMichael Friedrich <michael.friedrich@icinga.com>
Mon, 14 Aug 2017 15:34:39 +0000 (17:34 +0200)
etc/icinga2/scripts/mail-host-notification.sh
etc/icinga2/scripts/mail-service-notification.sh

index 38520febfbdbeff42ba06214bd40b3d99829f837..d6e22ce9a32a3162ebe2c80266bc5686e4076bab 100755 (executable)
@@ -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!
 
index 7fc1b2630ac6c400decf90e9e146ce104974e6d9..b94001dc9a6bf9989a2e1e10ba174778926bd536 100755 (executable)
@@ -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!