Procházet zdrojové kódy

fix(install): download SteamCMD games without fn_update_apply (#5093)

install_server_files.sh runs update_steamcmd.sh with forceupdate=1.
Since #5060 that branch calls fn_update_apply, which is defined in
command_update.sh and is not loaded during install, so every SteamCMD
install printed "fn_update_apply: command not found" and only downloaded
the game through the missing appmanifest fallback. It also left an
update.lock behind.

During install, download directly and write last-updated.lock, as before
#5060. force-update still uses fn_update_apply.
Daniel Gibbs před 1 dnem
rodič
revize
2909ed03f0
1 změnil soubory, kde provedl 7 přidání a 2 odebrání
  1. 7 2
      lgsm/modules/update_steamcmd.sh

+ 7 - 2
lgsm/modules/update_steamcmd.sh

@@ -18,8 +18,13 @@ fn_print_dots "${remotelocation}"
 
 if [ "${forceupdate}" == "1" ]; then
 	# forceupdate bypasses update checks.
-	date '+%s' > "${lockdir:?}/update.lock"
-	fn_update_apply fn_dl_steamcmd
+	if [ "${firstcommandname}" == "INSTALL" ]; then
+		fn_dl_steamcmd
+		date +%s > "${lockdir:?}/last-updated.lock"
+	else
+		date '+%s' > "${lockdir:?}/update.lock"
+		fn_update_apply fn_dl_steamcmd
+	fi
 else
 	fn_update_steamcmd_localbuild
 	fn_update_steamcmd_remotebuild