#!/bin/bash # 健康检查 cd "$(dirname "$0")/.." echo "健康检查..." response=$(curl -s http://localhost:${PORT:-3020}/api/health) if [ $? -eq 0 ]; then echo "服务健康" echo "$response" | python3 -m json.tool 2>/dev/null || echo "$response" else echo "服务不可用" exit 1 fi