fix: restore config URL sync — socket.url now correctly set to wss://ws.epicnabbo.nl

sync_configs() was missing the Python URL fix that patches:
- socket.url → wss://ws.epicnabbo.nl
- api.url, image.library.url, gamedata.url, etc.

This caused renderer-config.json and ui-config.json to have broken wss://ws. values.

Now sync_configs() applies the URL fix after copying .example files.
Verified: socket.url=wss://ws.epicnabbo.nl in both public/ and dist/ configs.
This commit is contained in:
root
2026-06-25 20:50:26 +02:00
parent 492768b5d9
commit b512328ac6
+32
View File
@@ -358,6 +358,38 @@ sync_configs() {
ec=$((ec+1))
done
ok "$ec config file(s) synced"
info "Applying critical config URLs..."
NITRO_SRC_DIR="$NITRO_SRC_DIR" NITRO_DIST_CONFIG_DIR="$dcd" \
NITRO_IMAGE_LIBRARY_URL="$NITRO_IMAGE_LIBRARY_URL" NITRO_HOF_FURNITURE_URL="$NITRO_HOF_FURNITURE_URL" \
NITRO_API_URL="$NITRO_API_URL" NITRO_SOCKET_URL="$NITRO_SOCKET_URL" \
NITRO_GAMEDATA_URL="$NITRO_GAMEDATA_URL" NITRO_ASSET_URL="$NITRO_ASSET_URL" \
NITRO_FURNI_ASSET_ICON_URL="$NITRO_FURNI_ASSET_ICON_URL" \
python3 -c '
import json, os
paths = [
os.path.join(os.environ.get("NITRO_SRC_DIR", ""), "renderer-config.json"),
os.path.join(os.environ.get("NITRO_DIST_CONFIG_DIR", ""), "renderer-config.json"),
os.path.join(os.environ.get("NITRO_SRC_DIR", ""), "ui-config.json"),
os.path.join(os.environ.get("NITRO_DIST_CONFIG_DIR", ""), "ui-config.json"),
]
for path in paths:
if not os.path.exists(path): continue
with open(path, "r") as f: data = json.load(f)
for key in ["image.library.url", "hof.furni.url", "gamedata.url", "asset.url"]:
env_val = os.environ.get(f"NITRO_{key.upper().replace(chr(46), chr(95))}")
if env_val: data[key] = env_val
for key in ["api.url", "socket.url", "furni.asset.icon.url"]:
if key in data:
env_val = os.environ.get(f"NITRO_{key.upper().replace(chr(46), chr(95))}")
if env_val: data[key] = env_val
if "gamedata.url" in data:
data["radio.url"] = data["gamedata.url"] + "/config/radio-stations.json5?t=%timestamp%"
data["soundboard.url"] = data["gamedata.url"] + "/config/soundboard-sounds.json5?t=%timestamp%"
if "show.google.ads" in data: data["show.google.ads"] = False
with open(path, "w") as f: json.dump(data, f, indent=(4 if "dist" not in path else None), separators=(",", ":") if "dist" in path else (",", ": "))
print(f" [OK] Fixed: {os.path.basename(path)}")
' && ok "All config URLs synced"
}
do_cleanup() {