Browse Source

Increased retry times

Docker's automated builds fail often because of network failure, so I increased retry counts.
Validating a fresh install also should be a common practice since we aren't losing any customization.
pull/1071/head
Robotex 9 years ago
committed by GitHub
parent
commit
158731cc68
  1. 38
      lgsm/functions/install_server_files.sh

38
lgsm/functions/install_server_files.sh

@ -26,22 +26,21 @@ fn_install_server_files_steamcmd(){
counter=$((counter+1)) counter=$((counter+1))
cd "${rootdir}/steamcmd" cd "${rootdir}/steamcmd"
if [ "${counter}" -le "10" ]; then if [ "${counter}" -le "10" ]; then
# Attempt 1-4: Standard attempt # Attempt 1-10: Validate attempt
# Attempt 5-6: Validate attempt # Attempt 11-12: Validate, delete long name dir
# Attempt 7-8: Validate, delete long name dir # Attempt 13-14: Validate, delete long name dir, re-download SteamCMD
# Attempt 9-10: Validate, delete long name dir, re-download SteamCMD # Attempt 15: Failure
# Attempt 11: Failure
if [ "${counter}" -ge "2" ]; then if [ "${counter}" -ge "2" ]; then
fn_print_warning_nl "SteamCMD did not complete the download, retrying: Attempt ${counter}" fn_print_warning_nl "SteamCMD did not complete the download, retrying: Attempt ${counter}"
fn_script_log "SteamCMD did not complete the download, retrying: Attempt ${counter}" fn_script_log "SteamCMD did not complete the download, retrying: Attempt ${counter}"
fi fi
if [ "${counter}" -ge "7" ]; then if [ "${counter}" -ge "11" ]; then
echo "Removing $(find ${filesdir} -type d -print0 | grep -Ez '[^/]{30}$')" echo "Removing $(find ${filesdir} -type d -print0 | grep -Ez '[^/]{30}$')"
find ${filesdir} -type d -print0 | grep -Ez '[^/]{30}$' | xargs -0 rm -rf find ${filesdir} -type d -print0 | grep -Ez '[^/]{30}$' | xargs -0 rm -rf
fi fi
if [ "${counter}" -ge "9" ]; then if [ "${counter}" -ge "13" ]; then
rm -rf "${rootdir}/steamcmd" rm -rf "${rootdir}/steamcmd"
check_steamcmd.sh check_steamcmd.sh
fi fi
@ -51,24 +50,15 @@ fn_install_server_files_steamcmd(){
unbuffer="stdbuf -i0 -o0 -e0" unbuffer="stdbuf -i0 -o0 -e0"
fi fi
if [ "${counter}" -le "4" ]; then if [ "${engine}" == "goldsource" ]; then
if [ "${engine}" == "goldsource" ]; then ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${branch} -validate +quit
${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${branch} +quit local exitcode=$?
local exitcode=$? else
else ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" ${branch} -validate +quit
${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" ${branch} +quit local exitcode=$?
local exitcode=$?
fi
elif [ "${counter}" -ge "5" ]; then
if [ "${engine}" == "goldsource" ]; then
${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${branch} -validate +quit
local exitcode=$?
else
${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" ${branch} -validate +quit
local exitcode=$?
fi
fi fi
elif [ "${counter}" -ge "11" ]; then
elif [ "${counter}" -ge "15" ]; then
fn_print_failure_nl "SteamCMD did not complete the download, too many retrys" fn_print_failure_nl "SteamCMD did not complete the download, too many retrys"
fn_script_log "SteamCMD did not complete the download, too many retrys" fn_script_log "SteamCMD did not complete the download, too many retrys"
break break

Loading…
Cancel
Save