Преглед изворни кода

Merge remote-tracking branch 'refs/remotes/origin/master' into mcserver

Daniel Gibbs пре 9 година
родитељ
комит
59e595c8a4

+ 2 - 2
CounterStrike/csserver

@@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="210516"
+version="060816"
 
 #### Variables ####
 
@@ -71,7 +71,7 @@ systemdir="${filesdir}/cstrike"
 executabledir="${filesdir}"
 executable="./hlds_run"
 servercfg="${servicename}.cfg"
-servercfgdir="${systemdir}/cfg"
+servercfgdir="${systemdir}"
 servercfgfullpath="${servercfgdir}/${servercfg}"
 servercfgdefault="${servercfgdir}/lgsm-default.cfg"
 backupdir="${rootdir}/backups"

+ 11 - 3
CounterStrikeGlobalOffensive/cfg/lgsm-default.cfg

@@ -14,10 +14,18 @@ sv_logecho 1
 sv_logfile 1
 sv_log_onefile 0
 
+// Server Hibernation
+sv_hibernate_when_empty 1
+sv_hibernate_ms 5
+
+// Server Query
+// More info at: https://www.gametracker.com/games/csgo/forum.php?thread=91691
+host_name_store 1
+host_info_show 1
+host_players_show 2
+
+
 exec banned_user.cfg
 exec banned_ip.cfg
 writeid
 writeip
-
-
-

+ 5 - 0
CounterStrikeGlobalOffensive/csgoserver

@@ -78,6 +78,11 @@ githubbranch="master"
 # Steam
 appid="740"
 
+# Steam App Branch Select
+# Allows to opt into the various Steam app branches. Default branch is "".
+# Example: "-beta 1.35.4.4"
+branch=""
+
 # Server Details
 servicename="csgo-server"
 gamename="Counter Strike: Global Offensive"

+ 6 - 1
GarrysMod/gmodserver

@@ -29,6 +29,11 @@ pushbullettoken="accesstoken"
 steamuser="anonymous"
 steampass=""
 
+# Steam App Branch Select
+# Allows to opt into the various Steam app branches. Default branch is "".
+# Example: "-beta prerelease "
+branch=""
+
 # Workshop Variables
 # http://wiki.garrysmod.com/page/Workshop_for_Dedicated_Servers
 workshopauth=""
@@ -56,7 +61,7 @@ gslt=""
 
 # https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server
 fn_parms(){
-parms="-game garrysmod -strictportbind -ip ${ip} -port ${port} -tickrate {tickrate} +host_workshop_collection ${workshopcollectionid} -authkey ${workshopauth} +clientport ${clientport} +tv_port ${sourcetvport} +gamemode ${gamemode} +map ${defaultmap} +sv_setsteamaccount ${gslt} +servercfgfile ${servercfg} -maxplayers ${maxplayers} ${customparms}"
+parms="-game garrysmod -strictportbind -ip ${ip} -port ${port} -tickrate ${tickrate} +host_workshop_collection ${workshopcollectionid} -authkey ${workshopauth} +clientport ${clientport} +tv_port ${sourcetvport} +gamemode ${gamemode} +map ${defaultmap} +sv_setsteamaccount ${gslt} +servercfgfile ${servercfg} -maxplayers ${maxplayers} ${customparms}"
 }
 
 #### Advanced Variables ####

+ 5 - 0
NaturalSelection2/ns2server

@@ -62,6 +62,11 @@ githubbranch="master"
 # Steam
 appid="4940"
 
+# Steam App Branch Select
+# Allows to opt into the various Steam app branches. Default branch is "".
+# Example: "-beta beta"
+branch=""
+
 # Server Details
 servicename="ns2-server"
 gamename="Natural Selection 2"

BIN
images/logo/lgsm-250x130-dark.png


BIN
images/logo/lgsm-250x143-dark.png


+ 2 - 2
lgsm/functions/check_deps.sh

