Files
qipai/scripts/dev/wsl/check-api-domain.sh
T
2026-06-15 16:42:42 +08:00

19 lines
424 B
Bash

#!/usr/bin/env bash
set -euo pipefail
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