deploy(M00-E): 补充Certbot证书检查

This commit is contained in:
Codex
2026-06-15 16:42:42 +08:00
parent d9d51e9d67
commit 4cb3ab6529
19 changed files with 158 additions and 24 deletions
+14 -1
View File
@@ -1,5 +1,18 @@
#!/usr/bin/env bash
set -euo pipefail
curl -fsS --max-time 10 https://api.txyundm.cn/app-api/health
domain="${QIPAI_DOMAIN:-api.txyundm.cn}"
origin="https://${domain}"
if command -v getent >/dev/null 2>&1; then
getent hosts "$domain" || true
fi
for path in /health /app-api/health /admin-api/health; do
url="${origin}${path}"
if curl -fsSIL --max-time 10 "$url" >/dev/null 2>&1; then
printf 'PASS: %s\n' "$url"
else
printf 'WARN: %s not reachable\n' "$url"
fi
done