From 2045bcfdd6af30bf3c3c28e891058541d98122ba Mon Sep 17 00:00:00 2001 From: rcourtman Date: Sat, 18 Oct 2025 20:21:02 +0000 Subject: [PATCH] fix: detect containerized Pulse with healthy status Fixes container detection when Docker health checks are enabled. Previously, the setup script only matched "running" status exactly, causing it to skip containers showing "running (healthy)" status. This prevented: - Proper detection of containerized Pulse installations - pulse-sensor-proxy installation for temperature monitoring - Temperature data collection for affected users The fix captures the full status output and searches for "running" anywhere in the output, supporting all status variations: - status: running - status: running (healthy) - status: running (unhealthy) Related to #101 --- internal/api/config_handlers.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/api/config_handlers.go b/internal/api/config_handlers.go index 9fe1ad3..533e215 100644 --- a/internal/api/config_handlers.go +++ b/internal/api/config_handlers.go @@ -3677,7 +3677,9 @@ if command -v pct >/dev/null 2>&1; then # Check all containers for matching IP for CTID in $(pct list | awk 'NR>1 {print $1}'); do # Verify container is running before attempting connection - if ! pct status "$CTID" 2>/dev/null | grep -q "running"; then + # Note: status can be "running", "running (healthy)", or "running (unhealthy)" + CT_STATUS=$(pct status "$CTID" 2>/dev/null || echo "") + if ! echo "$CT_STATUS" | grep -q "running"; then continue fi