Add VPS hardening, Tailscale exit node, and uptime check scripts
Deploy / lint (push) Failing after 0s
Deploy / security (push) Failing after 1s
Deploy / deploy (push) Has been skipped

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Gan, Jimmy
2026-06-03 02:55:05 +08:00
parent 49f73b3962
commit 55a8dbc457
4 changed files with 151 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
#!/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 ---"