Przeglądaj źródła

made tls optional

Michael Lewkowski 8 lat temu
rodzic
commit
b2f9b8ac6f
1 zmienionych plików z 7 dodań i 1 usunięć
  1. 7 1
      start-munin.sh

+ 7 - 1
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