From 4ac60e14a36a98c15aa01b129f95a549ac055df2 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 8 Sep 2026 12:38:45 +0000 Subject: [PATCH] no-mistakes(review): fix zulip-monitor Tanko probe fallback-echo contamination in down detection --- scripts/zulip-monitor.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/zulip-monitor.sh b/scripts/zulip-monitor.sh index 5596c5c..207cc2b 100755 --- a/scripts/zulip-monitor.sh +++ b/scripts/zulip-monitor.sh @@ -73,9 +73,11 @@ fi # 127.0.0.1:3080 loopback-only by design — a remote :3080 probe is refused and # is NOT a fault. TANKO_SVC=$(ssh -o StrictHostKeyChecking=no -o ConnectTimeout=5 root@192.168.68.15 \ - "pct exec 112 -- systemctl is-active dsh-web" 2>/dev/null || echo "unknown") + "pct exec 112 -- systemctl is-active dsh-web" 2>/dev/null || true) +[ -n "$TANKO_SVC" ] || TANKO_SVC="unknown" TANKO_HTTP=$(ssh -o StrictHostKeyChecking=no -o ConnectTimeout=5 root@192.168.68.15 \ - "pct exec 112 -- curl -s --connect-timeout 5 --max-time 10 -o /dev/null -w '%{http_code}' http://127.0.0.1:3080/" 2>/dev/null || echo "000") + "pct exec 112 -- curl -s --connect-timeout 5 --max-time 10 -o /dev/null -w '%{http_code}' http://127.0.0.1:3080/" 2>/dev/null || true) +[ -n "$TANKO_HTTP" ] || TANKO_HTTP="000" if [ "$TANKO_SVC" != "active" ]; then notify "🔴" "Tanko (DSH dsh-web) service state: $TANKO_SVC — needs restart"