From 91d6be1a66b9565157573b179a17a9a1360d471c Mon Sep 17 00:00:00 2001 From: velimir3 Date: Thu, 23 Apr 2026 08:10:45 +0200 Subject: [PATCH] Retry steamcmd install up to 5 times if server executable is not found. --- entrypoint.sh | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) 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