diff options
author | Michael Lewkowski <michael@lewkowski.de> | 2016-06-01 08:14:11 +0200 |
---|---|---|
committer | Michael Lewkowski <michael@lewkowski.de> | 2016-06-01 08:14:11 +0200 |
commit | b2f9b8ac6f33ea7dbe1d3fb3f6bbeaffa2227754 (patch) | |
tree | 7e9510832a3766070410589b33d41f4d194b8c71 | |
parent | a9c43678db7671a1c575f197299695de446dcee1 (diff) | |
download | munin-b2f9b8ac6f33ea7dbe1d3fb3f6bbeaffa2227754.tar.gz munin-b2f9b8ac6f33ea7dbe1d3fb3f6bbeaffa2227754.tar.bz2 munin-b2f9b8ac6f33ea7dbe1d3fb3f6bbeaffa2227754.tar.xz munin-b2f9b8ac6f33ea7dbe1d3fb3f6bbeaffa2227754.zip |
made tls optional
-rw-r--r-- | start-munin.sh | 8 |
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 |