4a91c7a186
- Create server2/ directory and migrate Xray proxy config, Clash config, and utility scripts - Create caddy-vps/ directory and add Caddyfile reverse proxy configuration - Update .gitea/workflows/deploy.yml CI/CD pipeline to validate JSON/YAML and check Caddyfile formatting/syntax - Deploy configurations sequentially to both servers - Update README.md to document multi-server topology and CI/CD behavior Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
36 lines
959 B
Bash
36 lines
959 B
Bash
#!/bin/bash
|
|
|
|
# Simple Uptime & Service Health Check for VPS
|
|
# Checks Xray, AdGuard Home, Tailscale, and WireGuard
|
|
|
|
SERVICES=("xray" "AdGuardHome" "tailscaled" "wg-quick@wg0")
|
|
|
|
echo "--- Service Health Check ($(date)) ---"
|
|
|
|
for svc in "${SERVICES[@]}"; do
|
|
if systemctl is-active --quiet "$svc"; then
|
|
echo "[OK] $svc is running"
|
|
else
|
|
echo "[ERROR] $svc is NOT running!"
|
|
# Optional: Attempt restart
|
|
# sudo systemctl restart "$svc"
|
|
fi
|
|
done
|
|
|
|
# Check if Xray is listening on 443
|
|
if ss -tuln | grep -q ":443 "; then
|
|
echo "[OK] Port 443 is listening (Xray)"
|
|
else
|
|
echo "[ERROR] Port 443 is NOT listening!"
|
|
fi
|
|
|
|
# Check if AdGuard Home is listening on 53 (Tailscale IP)
|
|
TAILSCALE_IP="100.70.115.1"
|
|
if ss -tuln | grep -q "$TAILSCALE_IP:53 "; then
|
|
echo "[OK] AdGuard Home is listening on $TAILSCALE_IP:53"
|
|
else
|
|
echo "[WARNING] AdGuard Home is NOT listening on $TAILSCALE_IP:53"
|
|
fi
|
|
|
|
echo "--- Check Complete ---"
|