security/acme-client: avoid startup error, refs #4743

This commit is contained in:
Frank Wall
2025-06-16 18:20:47 +02:00
parent 18d2c753d4
commit 5458836c03
2 changed files with 5 additions and 1 deletions
+1
View File
@@ -15,6 +15,7 @@ Added:
Fixed:
* acme.sh is always called with "--days 1" (#4711)
* avoid startup error: "rmdir... Not a directory" (#4743)
4.9
@@ -20,7 +20,10 @@ chmod 750 ${ACME_BASE} ${ACME_BASE}/*
# This should guard against manual misconfiguration.
for link in ${ACME_LINKS}; do
# First remove any existing file/directory.
if [ -f "${ACME_BASE}/home/${link}" ]; then
if [ -L "${ACME_BASE}/home/${link}" ]; then
# Already a symlink, skip this enty.
continue
elif [ -f "${ACME_BASE}/home/${link}" ]; then
rm ${ACME_BASE}/home/${link}
elif [ -d "${ACME_BASE}/home/${link}" ]; then
rmdir ${ACME_BASE}/home/${link}