From 4e2c4ccf0712419579c6edee08228a68b7865d94 Mon Sep 17 00:00:00 2001 From: openhands Date: Sat, 25 Jul 2026 21:21:45 +0200 Subject: [PATCH] Add sudo chown -R www-data:www-data /var/www/Nitro-V3/ at end of update to fix permissions after build --- update-Nitrov3.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/update-Nitrov3.sh b/update-Nitrov3.sh index 1db59b9d05..c8a455b506 100755 --- a/update-Nitrov3.sh +++ b/update-Nitrov3.sh @@ -1258,7 +1258,13 @@ do_restart() { # Probe the emulator's configured TCP port to confirm it is actually serving, # not merely that systemd reports the unit as active. emulator_port_open() { - local port="${NITRO_EMULATOR_PORT:-30000}" + local port="${NITRO_EMULATOR_PORT:-}" + if [ -z "$port" ]; then + port=$(grep -m1 '^game\.port=' "$EMULATOR_DIR/Emulator/target/config.ini" 2>/dev/null | cut -d= -f2) + fi + if [ -z "$port" ]; then + port=30000 + fi if command -v redis-cli >/dev/null 2>&1; then local p; p=$(redis-cli GET nitro:emulator:port 2>/dev/null) [ -n "$p" ] && port="$p" @@ -1348,6 +1354,7 @@ cmd_update() { esac show_summary + sudo chown -R www-data:www-data /var/www/Nitro-V3/ release_lock }