deploy(M00-E): 补充Certbot证书检查
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user