@@ -63,7 +63,7 @@ fn_found_missing_deps(){
 	if [ "${#array_deps_missing[@]}" != "0" ]; then
 		fn_print_dots "Checking dependencies"
 		sleep 0.5
-		fn_print_error "Checking dependencies: missing: ${red}${array_deps_missing[@]}${default}"
+		fn_print_error_nl "Checking dependencies: missing: ${red}${array_deps_missing[@]}${default}"
 		fn_script_log_error "Checking dependencies: missing: ${red}${array_deps_missing[@]}${default}"
 		sleep 1
 		sudo -v > /dev/null 2>&1
@@ -86,7 +86,7 @@ fn_found_missing_deps(){
 			fi
 			if [ $? != 0 ]; then
 				fn_print_failure_nl "Unable to install dependencies"
-				fn_script_log_fail "Unable to install dependencies"
+				fn_script_log_fatal "Unable to install dependencies"
 			else
 				fn_print_complete_nl "Install dependencies completed"
 				fn_script_log_pass "Install dependencies completed"

+ 3 - 3
lgsm/functions/command_fastdl.sh

@@ -305,15 +305,15 @@ fn_fastdl_bzip2(){
 fn_fastdl_completed(){
 	# Finished message
 	echo ""
-	fn_print_ok "Congratulations, it's done !"
+	fn_print_ok "Congratulations, it's done!"
 	fn_script_log "FastDL job done"
 	sleep 2
 	echo -en "\n"
 	echo ""
-	fn_print_info "Need more doc ? See https://github.com/dgibbs64/linuxgsm/wiki/FastDL"
+	fn_print_info "Need more documentation? See https://github.com/dgibbs64/linuxgsm/wiki/FastDL"
 	echo -en "\n"
 	if [ "$bzip2installed" == "0" ]; then
-	echo "By the way, you'd better install bzip2 an re-run this command !"
+	echo "By the way, you'd better install bzip2 and re-run this command!"
 	fi
 	echo "Credits : UltimateByte"
 }

+ 3 - 3
lgsm/functions/command_validate.sh

@@ -24,9 +24,9 @@ fn_validation(){
 	fi
 
 	if [ "${engine}" == "goldsource" ]; then
-		${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" +app_update "${appid}" validate +quit| tee -a "${scriptlog}"
+		${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" ${branch} +app_update "${appid}" ${branch} validate +quit| tee -a "${scriptlog}"
 	else
-		${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" validate +quit| tee -a "${scriptlog}"
+		${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" ${branch} validate +quit| tee -a "${scriptlog}"
 	fi
 	if [ $? != 0 ]; then
 		fn_print_fail_nl "Validating files: SteamCMD"
@@ -39,7 +39,7 @@ fn_validation(){
 
 }
 
-fn_print_dots_nl "Validating files:"
+fn_print_dots "Validating files:"
 sleep 0.5
 fn_print_dots_nl "Validating files: SteamCMD"
 sleep 1

+ 1 - 1
lgsm/functions/core_getopt.sh

@@ -234,7 +234,7 @@ case "${getopt}" in
 		echo -e "${blue}start\t${default}st |Start the server."
 		echo -e "${blue}stop\t${default}sp |Stop the server."
 		echo -e "${blue}restart\t${default}r  |Restart the server."
-		echo -e "${blue}update\t${default}Checks and applies updates from SteamCMD."
+		echo -e "${blue}update\t${default}u  |Checks and applies updates from SteamCMD."
 		echo -e "${blue}force-update\t${default}fu |Bypasses the check and applies updates from SteamCMD."
 		echo -e "${blue}update-functions\t${default}uf |Removes all functions so latest can be downloaded."
 		echo -e "${blue}validate\t${default}v  |Validate server files with SteamCMD."

+ 8 - 8
lgsm/functions/gsquery.py

@@ -18,23 +18,23 @@ class GameServer:
 		self.default_buffer_length = 1024
 		#
 		if self.option.engine == 'source':
-			self.query_prompt_string = '\xFF\xFF\xFF\xFFTSource Engine Query\0'
+			self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0'
 		elif self.option.engine == 'goldsource':
-			self.query_prompt_string = '\xFF\xFF\xFF\xFFTSource Engine Query\0'
+			self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0'
 		elif self.option.engine == 'spark':
-			self.query_prompt_string = '\xFF\xFF\xFF\xFFTSource Engine Query\0'
+			self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0'
 		elif self.option.engine == 'realvirtuality':
-			self.query_prompt_string = '\xFF\xFF\xFF\xFFTSource Engine Query\0'
+			self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0'
 		elif self.option.engine == 'unity3d':
 			self.query_prompt_string = '\xFF\xFF\xFF\xFFTSource Engine Query\0'
 		elif self.option.engine == 'idtech3':
-			self.query_prompt_string = '\xFF\xFF\xFF\xFFTSource Engine Query\0'			
+			self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0'			
 		elif self.option.engine == 'unreal':
-			self.query_prompt_string = '\x5C\x69\x6E\x66\x6F\x5C'
+			self.query_prompt_string = b'\x5C\x69\x6E\x66\x6F\x5C'
 		elif self.option.engine == 'unreal2':
-			self.query_prompt_string = '\x79\x00\x00\x00\x00'
+			self.query_prompt_string = b'\x79\x00\x00\x00\x00'
 		elif self.option.engine == 'avalanche':
-			self.query_prompt_string = '\xFE\xFD\x09\x10\x20\x30\x40'
+			self.query_prompt_string = b'\xFE\xFD\x09\x10\x20\x30\x40'
 		self.connected = False
 		self.response = None
 		self.sanity_checks()

+ 3 - 3
lgsm/functions/install_server_files.sh

@@ -56,7 +56,7 @@ fn_install_server_files_steamcmd(){
 					${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${branch} +quit
 					local exitcode=$?
 				else
-					${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" +quit
+					${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" ${branch} +quit
 					local exitcode=$?
 				fi
 			elif [ "${counter}" -ge "5" ]; then
@@ -64,7 +64,7 @@ fn_install_server_files_steamcmd(){
 					${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${branch} -validate +quit
 					local exitcode=$?
 				else
-					${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" -validate +quit
+					${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" ${branch} -validate +quit
 					local exitcode=$?
 				fi
 			fi
@@ -82,7 +82,7 @@ fn_install_server_files_steamcmd(){
 		counter="0"
 		while [ "${counter}" -le "4" ]; do
 			counter=$((counter+1))
-			${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" -validate +quit
+			${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" ${branch} -validate +quit
 			local exitcode=$?
 		done
 	fi

+ 2 - 2
lgsm/functions/update_steamcmd.sh

@@ -24,9 +24,9 @@ fn_update_steamcmd_dl(){
 	fi
 
 	if [ "${engine}" == "goldsource" ]; then
-		${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" +quit | tee -a "${scriptlog}"
+		${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}" +quit | tee -a "${scriptlog}"
+		${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" ${branch} +quit | tee -a "${scriptlog}"
 	fi
 
 	fix.sh