cerbot: parse HAProxy config file only if HAProxy is found
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Jérémy Lecour 2020-12-03 17:26:16 +01:00 committed by Jérémy Lecour
parent 84bd3372d5
commit 98f798b9fb
2 changed files with 5 additions and 2 deletions

View File

@ -29,6 +29,8 @@ The **patch** part changes incrementally at each release.
### Fixed
* cerbot: parse HAProxy config file only if HAProxy is found
### Removed
### Security

View File

@ -56,6 +56,9 @@ main() {
fi
if daemon_found_and_running; then
readonly haproxy_config_file="/etc/haproxy/haproxy.cfg"
readonly haproxy_cert_dir=$(detect_haproxy_cert_dir)
if found_renewed_lineage; then
haproxy_cert_file="${haproxy_cert_dir}/$(basename "${RENEWED_LINEAGE}").pem"
failed_cert_file="/root/$(basename "${RENEWED_LINEAGE}").failed.pem"
@ -86,7 +89,5 @@ readonly VERBOSE=${VERBOSE:-"0"}
readonly QUIET=${QUIET:-"0"}
readonly haproxy_bin=$(command -v haproxy)
readonly haproxy_config_file="/etc/haproxy/haproxy.cfg"
readonly haproxy_cert_dir=$(detect_haproxy_cert_dir)
main