diff --git a/ClassicOffensive/coserver b/ClassicOffensive/coserver index b2f695bd7..5dfb9f286 100644 --- a/ClassicOffensive/coserver +++ b/ClassicOffensive/coserver @@ -95,6 +95,10 @@ appid_co="600380" # Example: "-beta latest_experimental" branch="" +## SteamCMD Login | https://github.com/GameServerManagers/LinuxGSM/wiki/SteamCMD#steamcmd-login +steamuser="accountname" +steampass='accountpassword' + ## Github Branch Select # Allows for the use of different function files # from a different repo and/or branch. diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 249e5291e..71a9bad3e 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -228,6 +228,13 @@ elif [ "${gamename}" == "Counter-Strike: Global Offensive" ]; then fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_set_config_vars +elif [ "${gamename}" == "Classic Offensive" ]; then + gamedirname="ClassicOffensive" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars elif [ "${gamename}" == "Counter-Strike: Source" ]; then gamedirname="CounterStrikeSource" array_configs+=( server.cfg ) diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index edee16e9f..f330f086e 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -83,6 +83,11 @@ fn_install_server_files_steamcmd(){ else ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" ${branch} +quit local exitcode=$? + + if [ "${gamename}" == "Classic Offensive" ]; then + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid_co}" ${branch} +quit + local exitcode=$? + fi fi elif [ "${counter}" -ge "5" ]; then if [ "${engine}" == "goldsource" ]; then @@ -91,6 +96,11 @@ fn_install_server_files_steamcmd(){ else ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" ${branch} -validate +quit local exitcode=$? + + if [ "${gamename}" == "Classic Offensive" ]; then + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid_co}" ${branch} -validate +quit + local exitcode=$? + fi fi fi elif [ "${counter}" -ge "11" ]; then diff --git a/lgsm/functions/update_steamcmd.sh b/lgsm/functions/update_steamcmd.sh index e500a0fbf..8720af82c 100644 --- a/lgsm/functions/update_steamcmd.sh +++ b/lgsm/functions/update_steamcmd.sh @@ -29,6 +29,10 @@ fn_update_steamcmd_dl(){ ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" ${branch} +quit | tee -a "${scriptlog}" else ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" ${branch} +quit | tee -a "${scriptlog}" + + if [ "${gamename}" == "Classic Offensive" ]; then + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid_co}" ${branch} +quit | tee -a "${scriptlog}" + fi fi fix.sh