diff options
Diffstat (limited to 'packaging/build')
| -rwxr-xr-x | packaging/build/build-node.sh | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/packaging/build/build-node.sh b/packaging/build/build-node.sh index 8970176..fde67a5 100755 --- a/packaging/build/build-node.sh +++ b/packaging/build/build-node.sh @@ -45,8 +45,10 @@ ln -sf /opt/meshbay-common/venv/bin/meshbay-node "$ROOT/usr/bin/meshbay-node" # --- Node-specific assets ------------------------------------------------- mkdir -p "$ROOT/opt/meshbay-node/share" -# Default env with the shared TMDB token, read at build time and copied to -# <config>/node.env by `meshbay-node init`. +# Default env with the shared TMDB token, read at build time. The daemon reads +# it in place, beneath <config>/node.env, so it must be readable by whoever runs +# the node -- 0600 root made it unreadable to every per-user node. It is the +# same token in every copy of the package, so 0644 hides nothing. # # tmdb.py sends `Authorization: Bearer`, so this is the v4 *read access token* # (a JWT, "eyJ..."), not the 32-char v3 API key that sits beside it in the same @@ -72,13 +74,12 @@ fi if [ -n "$TMDB_TOKEN" ]; then cat > "$ROOT/opt/meshbay-node/share/default.env" <<EOF # Default environment for meshbay-node. -# Copied to <config>/node.env by 'meshbay-node init' if it does not exist. -# The operator may override any value there or in the systemd EnvironmentFile. +# Read by the daemon beneath <config>/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_TOKEN EOF - chmod 600 "$ROOT/opt/meshbay-node/share/default.env" + chmod 644 "$ROOT/opt/meshbay-node/share/default.env" echo " TMDB token baked into default.env (${#TMDB_TOKEN} chars)" elif [ "${MESHBAY_ALLOW_NO_TMDB:-0}" = "1" ]; then echo " !! no TMDB token; default.env left empty (MESHBAY_ALLOW_NO_TMDB=1)" >&2 |