summaryrefslogtreecommitdiffstats
path: root/start-munin.sh
diff options
context:
space:
mode:
authorMichael Lewkowski <michael@lewkowski.de>2016-06-01 08:27:17 +0200
committerMichael Lewkowski <michael@lewkowski.de>2016-06-01 08:27:17 +0200
commit6a64d0d18ab0299e4c5821b75090da506bcfeaec (patch)
treef524d52dd66fa4c1a387c69352bc2769d98e8bf4 /start-munin.sh
parentb2f9b8ac6f33ea7dbe1d3fb3f6bbeaffa2227754 (diff)
downloadmunin-6a64d0d18ab0299e4c5821b75090da506bcfeaec.tar.gz
munin-6a64d0d18ab0299e4c5821b75090da506bcfeaec.tar.bz2
munin-6a64d0d18ab0299e4c5821b75090da506bcfeaec.tar.xz
munin-6a64d0d18ab0299e4c5821b75090da506bcfeaec.zip
added smtp_always_send parameter; documented smtp_always_send and
smtp_use_tls parameters
Diffstat (limited to 'start-munin.sh')
-rw-r--r--start-munin.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/start-munin.sh b/start-munin.sh
index bed2e80..e994128 100644
--- a/start-munin.sh
+++ b/start-munin.sh
@@ -5,6 +5,7 @@ MUNIN_USER=${MUNIN_USER:-user}
MUNIN_PASSWORD=${MUNIN_PASSWORD:-password}
MAIL_CONF_PATH='/var/lib/munin/.mailrc'
SMTP_USE_TLS=false
+SMTP_ALWAYS_SEND=true
truncate -s 0 "${MAIL_CONF_PATH}"
@@ -33,6 +34,9 @@ grep -q 'contact.mail' /etc/munin/munin.conf; rc=$?
if [ $rc -ne 0 -a -n "${ALERT_RECIPIENT}" -a -n "${ALERT_SENDER}" ] ; then
echo "Setup alert email from ${ALERT_SENDER} to ${ALERT_RECIPIENT}"
echo 'contact.mail.command mail -r '${ALERT_SENDER}' -s "[${var:group};${var:host}] -> ${var:graph_title} -> warnings: ${loop<,>:wfields ${var:label}=${var:value}} / criticals: ${loop<,>:cfields ${var:label}=${var:value}}"' ${ALERT_RECIPIENT} >> /etc/munin/munin.conf
+ if [ "${SMTP_ALWAYS_SEND}" = true ] ; then
+ echo 'contact.mail.always_send warning critical' >> /etc/munin/munin.conf
+ fi
fi
[ -e /etc/munin/htpasswd.users ] || htpasswd -b -c /etc/munin/htpasswd.users "$MUNIN_USER" "$MUNIN_PASSWORD"