fix(watchdogs): Tailscale false positive + system watchdog banner

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.
This commit is contained in:
Gmer4Lfe
2026-05-24 17:11:54 -04:00
parent 760fb4a3e2
commit b78fdddb04
2 changed files with 4 additions and 2 deletions
+2 -2
View File
@@ -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"
+2
View File
@@ -84,6 +84,8 @@ fi
# ==============================================================================================
# ━━━ Run Sequence ━━━
# ==============================================================================================
echo "━━━ $ICON_SHIELD System Watchdog — $(date '+%Y-%m-%d %H:%M:%S') ━━━"
START=$(date +%s)
PASSED=()
FAILED=()