From: Lukas Schauer Date: Wed, 10 Feb 2016 18:09:17 +0000 (+0100) Subject: check if hooks are chained before calling cleanup-hook on errors (fixes #126) X-Git-Tag: v0.1.0~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=676d15c5dfbb677a90b1e5967c909b1d08ac04bd;p=thirdparty%2Fdehydrated.git check if hooks are chained before calling cleanup-hook on errors (fixes #126) --- diff --git a/letsencrypt.sh b/letsencrypt.sh index 72bd8b9..d3877d9 100755 --- a/letsencrypt.sh +++ b/letsencrypt.sh @@ -229,6 +229,7 @@ _openssl() { echo >&2 echo "Details:" >&2 echo "${out}" >&2 + echo >&2 exit ${res} fi } @@ -255,7 +256,7 @@ http_request() { rm -f "${tempcont}" # Wait for hook script to clean the challenge if used - if [[ -n "${HOOK}" ]] && [[ -n "${challenge_token:+set}" ]]; then + if [[ -n "${HOOK}" ]] && [[ "${HOOK_CHAIN}" != "yes" ]] && [[ -n "${challenge_token:+set}" ]]; then ${HOOK} "clean_challenge" '' "${challenge_token}" "${keyauth}" <&4 >&5 2>&6 fi