修bug,完善功能
build / build (push) Blocked by required conditions
tests / build (push) Waiting to run
tests / tests (push) Waiting to run

This commit is contained in:
ChuNa7a committed 2026-10-16 23:52:12 +08:00
1 parent 30364b1c4b
commit 6996e19694
125 files changed
+15343 -3746

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
#!/bin/sh
set -eu
# 检查 TCP 协议响应或 Web 健康接口,不读取账号口令。
case "${1:-server}" in
server)
response=$(printf '{"method":"ping"}\n{"method":"quit"}\n' | nc -w 3 127.0.0.1 7777)
printf '%s\n' "$response" | grep -Eq '"status"[[:space:]]*:[[:space:]]*"pong"'
;;
web)
curl --fail --silent --show-error --max-time 3 http://127.0.0.1:7778/api/health >/dev/null
;;
*)
echo "Unknown healthcheck service: $1" >&2
exit 1
;;
esac