mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-03-30 13:51:49 +02:00
skip exit_hook in _exiterr if KEEP_GOING is enabled (fixes #686)
This commit is contained in:
@@ -444,7 +444,7 @@ _sed() {
|
|||||||
# Print error message and exit with error
|
# Print error message and exit with error
|
||||||
_exiterr() {
|
_exiterr() {
|
||||||
echo "ERROR: ${1}" >&2
|
echo "ERROR: ${1}" >&2
|
||||||
[[ -n "${HOOK:-}" ]] && "${HOOK}" "exit_hook" "${1}" || true
|
[[ "${skip_exit_hook:-no}" = "no" ]] && [[ -n "${HOOK:-}" ]] && "${HOOK}" "exit_hook" "${1}" || true
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1369,8 +1369,10 @@ command_sign_domains() {
|
|||||||
update_ocsp="yes"
|
update_ocsp="yes"
|
||||||
[[ -z "${csr}" ]] || printf "%s" "${csr}" > "${certdir}/cert-${timestamp}.csr"
|
[[ -z "${csr}" ]] || printf "%s" "${csr}" > "${certdir}/cert-${timestamp}.csr"
|
||||||
if [[ "${PARAM_KEEP_GOING:-}" = "yes" ]]; then
|
if [[ "${PARAM_KEEP_GOING:-}" = "yes" ]]; then
|
||||||
|
skip_exit_hook=yes
|
||||||
sign_domain "${certdir}" ${timestamp} ${domain} ${morenames} &
|
sign_domain "${certdir}" ${timestamp} ${domain} ${morenames} &
|
||||||
wait $! || true
|
wait $! || true
|
||||||
|
skip_exit_hook=no
|
||||||
else
|
else
|
||||||
sign_domain "${certdir}" ${timestamp} ${domain} ${morenames}
|
sign_domain "${certdir}" ${timestamp} ${domain} ${morenames}
|
||||||
fi
|
fi
|
||||||
@@ -1589,6 +1591,7 @@ command_env() {
|
|||||||
|
|
||||||
# Main method (parses script arguments and calls command_* methods)
|
# Main method (parses script arguments and calls command_* methods)
|
||||||
main() {
|
main() {
|
||||||
|
skip_exit_hook=no
|
||||||
COMMAND=""
|
COMMAND=""
|
||||||
set_command() {
|
set_command() {
|
||||||
[[ -z "${COMMAND}" ]] || _exiterr "Only one command can be executed at a time. See help (-h) for more information."
|
[[ -z "${COMMAND}" ]] || _exiterr "Only one command can be executed at a time. See help (-h) for more information."
|
||||||
|
|||||||
Reference in New Issue
Block a user