diff --git a/CHANGELOG.md b/CHANGELOG.md index bb77041b..3cac1da8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,7 @@ The **patch** part changes incrementally at each release. * packweb-apache: mod-security config is already included elsewhere * redis: for permissions on log and lib directories * redis: fix shell for instance users +* evoacme: fix error handling in sed_cert_path_for_(apache|nginx) ## [9.4.2] - 2018-10-12 diff --git a/evoacme/files/evoacme.sh b/evoacme/files/evoacme.sh index b1837992..770cd8d4 100755 --- a/evoacme/files/evoacme.sh +++ b/evoacme/files/evoacme.sh @@ -55,10 +55,8 @@ sed_cert_path_for_apache() { sed -i "s~${search}~${replace}~" "${vhost_full_path}" debug "Config in ${vhost_full_path} has been updated" - $(command -v apache2ctl) -t 2>&1 | grep -v "Syntax OK" - if [ "${PIPESTATUS[0]}" != "0" ]; then - error "Apache config test has exited with a non-zero exit code" - fi + $(command -v apache2ctl) -t 2>/dev/null + [ "${?}" -eq 0 ] || $(command -v apache2ctl) -t fi } sed_cert_path_for_nginx() { @@ -76,7 +74,8 @@ sed_cert_path_for_nginx() { sed -i "s~${search}~${replace}~" "${vhost_full_path}" debug "Config in ${vhost_full_path} has been updated" - $(command -v nginx) -t + $(command -v nginx) -t 2>/dev/null + [ "${?}" -eq 0 ] || $(command -v nginx) -t fi } x509_verify() {