From fc761e7df40eac828d4e9858fab56958078c928b Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Sat, 26 Sep 2026 12:23:16 +0200 Subject: fix(node): read the packaged TMDB token in place A node onboarded by the desktop client never ran `init`, so default.env was never copied to node.env; and default.env was 0600 root, unreadable to a per-user node anyway. The daemon now loads it beneath node.env, 0644. Co-Authored-By: Claude Opus 5.5 --- packaging/win/build-node-runtime.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'packaging/win') diff --git a/packaging/win/build-node-runtime.ps1 b/packaging/win/build-node-runtime.ps1 index 20eacc8..28c4061 100644 --- a/packaging/win/build-node-runtime.ps1 +++ b/packaging/win/build-node-runtime.ps1 @@ -120,9 +120,9 @@ else { # --- 5. default.env (shared TMDB token) ------------------------------ # Beside the exe, where platform.packaged_default_env() looks for it, and the -# same placement ffmpeg gets above. `meshbay-node init` copies it to -# %LOCALAPPDATA%\meshbay\node.env, and the daemon loads that file itself: -# Windows autostart is a Startup-folder .vbs, with no systemd EnvironmentFile. +# same placement ffmpeg gets above. The daemon reads it in place, beneath +# %LOCALAPPDATA%\meshbay\node.env: Windows autostart is a Startup-folder .vbs, +# with no systemd EnvironmentFile. function Get-TmdbToken([string]$File) { if (-not $File -or -not (Test-Path -LiteralPath $File)) { return "" } $lines = Get-Content -LiteralPath $File @@ -149,7 +149,7 @@ $noBom = New-Object System.Text.UTF8Encoding $false # a BOM would break parsin if ($tmdb) { $body = @( "# Default environment for meshbay-node.", - "# Copied to \node.env by 'meshbay-node init' if it does not exist.", + "# Read by the daemon beneath \node.env; set a value there to override it.", "", "# TMDB API token for the Videos app (read-only, shared across installations)", "MESHBAY_TMDB_DEFAULT_TOKEN=$tmdb" -- cgit v1.2.3