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
This commit is contained in:
rcourtman 2025-11-19 12:52:08 +00:00
parent c5c1d64a7b
commit ed049263aa

View file

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