mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-07-11 23:52:48 +02:00
store errorcode while using KEEP_GOING (fixes #659)
This commit is contained in:
+8
-4
@@ -513,7 +513,7 @@ _openssl() {
|
|||||||
echo "Details:" >&2
|
echo "Details:" >&2
|
||||||
echo "${out}" >&2
|
echo "${out}" >&2
|
||||||
echo >&2
|
echo >&2
|
||||||
exit ${res}
|
exit "${res}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1371,7 +1371,7 @@ command_sign_domains() {
|
|||||||
if [[ "${PARAM_KEEP_GOING:-}" = "yes" ]]; then
|
if [[ "${PARAM_KEEP_GOING:-}" = "yes" ]]; then
|
||||||
skip_exit_hook=yes
|
skip_exit_hook=yes
|
||||||
sign_domain "${certdir}" ${timestamp} ${domain} ${morenames} &
|
sign_domain "${certdir}" ${timestamp} ${domain} ${morenames} &
|
||||||
wait $! || true
|
wait $! || exit_with_errorcode=1
|
||||||
skip_exit_hook=no
|
skip_exit_hook=no
|
||||||
else
|
else
|
||||||
sign_domain "${certdir}" ${timestamp} ${domain} ${morenames}
|
sign_domain "${certdir}" ${timestamp} ${domain} ${morenames}
|
||||||
@@ -1413,7 +1413,8 @@ command_sign_domains() {
|
|||||||
echo "+ Running automatic cleanup"
|
echo "+ Running automatic cleanup"
|
||||||
command_cleanup noinit
|
command_cleanup noinit
|
||||||
fi
|
fi
|
||||||
exit 0
|
|
||||||
|
exit "${exit_with_errorcode}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Usage: --signcsr (-s) path/to/csr.pem
|
# Usage: --signcsr (-s) path/to/csr.pem
|
||||||
@@ -1557,7 +1558,7 @@ command_cleanup() {
|
|||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
exit 0
|
exit "${exit_with_errorcode}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Usage: --help (-h)
|
# Usage: --help (-h)
|
||||||
@@ -1591,6 +1592,7 @@ command_env() {
|
|||||||
|
|
||||||
# Main method (parses script arguments and calls command_* methods)
|
# Main method (parses script arguments and calls command_* methods)
|
||||||
main() {
|
main() {
|
||||||
|
exit_with_errorcode=0
|
||||||
skip_exit_hook=no
|
skip_exit_hook=no
|
||||||
COMMAND=""
|
COMMAND=""
|
||||||
set_command() {
|
set_command() {
|
||||||
@@ -1812,6 +1814,8 @@ main() {
|
|||||||
version) command_version;;
|
version) command_version;;
|
||||||
*) command_help; exit 1;;
|
*) command_help; exit 1;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
exit "${exit_with_errorcode}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Determine OS type
|
# Determine OS type
|
||||||
|
|||||||
Reference in New Issue
Block a user