diff --git a/evoacme/files/evoacme.sh b/evoacme/files/evoacme.sh index 73523588..814d4553 100755 --- a/evoacme/files/evoacme.sh +++ b/evoacme/files/evoacme.sh @@ -204,6 +204,8 @@ main() { sudo -u acme test -w "${NEW_DIR}" || error "Directory ${NEW_DIR} is not writable by user 'acme'" # create a certificate with certbot + # we disable the set -e during the certbot call + set +e sudo -u acme \ "${CERTBOT_BIN}" \ certonly \ @@ -220,6 +222,11 @@ main() { 2>&1 \ | grep -v "certbot.crypto_util" + if [ "${PIPESTATUS[0]}" != "0" ]; then + error "Certbot has exited with a non-zero exit code" + fi + set -e + if [ "${DRY_RUN}" = "1" ]; then debug "In dry-run mode, we stop here. Bye" exit 0