renewAll: error out if CERT_HOME is not a directory

With a misconfigured $HOME / CERT_HOME the glob over "$CERT_HOME"/*.*
matches nothing, so renewAll silently does nothing and returns success --
--renew-all / --cron appears to work while renewing no certificates.
Check that CERT_HOME is a directory up front and return 1 with a clear
error instead.

Closes #4508
This commit is contained in:
neil
2026-07-04 23:40:31 +08:00 Unverified
parent 9764f67619
commit 4978782fb8
+4
View File
@@ -6072,6 +6072,10 @@ renewAll() {
_set_level=${NOTIFY_LEVEL:-$NOTIFY_LEVEL_DEFAULT}
_debug "_set_level" "$_set_level"
export _ACME_IN_RENEWALL=1
if ! [ -d "$CERT_HOME" ]; then
_err "$CERT_HOME is not a directory, please check your configuration."
return 1
fi
for di in "${CERT_HOME}"/*.* "${CERT_HOME}"/*:*; do
_debug di "$di"
if ! [ -d "$di" ]; then