summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Lewkowski <michael@lewkowski.de>2016-06-01 08:14:11 +0200
committerMichael Lewkowski <michael@lewkowski.de>2016-06-01 08:14:11 +0200
commitb2f9b8ac6f33ea7dbe1d3fb3f6bbeaffa2227754 (patch)
tree7e9510832a3766070410589b33d41f4d194b8c71
parenta9c43678db7671a1c575f197299695de446dcee1 (diff)
downloadmunin-b2f9b8ac6f33ea7dbe1d3fb3f6bbeaffa2227754.tar.gz
munin-b2f9b8ac6f33ea7dbe1d3fb3f6bbeaffa2227754.tar.bz2
munin-b2f9b8ac6f33ea7dbe1d3fb3f6bbeaffa2227754.tar.xz
munin-b2f9b8ac6f33ea7dbe1d3fb3f6bbeaffa2227754.zip
made tls optional
-rw-r--r--start-munin.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/start-munin.sh b/start-munin.sh
index 954a112..bed2e80 100644
--- a/start-munin.sh
+++ b/start-munin.sh
@@ -4,13 +4,19 @@ SNMP_NODES=${SNMP_NODES:-}
MUNIN_USER=${MUNIN_USER:-user}
MUNIN_PASSWORD=${MUNIN_PASSWORD:-password}
MAIL_CONF_PATH='/var/lib/munin/.mailrc'
+SMTP_USE_TLS=false
truncate -s 0 "${MAIL_CONF_PATH}"
-if [ -n "${SMTP_HOST}" -a -n "${SMTP_PORT}" ] ; then
+if [ "${SMTP_USE_TLS}" = true ] ; then
cat >> "${MAIL_CONF_PATH}" <<EOF
set smtp-use-starttls
set ssl-verify=ignore
+EOF
+fi
+
+if [ -n "${SMTP_HOST}" -a -n "${SMTP_PORT}" ] ; then
+ cat >> "${MAIL_CONF_PATH}" <<EOF
set smtp=smtp://${SMTP_HOST}:${SMTP_PORT}
EOF
fi