From ed049263aaff9c3d31bdb8455a50f23e4364f44f Mon Sep 17 00:00:00 2001 From: rcourtman Date: Wed, 19 Nov 2025 12:52:08 +0000 Subject: [PATCH] fix(setup): always reinstall sensor-proxy to refresh tokens and config When sensor-proxy socket is detected, the setup script was skipping temperature monitoring setup with 'already configured' message. This left stale control plane URLs/tokens, breaking temperature monitoring. Now follows Codex recommendation: treat existing installations as upgrade/repair opportunities. The installer is idempotent (Phase 2), so rerunning it safely refreshes tokens, updates URLs, and ensures turnkey operation even on hosts with existing installations. Changes: - Remove early return when sensor-proxy socket detected - Set TEMPERATURE_ENABLED=true to proceed with reinstall - Update message to clarify repair/upgrade behavior - Maintains turnkey promise: rerun setup and it just works --- internal/api/config_handlers.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/api/config_handlers.go b/internal/api/config_handlers.go index b4a0291..31dd545 100644 --- a/internal/api/config_handlers.go +++ b/internal/api/config_handlers.go @@ -4289,9 +4289,9 @@ fi # Single temperature monitoring prompt if [ "$SKIP_TEMPERATURE_PROMPT" = true ]; then - echo "Temperature monitoring is already configured via pulse-sensor-proxy on this host." - echo "Pulse will collect temperatures as soon as you finish the setup wizard." + echo "Existing pulse-sensor-proxy detected—running repair to refresh tokens and control-plane settings..." echo "" + TEMPERATURE_ENABLED=true elif [ "$SSH_ALREADY_CONFIGURED" = true ]; then TEMPERATURE_ENABLED=true echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"