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).
This commit is contained in:
parent
69133b45fc
commit
8e07b831a3
1 changed files with 5 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue