certbot: fix haproxy hook (ssl cert directory detection)

It was matching additional parameters.
Now it matches on the first argument after "crt"
This commit is contained in:
Jérémy Lecour 2020-07-21 10:45:34 +02:00 committed by Gitea
parent 43122a5ea9
commit c89d699518
2 changed files with 2 additions and 1 deletions

View File

@ -29,6 +29,7 @@ The **patch** part changes incrementally at each release.
### Changed
* certbot: fix haproxy hook (ssl cert directory detection)
* certbot: install certbot dependencies non-interactively for jessie
* elasticsearch: set tmpdir before datadir
* elasticsearch: configure cluster with seed hosts and initial masters

View File

@ -36,7 +36,7 @@ cert_and_key_mismatch() {
}
detect_haproxy_cert_dir() {
# get last field or line wich defines the crt directory
config_cert_dir=$(grep -r -o -E -h '^\s*bind .* crt /etc/.+\b' "${haproxy_config_file}" | head -1 | awk '{ print $(NF)}')
config_cert_dir=$(grep -r -o -E -h '^\s*bind .* crt /etc/\S+' "${haproxy_config_file}" | head -1 | awk '{ print $(NF)}')
if [ -n "${config_cert_dir}" ]; then
debug "Cert directory is configured with ${config_cert_dir}"
echo "${config_cert_dir}"