From 06d7e95dc04b6264b6a3bba98d2ce466bf641cf3 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 26 Jun 2026 02:33:26 +0000 Subject: [PATCH] kyber-server: prompt for manual SWBF2 path if not found via Steam Instead of hard-failing, show an rsync example for copying game files from another machine, then prompt for the path. Validates that starwarsbattlefrontii.exe exists at the given location before continuing. Also silence "register_service: command not found" in all three services when run standalone (guard with command -v check). Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_01D8ckUJQtj1pH8jtAddBDZs --- services/kyber-launcher.sh | 3 ++- services/kyber-server.sh | 31 ++++++++++++++++++++----------- services/sunshine.sh | 3 ++- 3 files changed, 24 insertions(+), 13 deletions(-) diff --git a/services/kyber-launcher.sh b/services/kyber-launcher.sh index 8a3ed86..657419c 100644 --- a/services/kyber-launcher.sh +++ b/services/kyber-launcher.sh @@ -30,7 +30,8 @@ # Without the fix: bwrap: setting up uid map: Permission denied # ── Registration ────────────────────────────────────────────────────────────── -register_service kyber-launcher gaming "Kyber Launcher — native Linux AppImage for SWBF2 (2017) multiplayer (requires discrete GPU)" +command -v register_service &>/dev/null && \ + register_service kyber-launcher gaming "Kyber Launcher — native Linux AppImage for SWBF2 (2017) multiplayer (requires discrete GPU)" # ── Install function ────────────────────────────────────────────────────────── install_kyber_launcher() { diff --git a/services/kyber-server.sh b/services/kyber-server.sh index 31047b2..ad244cd 100644 --- a/services/kyber-server.sh +++ b/services/kyber-server.sh @@ -20,7 +20,8 @@ # and set KYBER_MAP_ROTATION to a base64-encoded rotation string (use the Kyber client # HOST tab to build a rotation, then base64-encode it). # ── Registration ────────────────────────────────────────────────────────────── -register_service kyber-server gaming "Kyber dedicated server for SWBF2 (2017) — headless, no GPU required" +command -v register_service &>/dev/null && \ + register_service kyber-server gaming "Kyber dedicated server for SWBF2 (2017) — headless, no GPU required" # ── Helpers ─────────────────────────────────────────────────────────────────── @@ -131,18 +132,26 @@ install_kyber_server() { SWBF2_PATH=$(_kyber_find_swbf2) if [[ -z "$SWBF2_PATH" ]]; then + log_warning "SWBF2 not found in standard Steam paths." echo "" - echo " ╔══════════════════════════════════════════════════════════════╗" - echo " ║ ERROR: Star Wars Battlefront II (2017) not found. ║" - echo " ║ ║" - echo " ║ Install it first: ║" - echo " ║ 1. Install Steam: https://store.steampowered.com ║" - echo " ║ 2. In Steam, install SWBF2 (AppID 1237950): ║" - echo " ║ steam://install/1237950 ║" - echo " ║ 3. Re-run this installer once the download completes. ║" - echo " ╚══════════════════════════════════════════════════════════════╝" + echo " The dedicated server mounts the game files read-only — no Steam or EA" + echo " authentication needed at runtime. You can copy the game folder from" + echo " another machine that has SWBF2 installed:" echo "" - return 1 + echo " rsync -av --progress \\" + echo " '/path/to/STAR WARS Battlefront II/' \\" + echo " user@thisserver:/home/user/swbf2/" + echo "" + prompt_text "Enter the full path to the SWBF2 game folder (or leave blank to abort):" "" SWBF2_PATH + if [[ -z "$SWBF2_PATH" ]]; then + log_error "No path provided — cannot continue without game files." + return 1 + fi + if [[ ! -f "$SWBF2_PATH/starwarsbattlefrontii.exe" ]]; then + log_error "starwarsbattlefrontii.exe not found in: $SWBF2_PATH" + log_error "Make sure you pointed to the root of the SWBF2 install folder." + return 1 + fi fi log_success "Found SWBF2 at: $SWBF2_PATH" diff --git a/services/sunshine.sh b/services/sunshine.sh index f4171a1..f211a82 100644 --- a/services/sunshine.sh +++ b/services/sunshine.sh @@ -31,7 +31,8 @@ # Moonlight shows it as a launchable app. The Kyber AppImage must already # be installed (run setup-kyber-linux.sh first). # ── Registration ────────────────────────────────────────────────────────── -register_service sunshine homelab "Sunshine game streaming host for Moonlight clients (coexists with Wolf on offset ports)" +command -v register_service &>/dev/null && \ + register_service sunshine homelab "Sunshine game streaming host for Moonlight clients (coexists with Wolf on offset ports)" # ── Install function ────────────────────────────────────────────────────── install_sunshine() {