Add SteamCMD platform type flag to fix installation
- Added +@sSteamCmdForcePlatformType linux to install and update scripts - Added retry logic for failed installations
This commit is contained in:
13
install.sh
13
install.sh
@@ -119,11 +119,22 @@ install_gmod_server() {
|
|||||||
|
|
||||||
cd "$STEAMCMD_DIR"
|
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 \
|
+login anonymous \
|
||||||
+app_update 4020 validate \
|
+app_update 4020 validate \
|
||||||
+quit
|
+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."
|
log_success "Garry's Mod server installed."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,8 @@ fi
|
|||||||
# Update Garry's Mod Server
|
# Update Garry's Mod Server
|
||||||
log_info "Updating Garry's Mod server..."
|
log_info "Updating Garry's Mod server..."
|
||||||
cd "$STEAMCMD_DIR"
|
cd "$STEAMCMD_DIR"
|
||||||
./steamcmd.sh +force_install_dir "$SERVER_DIR" \
|
./steamcmd.sh +@sSteamCmdForcePlatformType linux \
|
||||||
|
+force_install_dir "$SERVER_DIR" \
|
||||||
+login anonymous \
|
+login anonymous \
|
||||||
+app_update 4020 validate \
|
+app_update 4020 validate \
|
||||||
+quit
|
+quit
|
||||||
|
|||||||
Reference in New Issue
Block a user