From b78fdddb04f1f0fd773d01888902619111440c97 Mon Sep 17 00:00:00 2001 From: Gmer4Lfe Date: Sun, 24 May 2026 17:11:54 -0400 Subject: [PATCH] fix(watchdogs): Tailscale false positive + system watchdog banner MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit network_watchdog: Tailscale JSON uses "BackendState": "Running" (with space) but grep pattern matched "BackendState":"Running" (no space) — always failed. Switched to grep -qE with \s* to handle both forms. system_watchdog: add echo banner at run start so its output is visually separated from docker_watchdog in orchestrator logs. Previously appeared as a continuation of the docker section since docker_watchdog has a banner but system_watchdog did not. --- Watchdogs/System/network_watchdog.sh | 4 ++-- Watchdogs/system_watchdog.sh | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Watchdogs/System/network_watchdog.sh b/Watchdogs/System/network_watchdog.sh index 393d2d7..c15e757 100755 --- a/Watchdogs/System/network_watchdog.sh +++ b/Watchdogs/System/network_watchdog.sh @@ -173,7 +173,7 @@ if [[ "$SHOW_STATUS" == true ]]; then fi if [[ "${NETWORK_WATCHDOG_CHECK_TAILSCALE:-true}" == "true" ]] && command -v tailscale >/dev/null 2>&1; then - if tailscale status --json 2>/dev/null | grep -q '"BackendState":"Running"'; then + if tailscale status --json 2>/dev/null | grep -qE '"BackendState":\s*"Running"'; then echo " $ICON_SUCCESS Tailscale: running" else echo " $ICON_ERROR Tailscale: NOT running" @@ -254,7 +254,7 @@ fi if [[ "${NETWORK_WATCHDOG_CHECK_TAILSCALE:-true}" == "true" ]]; then if ! command -v tailscale >/dev/null 2>&1; then log "Tailscale not installed — skipping" - elif tailscale status --json 2>/dev/null | grep -q '"BackendState":"Running"'; then + elif tailscale status --json 2>/dev/null | grep -qE '"BackendState":\s*"Running"'; then log "$ICON_SUCCESS Tailscale running" else warn "$ICON_ERROR Tailscale not in Running state" diff --git a/Watchdogs/system_watchdog.sh b/Watchdogs/system_watchdog.sh index c308d3d..7332e67 100755 --- a/Watchdogs/system_watchdog.sh +++ b/Watchdogs/system_watchdog.sh @@ -84,6 +84,8 @@ fi # ============================================================================================== # ━━━ Run Sequence ━━━ # ============================================================================================== +echo "━━━ $ICON_SHIELD System Watchdog — $(date '+%Y-%m-%d %H:%M:%S') ━━━" + START=$(date +%s) PASSED=() FAILED=()