Procházet zdrojové kódy

Add support for classic offensive

Bara20 před 9 roky
rodič
revize
f65449a0e0

+ 4 - 0
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.

+ 7 - 0
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 )

+ 10 - 0
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

+ 4 - 0
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