diff --git a/games/arma3/Dockerfile b/games/arma3/Dockerfile index f5231ff..e478184 100644 --- a/games/arma3/Dockerfile +++ b/games/arma3/Dockerfile @@ -17,7 +17,7 @@ RUN dpkg --add-architecture i386 \ iproute2 \ gettext-base \ ca-certificates \ - numactl \ + numactl \ libssl-dev \ lib32gcc-s1 \ libsdl2-2.0-0 \ diff --git a/games/arma3/entrypoint.sh b/games/arma3/entrypoint.sh index 289935a..de777be 100644 --- a/games/arma3/entrypoint.sh +++ b/games/arma3/entrypoint.sh @@ -8,6 +8,7 @@ ## === CONSTANTS === STEAMCMD_DIR="./steamcmd" # SteamCMD's directory containing steamcmd.sh +WORKSHOP_DIR="./Steam/steamapps/workshop" # SteamCMD's directory containing workshop downloads STEAMCMD_LOG="${STEAMCMD_DIR}/steamcmd.log" # Log file for SteamCMD GAME_ID=107410 # SteamCMD ID for the Arma 3 GAME (not server). Only used for Workshop mod downloads. EGG_URL='https://github.com/parkervcp/eggs/tree/master/game_eggs/steamcmd_servers/arma/arma3' # URL for Pterodactyl Egg & Info (only used as info to legacy users) @@ -105,8 +106,8 @@ function RunSteamCMD { #[Input: int server=0 mod=1 optional_mod=2; int id] # Move the downloaded mod to the root directory, and replace existing mod if needed mkdir -p ./@$2 rm -rf ./@$2/* - mv -f ./Steam/steamapps/workshop/content/$GAME_ID/$2/* ./@$2 - rm -d ./Steam/steamapps/workshop/content/$GAME_ID/$2 + mv -f ${WORKSHOP_DIR}/content/$GAME_ID/$2/* ./@$2 + rm -d ${WORKSHOP_DIR}/content/$GAME_ID/$2 # Make the mods contents all lowercase ModsLowercase @$2 # Move any .bikey's to the keys directory @@ -282,8 +283,12 @@ if [[ ${UPDATE_SERVER} == 1 ]]; then if [[ -n $latestUpdate ]] && [[ $latestUpdate =~ ^[0-9]+$ ]]; then # Notify last update date, if valid echo -e "\tMod was last updated: ${CYAN}$(date -d @${latestUpdate})${NC}" fi + + # Delete SteamCMD appworkshop cache before running to avoid mod download failures + echo -e "\tClearing SteamCMD appworkshop cache..." + rm -f ${WORKSHOP_DIR}/appworkshop_$GAME_ID.acf + echo -e "\tAttempting mod update/download via SteamCMD...\n" - RunSteamCMD $modType $modID fi fi