Преглед изворни кода

fix(steamcmd): re-validate GoldSrc when shared content is missing (#5162)

SteamCMD sometimes uninstalls the shared AppID 70 and AppID 10 depots
during an AppID 90 update or validate and still reports success. The
server is left without valve/valve.rc and never loads a map.

After a successful AppID 90 run, check for appmanifest_70.acf and, if it
is missing, run SteamCMD once more with validate.

Fixes #5161
Daniel Gibbs пре 2 дана
родитељ
комит
04307ef20d
1 измењених фајлова са 7 додато и 0 уклоњено
  1. 7 0
      lgsm/modules/core_dl.sh

+ 7 - 0
lgsm/modules/core_dl.sh

@@ -76,6 +76,7 @@ fn_dl_steamcmd() {
 	steamcmdlog="${lgsmlogdir}/${selfname}-steamcmd.log"
 
 	local invalidplatformworkaround=""
+	local goldsrcshareddepotretry=""
 	counter=0
 	while [ "${counter}" -eq 0 ] || [ "${exitcode}" -ne 0 ]; do
 		counter=$((counter + 1))
@@ -215,6 +216,12 @@ fn_dl_steamcmd() {
 		elif [ "${exitcode}" -ne 0 ]; then
 			fn_print_error2_nl "${commandaction} ${selfname}: ${remotelocation}: Exit code: ${exitcode}"
 			fn_script_log_error "${commandaction} ${selfname}: ${remotelocation}: Exit code: ${exitcode}"
+		elif [ "${appid}" == "90" ] && [ ! -f "${serverfiles}/steamapps/appmanifest_70.acf" ] && [ -z "${goldsrcshareddepotretry}" ]; then
+			goldsrcshareddepotretry="1"
+			fn_print_error2_nl "${commandaction} ${selfname}: ${remotelocation}: Half-Life shared content (AppID 70) is missing - validating"
+			fn_script_log_error "${commandaction} ${selfname}: ${remotelocation}: Half-Life shared content (AppID 70) is missing - validating"
+			validateparam=("validate")
+			counter=0
 		else
 			fn_print_success_nl "${commandaction} ${selfname}: ${remotelocation}"
 			fn_script_log_pass "${commandaction} ${selfname}: ${remotelocation}"