"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "etc/icinga2/scripts/mail-host-notification.sh" between
icinga2-2.11.5.tar.gz and icinga2-2.12.0.tar.gz

About: Icinga 2 is an enterprise grade monitoring system which keeps watch over networks and any conceivable network resource.

mail-host-notification.sh  (icinga2-2.11.5):mail-host-notification.sh  (icinga2-2.12.0)
skipping to change at line 148 skipping to change at line 148
fi fi
## Check whether Icinga Web 2 URL was specified. ## Check whether Icinga Web 2 URL was specified.
if [ -n "$ICINGAWEB2URL" ] ; then if [ -n "$ICINGAWEB2URL" ] ; then
NOTIFICATION_MESSAGE="$NOTIFICATION_MESSAGE NOTIFICATION_MESSAGE="$NOTIFICATION_MESSAGE
$ICINGAWEB2URL/monitoring/host/show?host=$(urlencode "$HOSTNAME")" $ICINGAWEB2URL/monitoring/host/show?host=$(urlencode "$HOSTNAME")"
fi fi
## Check whether verbose mode was enabled and log to syslog. ## Check whether verbose mode was enabled and log to syslog.
if [ "$VERBOSE" == "true" ] ; then if [ "$VERBOSE" = "true" ] ; then
logger "$PROG sends $SUBJECT => $USEREMAIL" logger "$PROG sends $SUBJECT => $USEREMAIL"
fi fi
## Send the mail using the $MAILBIN command. ## Send the mail using the $MAILBIN command.
## If an explicit sender was specified, try to set it. ## If an explicit sender was specified, try to set it.
if [ -n "$MAILFROM" ] ; then if [ -n "$MAILFROM" ] ; then
## Modify this for your own needs! ## Modify this for your own needs!
## Debian/Ubuntu use mailutils which requires `-a` to append the header ## Debian/Ubuntu use mailutils which requires `-a` to append the header
if [ -f /etc/debian_version ]; then if [ -f /etc/debian_version ]; then
/usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" | tr -d '\015' \ /usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" | $MAILBIN -a "From: $MAILFROM"
| $MAILBIN -a "From: $MAILFROM" -s "$SUBJECT" $USEREMAIL -s "$SUBJECT" $USEREMAIL
## Other distributions (RHEL/SUSE/etc.) prefer mailx which sets a sender addre ss with `-r` ## Other distributions (RHEL/SUSE/etc.) prefer mailx which sets a sender addre ss with `-r`
else else
/usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" | tr -d '\015' \ /usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" | $MAILBIN -r "$MAILFROM" -s "$
| $MAILBIN -r "$MAILFROM" -s "$SUBJECT" $USEREMAIL SUBJECT" $USEREMAIL
fi fi
else else
/usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" | tr -d '\015' \ /usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" \
| $MAILBIN -s "$SUBJECT" $USEREMAIL | $MAILBIN -s "$SUBJECT" $USEREMAIL
fi fi
 End of changes. 4 change blocks. 
6 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)