|
|
@@ -2,7 +2,7 @@
|
|
|
# LGSM fn_install_serverfiles function
|
|
|
# Author: Daniel Gibbs
|
|
|
# Website: http://gameservermanagers.com
|
|
|
-# Version: 210115
|
|
|
+# Version: 050515
|
|
|
|
|
|
fn_steaminstallcommand(){
|
|
|
counter="0"
|
|
|
@@ -27,10 +27,16 @@ while [ "${counter}" == "0" ]||[ "$(grep -wc 0x402 .fn_install_serverfiles.tmp)"
|
|
|
rm -rf "${rootdir}/steamcmd"
|
|
|
fn_check_steamcmd
|
|
|
fi
|
|
|
+
|
|
|
+ # Detects if unbuffer command is available.
|
|
|
+ if [ $(command -v unbuffer) ]; then
|
|
|
+ unbuffer=unbuffer
|
|
|
+ fi
|
|
|
+
|
|
|
if [ "${counter}" -le "4" ]; then
|
|
|
- ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" +quit |tee .fn_install_serverfiles.tmp
|
|
|
+ ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" +quit |tee .fn_install_serverfiles.tmp
|
|
|
elif [ "${counter}" -ge "5" ]; then
|
|
|
- ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" -validate +quit |tee .fn_install_serverfiles.tmp
|
|
|
+ ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" -validate +quit |tee .fn_install_serverfiles.tmp
|
|
|
fi
|
|
|
elif [ "${counter}" -ge "11" ]; then
|
|
|
fn_printfailurenl "SteamCMD did not complete the download, too many retrys"
|
|
|
@@ -45,7 +51,7 @@ if [ "${engine}" == "goldsource" ]; then
|
|
|
counter="0"
|
|
|
while [ "${counter}" -le "4" ]; do
|
|
|
counter=$((counter+1))
|
|
|
- ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" -validate +quit |tee .fn_install_serverfiles.tmp
|
|
|
+ ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" -validate +quit |tee .fn_install_serverfiles.tmp
|
|
|
done
|
|
|
fi
|
|
|
rm -f .fn_install_serverfiles.tmp
|