diff --git a/run_certbot.sh b/run_certbot.sh index 664b040..99aa973 100644 --- a/run_certbot.sh +++ b/run_certbot.sh @@ -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 diff --git a/run_node.sh b/run_node.sh index 3e03b26..145cdb2 100755 --- a/run_node.sh +++ b/run_node.sh @@ -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"