Bläddra i källkod

fix readme to reflect need to quote command-line, space-separated username/password env vars
add backward compatibility for previous MUNIN_USER and MUNIN_PASSWORD env vars

Jason Levine 7 år sedan
förälder
incheckning
09e12a6d4f
2 ändrade filer med 4 tillägg och 4 borttagningar
  1. 2 2
      README.md
  2. 2 2
      start-munin.sh

+ 2 - 2
README.md

@@ -60,8 +60,8 @@ docker run -d \
   -v /var/lib/munin:/var/lib/munin \
   -v /var/run/munin:/var/run/munin \
   -v /var/cache/munin:/var/cache/munin \
-  -e MUNIN_USERS=http-user another-user \
-  -e MUNIN_PASSWORDS=secret-password other-users-password \
+  -e MUNIN_USERS='http-user another-user' \
+  -e MUNIN_PASSWORDS='secret-password other-users-password' \
   -e SMTP_HOST=smtp.example.com \
   -e SMTP_PORT=587 \
   -e SMTP_USERNAME=smtp-username \

+ 2 - 2
start-munin.sh

@@ -1,8 +1,8 @@
 #!/bin/bash
 NODES=${NODES:-}
 SNMP_NODES=${SNMP_NODES:-}
-MUNIN_USERS=${MUNIN_USERS:-user}
-MUNIN_PASSWORDS=${MUNIN_PASSWORDS:-password}
+MUNIN_USERS=${MUNIN_USERS:-${MUNIN_USER:-user}}
+MUNIN_PASSWORDS=${MUNIN_PASSWORDS:-${MUNIN_PASSWORD:-password}}
 MAIL_CONF_PATH='/var/lib/munin/.mailrc'
 SMTP_USE_TLS=${SMTP_USE_TLS:-false}
 SMTP_ALWAYS_SEND=${SMTP_ALWAYS_SEND:-true}