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