From 8e07b831a3bf9cdb4742b9f7f2d3f80981850e59 Mon Sep 17 00:00:00 2001 From: rcourtman Date: Wed, 19 Nov 2025 13:37:06 +0000 Subject: [PATCH] fix(docker): always reinstall sensor-proxy to refresh tokens/config Same turnkey UX issue as PVE quick setup: when local sensor-proxy socket exists and validates, install-docker.sh would skip reinstallation (line 498). This left stale control-plane tokens and URLs. Fix: Always reinstall when LOCAL_PROXY_EXISTED_AT_START=true - Track socket existence at script start - Change message: 'will refresh to update tokens/config' - Set SKIP_INSTALLATION=false to force reinstall - Installer is idempotent (Phase 2), safe to rerun This completes the turnkey repair fix across all entry points (PVE quick setup and Docker installer). --- scripts/install-docker.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/install-docker.sh b/scripts/install-docker.sh index 9792425..8dc9bfb 100755 --- a/scripts/install-docker.sh +++ b/scripts/install-docker.sh @@ -464,6 +464,7 @@ BIND_MOUNT_SOCKET="/mnt/pulse-proxy/pulse-sensor-proxy.sock" LOCAL_SOCKET="/run/pulse-sensor-proxy/pulse-sensor-proxy.sock" SOCKET_PATH="" SKIP_INSTALLATION=false +LOCAL_PROXY_EXISTED_AT_START=false echo "Checking for existing pulse-sensor-proxy..." echo "" @@ -492,10 +493,12 @@ fi # Check for existing local installation if [ -S "$LOCAL_SOCKET" ] && [ "$SKIP_INSTALLATION" = false ]; then echo " Found socket at /run/pulse-sensor-proxy (local installation)" + LOCAL_PROXY_EXISTED_AT_START=true if validate_socket "$LOCAL_SOCKET"; then - echo " ✓ Socket is functional" + echo " ✓ Socket is functional - will refresh to update tokens/config" SOCKET_PATH="/run/pulse-sensor-proxy" - SKIP_INSTALLATION=true + # Don't skip installation - always reinstall to refresh tokens + SKIP_INSTALLATION=false else echo " ⚠️ Socket exists but is not responsive - will reinstall" systemctl stop pulse-sensor-proxy 2>/dev/null || true