4
0

core_steamcmd.sh 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430
  1. #!/bin/bash
  2. # LinuxGSM core_steamcmd.sh module
  3. # Author: Daniel Gibbs
  4. # Contributors: https://linuxgsm.com/contrib
  5. # Website: https://linuxgsm.com
  6. # Description: Core modules for SteamCMD
  7. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
  8. fn_install_steamcmd() {
  9. if [ "${shortname}" == "ark" ] && [ "${installsteamcmd}" == "1" ]; then
  10. steamcmddir="${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux"
  11. fi
  12. if [ ! -d "${steamcmddir}" ]; then
  13. mkdir -p "${steamcmddir}"
  14. fi
  15. fn_fetch_file "http://media.steampowered.com/client/steamcmd_linux.tar.gz" "" "" "" "${tmpdir}" "steamcmd_linux.tar.gz" "nochmodx" "norun" "noforce" "nohash"
  16. fn_dl_extract "${tmpdir}" "steamcmd_linux.tar.gz" "${steamcmddir}"
  17. chmod +x "${steamcmddir}/steamcmd.sh"
  18. }
  19. fn_check_steamcmd_user() {
  20. # Checks if steamuser is setup.
  21. if [ "${steamuser}" == "username" ]; then
  22. fn_print_fail_nl "Steam login not set. Update steamuser in ${configdirserver}"
  23. fn_print_nl " * Change steamuser=\"username\" to a valid steam login."
  24. if [ -d "${lgsmlogdir}" ]; then
  25. fn_script_log_fail "Steam login not set. Update steamuser in ${configdirserver}"
  26. fi
  27. core_exit.sh
  28. fi
  29. # Anonymous user is set if steamuser is missing.
  30. if [ -z "${steamuser}" ]; then
  31. if [ -d "${lgsmlogdir}" ]; then
  32. fn_script_log_info "Using anonymous Steam login"
  33. fi
  34. steamuser="anonymous"
  35. steampass=''
  36. fi
  37. }
  38. fn_check_steamcmd() {
  39. # Checks if SteamCMD exists when starting or updating a server.
  40. # Only install if steamcmd package is missing or steamcmd dir is missing.
  41. if [ ! -f "${steamcmddir}/steamcmd.sh" ] && [ -z "$(command -v steamcmd 2> /dev/null)" ]; then
  42. if [ "${commandname}" == "INSTALL" ]; then
  43. fn_print_nl "install SteamCMD"
  44. fn_install_steamcmd
  45. else
  46. fn_print_warn_nl "SteamCMD is not installed"
  47. fn_script_log_warn "SteamCMD is not installed"
  48. fn_install_steamcmd
  49. fi
  50. elif [ "${commandname}" == "INSTALL" ]; then
  51. fn_print "install SteamCMD"
  52. fn_print_skip_eol_nl
  53. fi
  54. }
  55. fn_check_steamcmd_dir() {
  56. # Worksround that pre-installs the correct steam directories to ensure all packages use the correct Standard.
  57. # https://github.com/ValveSoftware/steam-for-linux/issues/6976#issuecomment-610446347
  58. # Create Steam installation directory.
  59. if [ ! -d "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" ]; then
  60. mkdir -p "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam"
  61. fi
  62. # Create common Steam directory.
  63. if [ ! -d "${HOME}/.steam" ]; then
  64. mkdir -p "${HOME}/.steam"
  65. fi
  66. # Symbolic links to Steam installation directory.
  67. if [ ! -L "${HOME}/.steam/root" ]; then
  68. if [ -d "${HOME}/.steam/root" ]; then
  69. rm -f "${HOME:?}/.steam/root"
  70. fi
  71. ln -s "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" "${HOME}/.steam/root"
  72. fi
  73. if [ ! -L "${HOME}/.steam/steam" ]; then
  74. if [ -d "${HOME}/.steam/steam" ]; then
  75. rm -rf "${HOME}/.steam/steam"
  76. fi
  77. ln -s "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" "${HOME}/.steam/steam"
  78. fi
  79. }
  80. fn_check_steamcmd_dir_legacy() {
  81. # Remove old Steam installation directories ~/Steam and ${rootdir}/steamcmd
  82. if [ -d "${rootdir}/steamcmd" ] && [ "${steamcmddir}" == "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" ]; then
  83. rm -rf "${rootdir:?}/steamcmd"
  84. fi
  85. if [ -d "${HOME}/Steam" ] && [ "${steamcmddir}" == "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" ]; then
  86. rm -rf "${HOME}/Steam"
  87. fi
  88. }
  89. fn_check_steamcmd_steamapp() {
  90. # Check that steamapp directory fixes issue #3481
  91. if [ ! -d "${serverfiles}/steamapps" ]; then
  92. mkdir -p "${serverfiles}/steamapps"
  93. fi
  94. }
  95. fn_check_steamcmd_ark() {
  96. # Checks if SteamCMD exists in
  97. # Engine/Binaries/ThirdParty/SteamCMD/Linux
  98. # to allow ark mods to work
  99. if [ ! -f "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamcmd.sh" ]; then
  100. installsteamcmd=1
  101. if [ "${commandname}" == "INSTALL" ]; then
  102. fn_install_steamcmd
  103. else
  104. fn_print_warn_nl "ARK mods SteamCMD is missing"
  105. fn_script_log_warn "ARK mods SteamCMD is missing"
  106. fn_install_steamcmd
  107. fi
  108. elif [ "${commandname}" == "INSTALL" ]; then
  109. fn_print_information "ARK mods SteamCMD is already installed..."
  110. fn_print_ok_eol_nl
  111. fi
  112. }
  113. fn_check_steamcmd_clear() {
  114. # Will remove steamcmd dir if steamcmd package is installed.
  115. if [ "$(command -v steamcmd 2> /dev/null)" ] && [ -d "${rootdir}/steamcmd" ]; then
  116. rm -rf "${steamcmddir:?}"
  117. exitcode=$?
  118. if [ "${exitcode}" -ne 0 ]; then
  119. fn_script_log_fail "Removing ${rootdir}/steamcmd"
  120. else
  121. fn_script_log_pass "Removing ${rootdir}/steamcmd"
  122. fi
  123. fi
  124. }
  125. fn_check_steamcmd_exec() {
  126. if [ "$(command -v steamcmd 2> /dev/null)" ]; then
  127. steamcmdcommand="steamcmd"
  128. else
  129. steamcmdcommand="./steamcmd.sh"
  130. fi
  131. }
  132. fn_update_steamcmd_localbuild() {
  133. # Gets local build info.
  134. fn_print_dots "Checking local build: ${remotelocation}"
  135. fn_check_steamcmd_appmanifest
  136. # Uses appmanifest to find local build.
  137. localbuild=$(grep buildid "${appmanifestfile}" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -d\ -f3)
  138. # Checks if localbuild variable has been set.
  139. if [ -z "${localbuild}" ]; then
  140. fn_print_fail "Checking local build: ${remotelocation}: missing local build info"
  141. fn_script_log_fail "Missing local build info"
  142. core_exit.sh
  143. else
  144. fn_print_ok "Checking local build: ${remotelocation}"
  145. fn_script_log_pass "Checking local build"
  146. fi
  147. }
  148. fn_update_steamcmd_remotebuild() {
  149. # Gets remote build info.
  150. if [ -d "${steamcmddir}" ]; then
  151. cd "${steamcmddir}" || exit
  152. fi
  153. # Removes appinfo.vdf as a fix for not always getting up to date version info from SteamCMD.
  154. if [ "$(find "${HOME}" -type f -name "appinfo.vdf" 2> /dev/null | wc -l)" -ne "0" ]; then
  155. find "${HOME}" -type f -name "appinfo.vdf" -exec rm -f {} \; 2> /dev/null
  156. fi
  157. # Set branch to public if no custom branch.
  158. if [ -z "${branch}" ]; then
  159. branch="public"
  160. fi
  161. # added as was failing GitHub Actions test. Running SteamCMD twice seems to fix it.
  162. if [ "${CI}" ]; then
  163. ${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +quit > /dev/null 2>&1
  164. fi
  165. # password for branch not needed to check the buildid
  166. remotebuild=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_request "${appid}" +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +quit | sed -e '/"branches"/,/^}/!d' | sed -n "/\"${branch}\"/,/}/p" | grep -m 1 buildid | tr -cd '[:digit:]')
  167. if [ "${firstcommandname}" != "INSTALL" ]; then
  168. fn_print_dots "Checking remote build: ${remotelocation}"
  169. # Checks if remotebuild variable has been set.
  170. if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then
  171. fn_print_fail "Checking remote build: ${remotelocation}"
  172. fn_script_log_fail "Checking remote build"
  173. core_exit.sh
  174. else
  175. fn_print_ok "Checking remote build: ${remotelocation}"
  176. fn_script_log_pass "Checking remote build"
  177. fi
  178. else
  179. # Checks if remotebuild variable has been set.
  180. if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then
  181. fn_print_failure "Unable to get remote build"
  182. fn_script_log_fail "Unable to get remote build"
  183. core_exit.sh
  184. fi
  185. fi
  186. }
  187. fn_update_steamcmd_compare() {
  188. fn_print_dots "Checking for update: ${remotelocation}"
  189. # Update has been found or force update.
  190. if [ "${localbuild}" != "${remotebuild}" ] || [ "${forceupdate}" == "1" ]; then
  191. # Create update lockfile.
  192. date '+%s' > "${lockdir:?}/update.lock"
  193. fn_print_ok_nl "Checking for update: ${remotelocation}"
  194. fn_print "\n"
  195. fn_print_nl "${bold}${underline}Update${default} available"
  196. fn_print_nl "* Local build: ${red}${localbuild}${default}"
  197. fn_print_nl "* Remote build: ${green}${remotebuild}${default}"
  198. if [ -n "${branch}" ]; then
  199. fn_print_nl "* Branch: ${branch}"
  200. fi
  201. if [ -n "${betapassword}" ]; then
  202. fn_print_nl "* Branch password: ${betapassword}"
  203. fi
  204. fn_print_nl "${italic}https://steamdb.info/app/${appid}/history"
  205. fn_print "\n"
  206. fn_script_log_info "Update available"
  207. fn_script_log_info "Local build: ${localbuild}"
  208. fn_script_log_info "Remote build: ${remotebuild}"
  209. if [ -n "${branch}" ]; then
  210. fn_script_log_info "Branch: ${branch}"
  211. fi
  212. if [ -n "${betapassword}" ]; then
  213. fn_script_log_info "Branch password: ${betapassword}"
  214. fi
  215. fn_script_log_info "${localbuild} > ${remotebuild}"
  216. if [ "${commandname}" == "UPDATE" ]; then
  217. date +%s > "${lockdir:?}/last-updated.lock"
  218. unset updateonstart
  219. check_status.sh
  220. # If server stopped.
  221. if [ "${status}" == "0" ]; then
  222. fn_dl_steamcmd
  223. # If server started.
  224. else
  225. fn_print_restart_warning
  226. exitbypass=1
  227. command_stop.sh
  228. fn_firstcommand_reset
  229. exitbypass=1
  230. fn_dl_steamcmd
  231. exitbypass=1
  232. command_start.sh
  233. fn_firstcommand_reset
  234. fi
  235. unset exitbypass
  236. alert="update"
  237. elif [ "${commandname}" == "CHECK-UPDATE" ]; then
  238. alert="check-update"
  239. fi
  240. alert.sh
  241. else
  242. fn_print_ok_nl "Checking for update: ${remotelocation}"
  243. fn_print "\n"
  244. fn_print_nl "${bold}${underline}No update${default} available"
  245. fn_print_nl "* Local build: ${green}${localbuild}${default}"
  246. fn_print_nl "* Remote build: ${green}${remotebuild}${default}"
  247. if [ -n "${branch}" ]; then
  248. fn_print_nl "* Branch: ${branch}"
  249. fi
  250. if [ -n "${betapassword}" ]; then
  251. fn_print_nl "* Branch password: ${betapassword}"
  252. fi
  253. fn_print_nl "https://steamdb.info/app/${appid}/history"
  254. fn_print "\n"
  255. fn_script_log_info "No update available"
  256. fn_script_log_info "Local build: ${localbuild}"
  257. fn_script_log_info "Remote build: ${remotebuild}"
  258. if [ -n "${branch}" ]; then
  259. fn_script_log_info "Branch: ${branch}"
  260. fi
  261. if [ -n "${betapassword}" ]; then
  262. fn_script_log_info "Branch password: ${betapassword}"
  263. fi
  264. fi
  265. }
  266. fn_appmanifest_info() {
  267. appmanifestfile=$(find -L "${serverfiles}/steamapps" -type f -name "appmanifest_${appid}.acf")
  268. appmanifestfilewc=$(find -L "${serverfiles}/steamapps" -type f -name "appmanifest_${appid}.acf" | wc -l)
  269. }
  270. fn_check_steamcmd_appmanifest() {
  271. fn_appmanifest_info
  272. # Multiple or no matching appmanifest files may sometimes be present.
  273. if [ "${appmanifestfilewc}" -ge "2" ]; then
  274. fn_print_error "Multiple appmanifest_${appid}.acf files found"
  275. fn_script_log_error "Multiple appmanifest_${appid}.acf files found"
  276. fn_print_dots "Removing x${appmanifestfilewc} appmanifest_${appid}.acf files"
  277. for appfile in ${appmanifestfile}; do
  278. rm -f "${appfile:?}"
  279. done
  280. appmanifestfilewc1="${appmanifestfilewc}"
  281. fn_appmanifest_info
  282. # if error can not be resolved.
  283. if [ "${appmanifestfilewc}" -ge "2" ]; then
  284. fn_print_fail "Unable to remove x${appmanifestfilewc} appmanifest_${appid}.acf files"
  285. fn_script_log_fail "Unable to remove x${appmanifestfilewc} appmanifest_${appid}.acf files"
  286. fn_print_nl "* Check user permissions"
  287. for appfile in ${appmanifestfile}; do
  288. fn_print_nl " ${appfile}"
  289. done
  290. core_exit.sh
  291. else
  292. fn_print_ok "Removed x${appmanifestfilewc1} appmanifest_${appid}.acf files"
  293. fn_script_log_pass "Removed x${appmanifestfilewc1} appmanifest_${appid}.acf files"
  294. fn_print_info_nl "Forcing update to correct issue"
  295. fn_script_log_info "Forcing update to correct issue"
  296. fn_dl_steamcmd
  297. fi
  298. elif [ "${appmanifestfilewc}" -eq "0" ]; then
  299. fn_print_error_nl "No appmanifest_${appid}.acf found"
  300. fn_script_log_error "No appmanifest_${appid}.acf found"
  301. fn_print_info_nl "Forcing update to correct issue"
  302. fn_script_log_info "Forcing update to correct issue"
  303. fn_dl_steamcmd
  304. fn_appmanifest_info
  305. if [ "${appmanifestfilewc}" -eq "0" ]; then
  306. fn_print_fail_nl "Still no appmanifest_${appid}.acf found"
  307. fn_script_log_fail "Still no appmanifest_${appid}.acf found"
  308. core_exit.sh
  309. fi
  310. fi
  311. # Checking for half completed updates.
  312. bytesdownloaded=$(grep BytesDownloaded "${appmanifestfile}" | tr -cd '[:digit:]')
  313. bytestodownload=$(grep BytesToDownload "${appmanifestfile}" | tr -cd '[:digit:]')
  314. if [ "${bytesdownloaded}" != "${bytestodownload}" ]; then
  315. fn_print_error_nl "BytesDownloaded and BytesToDownload do not match"
  316. fn_script_log_error "BytesDownloaded and BytesToDownload do not match"
  317. fn_print_info_nl "Forcing update to correct issue"
  318. fn_script_log_info "Forcing update to correct issue"
  319. fn_dl_steamcmd
  320. fi
  321. bytesstaged=$(grep BytesStaged "${appmanifestfile}" | tr -cd '[:digit:]')
  322. bytestostage=$(grep BytesToStage "${appmanifestfile}" | tr -cd '[:digit:]')
  323. if [ "${bytesstaged}" != "${bytestostage}" ]; then
  324. fn_print_error_nl "BytesStaged and BytesToStage do not match"
  325. fn_script_log_error "BytesStaged and BytesToStage do not match"
  326. fn_print_info_nl "Forcing update to correct issue"
  327. fn_script_log_info "Forcing update to correct issue"
  328. fn_dl_steamcmd
  329. fi
  330. # if engine is GoldSrc check SharedDepots exists in appmanifest_90.acf
  331. if [ "${engine}" == "goldsrc" ]; then
  332. shareddepotsexists=$(grep -c SharedDepots "${serverfiles}/steamapps/appmanifest_90.acf")
  333. if [ ! -f "${serverfiles}/steamapps/appmanifest_90.acf" ] || [ "${shareddepotsexists}" == "0" ]; then
  334. fn_print_error_nl "SharedDepots missing from appmanifest_90.acf"
  335. fn_script_log_error "SharedDepots missing from appmanifest_90.acf"
  336. fn_print_info_nl "Forcing update to correct issue"
  337. fn_script_log_info "Forcing update to correct issue"
  338. if [ "${shortname}" == "ahl" ]; then
  339. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  340. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  341. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  342. elif [ "${shortname}" == "bb" ]; then
  343. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  344. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  345. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  346. elif [ "${shortname}" == "cscz" ]; then
  347. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  348. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  349. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  350. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_80.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  351. elif [ "${shortname}" == "css" ]; then
  352. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  353. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  354. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  355. elif [ "${shortname}" == "dmc" ]; then
  356. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  357. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  358. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_40.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  359. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  360. elif [ "${shortname}" == "dod" ]; then
  361. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  362. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  363. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_30.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  364. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  365. elif [ "${shortname}" == "hldm" ]; then
  366. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  367. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  368. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  369. elif [ "${shortname}" == "ns" ]; then
  370. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  371. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  372. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  373. elif [ "${shortname}" == "opfor" ]; then
  374. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  375. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  376. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_50.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  377. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  378. elif [ "${shortname}" == "ricochet" ]; then
  379. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  380. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  381. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_60.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  382. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  383. elif [ "${shortname}" == "tfc" ]; then
  384. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  385. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  386. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_20.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  387. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  388. elif [ "${shortname}" == "ts" ]; then
  389. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  390. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  391. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  392. elif [ "${shortname}" == "vs" ]; then
  393. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  394. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  395. fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  396. fi
  397. fn_dl_steamcmd
  398. fi
  399. fi
  400. }