Give more guidance in case the renewal process is not working well

This commit is contained in:
Ivan Folgueira Bande 2026-01-11 22:42:16 +01:00
parent 9739695db9
commit 0c3bfcf132
No known key found for this signature in database
GPG Key ID: 3C117481F89E24A7
2 changed files with 7 additions and 5 deletions

View File

@ -52,6 +52,7 @@ echo "[INFO] Starting renewal loop every ${SLEEP_INTERVAL}..."
while true; do
echo "[INFO] Checking certificate renewal..."
certbot renew --standalone --quiet
# certbot renew --standalone ## Use this line instead to debug the output
echo "[INFO] Renewal check complete. Sleeping..."
sleep "${SLEEP_INTERVAL}"
done

View File

@ -62,19 +62,20 @@ if [ -n "${DOMAIN}" ]; then
CERT="${LETSENCRYPT_PATH}/fullchain.pem"
KEY="${LETSENCRYPT_PATH}/privkey.pem"
echo "[INFO] Waiting for a valid TLS certificate for ${DOMAIN}..."
echo "$(date '+%Y-%m-%d %H:%M:%S') [INFO] Waiting for a valid TLS certificate for ${DOMAIN}..."
while true; do
if [ ! -f "${CERT}" ] || [ ! -f "${KEY}" ]; then
echo "[INFO] Certificate files not found yet. Waiting..."
echo "$(date '+%Y-%m-%d %H:%M:%S') [INFO] Certificate files not found yet. Waiting..."
elif ! openssl x509 -checkend 0 -noout -in "${CERT}" >/dev/null 2>&1; then
echo "[WARN] Certificate exists but is expired. Waiting for renewal..."
echo "$(date '+%Y-%m-%d %H:%M:%S') [WARN] Certificate exists but is expired. Waiting for renewal..."
echo "$(date '+%Y-%m-%d %H:%M:%S') [INFO] If that takes more than 15 minutes, please remove --quiet attr in run_certbot.sh so that you can see the reason why renewal is not working."
else
echo "[INFO] Valid TLS certificate detected."
echo "$(date '+%Y-%m-%d %H:%M:%S') [INFO] Valid TLS certificate detected."
break
fi
sleep 5
sleep 60
done
WS_SUPPORT="--websocket-support=true"