diff --git a/entrypoint.sh b/entrypoint.sh index 2e67b10..3bb26f1 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -18,12 +18,22 @@ AdditionalArgs="${AdditionalArgs:-}" # Check for updates/perform initial installation if [ ! -d "/server/AbioticFactor/Binaries/Win64" ] || [[ $AutoUpdate == "true" ]]; then - steamcmd \ - +@sSteamCmdForcePlatformType windows \ - +force_install_dir /server \ - +login anonymous \ - +app_update 2857200 validate \ - +quit + for attempt in $(seq 1 5); do + steamcmd \ + +@sSteamCmdForcePlatformType windows \ + +force_install_dir /server \ + +login anonymous \ + +app_update 2857200 validate \ + +quit + if [ -f "/server/AbioticFactor/Binaries/Win64/AbioticFactorServer-Win64-Shipping.exe" ]; then + break + fi + echo "Attempt $attempt/5: executable not found after steamcmd, retrying..." + if [ "$attempt" -eq 5 ]; then + echo "Failed to install server executable after 5 attempts, exiting." + exit 1 + fi + done fi pushd /server/AbioticFactor/Binaries/Win64 > /dev/null