Commit 82f491c2 authored by Xavier Thompson's avatar Xavier Thompson

stack/monitor: Fix password reinstall

Regenerate monitor password files if they are deleted.
parent 8a2f83cb
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# not need these here). # not need these here).
[monitor2-template] [monitor2-template]
filename = instance-monitor.cfg.jinja2.in filename = instance-monitor.cfg.jinja2.in
md5sum = 24c7f5527d994e231b4c2bf9fecb68a6 md5sum = d19664e72d05a22813366f2871527935
[monitor-httpd-conf] [monitor-httpd-conf]
_update_hash_filename_ = templates/monitor-httpd.conf.in _update_hash_filename_ = templates/monitor-httpd.conf.in
......
...@@ -158,6 +158,9 @@ recipe = plone.recipe.command ...@@ -158,6 +158,9 @@ recipe = plone.recipe.command
stop-on-error = true stop-on-error = true
password-file = ${monitor-directory:etc}/.monitor-password password-file = ${monitor-directory:etc}/.monitor-password
htpasswd-path = ${monitor-directory:etc}/monitor-htpasswd htpasswd-path = ${monitor-directory:etc}/monitor-htpasswd
location =
${:password-file}
${:htpasswd-path}
command = command =
echo "${monitor-instance-parameter:password}" >${:password-file} echo "${monitor-instance-parameter:password}" >${:password-file}
{{ apache_location }}/bin/htpasswd -cib ${:htpasswd-path} "${monitor-instance-parameter:username}" "${monitor-instance-parameter:password}" {{ apache_location }}/bin/htpasswd -cib ${:htpasswd-path} "${monitor-instance-parameter:username}" "${monitor-instance-parameter:password}"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment