Commit 6c843233 authored by Łukasz Nowak's avatar Łukasz Nowak

software/caddy-frontend: Fix kedifa reloading

Because of escaping of slapos.cookbook:wrapper kedifa is never reloaded, so
use instead jinja2 with template_wrapper for it.

Also adapt to kill from dash (-HUP).
parent 597c8b52
......@@ -114,7 +114,7 @@ md5sum = 38792c2dceae38ab411592ec36fff6a8
[template-kedifa]
filename = instance-kedifa.cfg.in
md5sum = f77744e52f9d028c39f99cfbf31eadaf
md5sum = c784ac325fbd383277bf1ae551abcfd0
[template-backend-haproxy-rsyslogd-conf]
_update_hash_filename_ = templates/backend-haproxy-rsyslogd.conf.in
......
......@@ -105,7 +105,7 @@ stop-on-error = True
ca_path='${kedifa-config:ca-certificate}',
crl_path='${kedifa-config:crl}',
key_path='${kedifa-csr:key}',
on_renew='${kedifa-reloader:wrapper-path}',
on_renew='${kedifa-reloader:rendered}',
template_csr='${kedifa-csr:template-csr}'
)}}
......@@ -213,9 +213,14 @@ pidfile = ${directory:run}/kedifa.pid
logfile = ${directory:log}/kedifa.log
[kedifa-reloader]
recipe = slapos.cookbook:wrapper
command-line = kill -SIGHUP `cat ${kedifa-config:pidfile}`
wrapper-path = ${directory:etc-run}/kedifa-reloader
<= jinja2-template-base
template = {{ parameter_dict['template_wrapper'] }}
rendered = ${directory:etc-run}/kedifa-reloader
command =
kill -HUP `cat ${kedifa-config:pidfile}`
mode = 0700
extra-context =
key content :command
[promise-kedifa-http-reply]
<= monitor-promise-base
......
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