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
This commit is contained in:
rcourtman 2025-10-18 20:21:02 +00:00
parent cfdfe896be
commit 2045bcfdd6

View file

@ -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