mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-03-11 21:05:21 +01:00
also run request_failure and invalid_challenge when HOOK_CHAIN is defined (fixes #450)
This commit is contained in:
@@ -544,7 +544,7 @@ http_request() {
|
||||
echo >&2
|
||||
|
||||
# An exclusive hook for the {1}-request error might be useful (e.g., for sending an e-mail to admins)
|
||||
if [[ -n "${HOOK}" ]] && [[ "${HOOK_CHAIN}" != "yes" ]]; then
|
||||
if [[ -n "${HOOK}" ]]; then
|
||||
errtxt="$(cat ${tempcont})"
|
||||
errheaders="$(cat ${tempheaders})"
|
||||
"${HOOK}" "request_failure" "${statuscode}" "${errtxt}" "${1}" "${errheaders}"
|
||||
@@ -799,7 +799,7 @@ sign_csr() {
|
||||
if [[ "${reqstatus}" = "valid" ]]; then
|
||||
echo " + Challenge is valid!"
|
||||
else
|
||||
[[ -n "${HOOK}" ]] && [[ "${HOOK_CHAIN}" != "yes" ]] && "${HOOK}" "invalid_challenge" "${altname}" "${result}"
|
||||
[[ -n "${HOOK}" ]] && "${HOOK}" "invalid_challenge" "${altname}" "${result}"
|
||||
break
|
||||
fi
|
||||
idx=$((idx+1))
|
||||
|
||||
Reference in New Issue
Block a user