From c89d6995186f28a16c53790f846cf8d70648f667 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Tue, 21 Jul 2020 10:45:34 +0200 Subject: [PATCH] certbot: fix haproxy hook (ssl cert directory detection) It was matching additional parameters. Now it matches on the first argument after "crt" --- CHANGELOG.md | 1 + certbot/files/hooks/haproxy.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 00d18088..5c76d489 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/certbot/files/hooks/haproxy.sh b/certbot/files/hooks/haproxy.sh index 4998d55f..1a7f5d4e 100644 --- a/certbot/files/hooks/haproxy.sh +++ b/certbot/files/hooks/haproxy.sh @@ -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}"