Fix \#142: New steamcmd error handling
This commit is contained in:
parent
7d72ca4125
commit
c225ca3f01
1 changed files with 22 additions and 2 deletions
|
@ -24,12 +24,32 @@ else
|
||||||
VALIDATE=""
|
VALIDATE=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
## SteamCMD can fail to download
|
||||||
|
## Retry logic
|
||||||
|
MAX_ATTEMPTS=3
|
||||||
|
attempt=0
|
||||||
|
while [[ $steamcmd_rc != 0 ]] && [[ $attempt -lt $MAX_ATTEMPTS ]]; do
|
||||||
|
((attempt+=1))
|
||||||
|
if [[ $attempt -gt 1 ]]; then
|
||||||
|
echo "Retrying SteamCMD, attempt ${attempt}"
|
||||||
|
# Stale appmanifest data can lead for HTTP 401 errors when requesting old
|
||||||
|
# files from SteamPipe CDN
|
||||||
|
echo "Removing steamapps (appmanifest data)..."
|
||||||
|
rm -rf "${STEAMAPPDIR}/steamapps"
|
||||||
|
fi
|
||||||
eval bash "${STEAMCMDDIR}/steamcmd.sh" "${STEAMCMD_SPEW}"\
|
eval bash "${STEAMCMDDIR}/steamcmd.sh" "${STEAMCMD_SPEW}"\
|
||||||
+force_install_dir "${STEAMAPPDIR}" \
|
+force_install_dir "${STEAMAPPDIR}" \
|
||||||
+@bClientTryRequestManifestWithoutCode 1 \
|
+@bClientTryRequestManifestWithoutCode 1 \
|
||||||
+login anonymous \
|
+login anonymous \
|
||||||
+app_update "${STEAMAPPID}" "${VALIDATE}"\
|
+app_update "${STEAMAPPID}" "${VALIDATE}"\
|
||||||
+quit || exit $?
|
+quit
|
||||||
|
steamcmd_rc=$?
|
||||||
|
done
|
||||||
|
|
||||||
|
## Exit if steamcmd fails
|
||||||
|
if [[ $steamcmd_rc != 0 ]]; then
|
||||||
|
exit $steamcmd_rc
|
||||||
|
fi
|
||||||
|
|
||||||
# steamclient.so fix
|
# steamclient.so fix
|
||||||
mkdir -p ~/.steam/sdk64
|
mkdir -p ~/.steam/sdk64
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue