Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

Commit

Permalink
expose monit admin user as env var
Browse files Browse the repository at this point in the history
  • Loading branch information
florindragos committed Mar 16, 2017
1 parent 0c03e59 commit 21e60d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/dockerfiles/monitrc.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set logfile /var/vcap/monit/monit.log
# provided by the user. We're afraid of exposing writable access to remote clients
# using a non-TLS enabled connection.
set httpd port <%= p("hcf.monit.port") %> and use address 0.0.0.0
allow "<%= SecureRandom.hex %>":"<%= SecureRandom.hex %>"
allow "<%= p("hcf.monit.admin_user") %>":"<%= p("hcf.monit.admin_password") %>"
allow "<%= p("hcf.monit.user") %>":"<%= p("hcf.monit.password") %>" read-only

include /etc/monit/monitrc.d/cron
Expand Down
2 changes: 2 additions & 0 deletions scripts/dockerfiles/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ fi

export IP_ADDRESS=$(/bin/hostname -i | awk '{print $1}')
export DNS_RECORD_NAME=$(/bin/hostname)
export MONIT_ADMIN_USER=$(cat /proc/sys/kernel/random/uuid)
export MONIT_ADMIN_PASSWORD=$(cat /proc/sys/kernel/random/uuid)

# Run custom environment scripts (that are sourced)
{{ range $script := .role.EnvironScripts }}
Expand Down

0 comments on commit 21e60d5

Please sign in to comment.