From dd7759027df87b28ff551003d0acaf0973c25906 Mon Sep 17 00:00:00 2001 From: Vish Date: Mon, 19 Jan 2026 07:05:59 +0000 Subject: [PATCH] Add SteamCMD platform type flag to fix installation - Added +@sSteamCmdForcePlatformType linux to install and update scripts - Added retry logic for failed installations --- install.sh | 13 ++++++++++++- scripts/update.sh | 3 ++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index a2b4550..15b6e0a 100755 --- a/install.sh +++ b/install.sh @@ -119,11 +119,22 @@ install_gmod_server() { cd "$STEAMCMD_DIR" - ./steamcmd.sh +force_install_dir "$SERVER_DIR" \ + # Force Linux platform and install + ./steamcmd.sh +@sSteamCmdForcePlatformType linux \ + +force_install_dir "$SERVER_DIR" \ +login anonymous \ +app_update 4020 validate \ +quit + if [[ $? -ne 0 ]]; then + log_warning "First attempt failed, retrying..." + ./steamcmd.sh +@sSteamCmdForcePlatformType linux \ + +force_install_dir "$SERVER_DIR" \ + +login anonymous \ + +app_update 4020 \ + +quit + fi + log_success "Garry's Mod server installed." } diff --git a/scripts/update.sh b/scripts/update.sh index 48f0ff9..9f1f48c 100755 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -42,7 +42,8 @@ fi # Update Garry's Mod Server log_info "Updating Garry's Mod server..." cd "$STEAMCMD_DIR" -./steamcmd.sh +force_install_dir "$SERVER_DIR" \ +./steamcmd.sh +@sSteamCmdForcePlatformType linux \ + +force_install_dir "$SERVER_DIR" \ +login anonymous \ +app_update 4020 validate \ +quit