Add System/network_watchdog.sh — services-layer connectivity watchdog
Checks: 1. Internet reachability (gates all remaining checks) 2. DDNS sync — public IP vs Cloudflare DNS record, restarts Gmer4Lfe.com container on mismatch 3. Tailscale status — notify only, no auto-restart 4. NPM proxy — external curl to https://gmer4lfe.com, 2-strike system before NginxProxyManager restart Config: master.conf NETWORK_WATCHDOG_* block, host1.conf HOST1_NETWORK_WATCHDOG_* values Added to SYSTEM_WATCHDOG_SCRIPTS — called by system_watchdog.sh each cycle Fix: storage_watchdog.sh was calling get_strikes/set_strikes without defining them — added local definitions (same pattern as docker_watchdog.sh and stability_watchdog.sh)
This commit is contained in:
@@ -160,6 +160,17 @@ detect_hosts
|
||||
touch "$STORAGE_WATCHDOG_STATE_FILE" 2>/dev/null
|
||||
touch "$WATCHDOG_APPDATA_GROWTH_FILE" 2>/dev/null
|
||||
|
||||
# ━━━ Strike helpers ━━━
|
||||
get_strikes() { grep "^${1}:" "${2}" 2>/dev/null | cut -d: -f2 || echo "0"; }
|
||||
set_strikes() {
|
||||
local key="$1" count="$2" file="$3"
|
||||
if grep -q "^${key}:" "$file" 2>/dev/null; then
|
||||
sed -i "s|^${key}:.*|${key}:${count}|" "$file"
|
||||
else
|
||||
echo "${key}:${count}" >> "$file"
|
||||
fi
|
||||
}
|
||||
|
||||
# ==============================================================================================
|
||||
# ━━━ Status ━━━
|
||||
# ==============================================================================================
|
||||
|
||||
Reference in New Issue
Block a user