evoacme: fix error handling in sed_cert_path_for_(apache|nginx)

This commit is contained in:
Victor LABORIE 2018-11-22 15:05:38 +01:00
parent d5e34a58d2
commit 6469733d2f
2 changed files with 5 additions and 5 deletions

View file

@ -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

View file

@ -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() {