echo "Details:" >&2
echo "${out}" >&2
echo >&2
- exit ${res}
+ exit "${res}"
fi
}
if [[ "${PARAM_KEEP_GOING:-}" = "yes" ]]; then
skip_exit_hook=yes
sign_domain "${certdir}" ${timestamp} ${domain} ${morenames} &
- wait $! || true
+ wait $! || exit_with_errorcode=1
skip_exit_hook=no
else
sign_domain "${certdir}" ${timestamp} ${domain} ${morenames}
echo "+ Running automatic cleanup"
command_cleanup noinit
fi
- exit 0
+
+ exit "${exit_with_errorcode}"
}
# Usage: --signcsr (-s) path/to/csr.pem
done
done
- exit 0
+ exit "${exit_with_errorcode}"
}
# Usage: --help (-h)
# Main method (parses script arguments and calls command_* methods)
main() {
+ exit_with_errorcode=0
skip_exit_hook=no
COMMAND=""
set_command() {
version) command_version;;
*) command_help; exit 1;;
esac
+
+ exit "${exit_with_errorcode}"
}
# Determine OS type