Explorar el Código

Merge branch 'release/180313'

Daniel Gibbs hace 8 años
padre
commit
058d690756

+ 2 - 1
lgsm/config-default/config-lgsm/kf2server/_default.cfg

@@ -12,10 +12,11 @@
 ip="0.0.0.0"
 ip="0.0.0.0"
 queryport="27015"
 queryport="27015"
 defaultmap="KF-BioticsLab"
 defaultmap="KF-BioticsLab"
+gamemode="KFGameContent.KFGameInfo_VersusSurvival"
 
 
 ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters
 ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters
 fn_parms(){
 fn_parms(){
-parms="\"${defaultmap}?Game=KFGameContent.KFGameInfo_VersusSurvival?ConfigSubDir=${servicename} -QueryPort=${queryport}\""
+parms="\"${defaultmap}?Game=${gamemode}?ConfigSubDir=${servicename} -QueryPort=${queryport}\""
 }
 }
 
 
 #### LinuxGSM Settings ####
 #### LinuxGSM Settings ####

+ 19 - 44
lgsm/config-default/config-lgsm/coserver/_default.cfg → lgsm/config-default/config-lgsm/stserver/_default.cfg

@@ -9,39 +9,18 @@
 #### Server Settings ####
 #### Server Settings ####
 
 
 ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters
 ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters
-# https://developer.valvesoftware.com/wiki/Counter-Strike:_Global_Offensive_Dedicated_Servers#Starting_the_Server
-# [Game Modes]			gametype	gamemode
-# Arms Race				1			0
-# Classic Casual		0			0
-# Classic Competitive	0			1
-# Demolition			1			1
-# Deathmatch			1			2
-gametype="0"
-gamemode="0"
-mapgroup="mg_active"
 ip="0.0.0.0"
 ip="0.0.0.0"
-port="27015"
-clientport="27005"
-sourcetvport="27020"
-defaultmap="de_mirage"
-maxplayers="16"
-tickrate="64"
-
-## Required: Game Server Login Token
-# GSLT is required for running a public server.
-# More info: https://gameservermanagers.com/gslt
-gslt=""
-
-## Optional: Workshop Parameters
-# https://developer.valvesoftware.com/wiki/CSGO_Workshop_For_Server_Operators
-# To get an authkey visit - http://steamcommunity.com/dev/apikey
-# authkey=""
-# ws_collection_id=""
-# ws_start_map=""
+port="27500"
+queryport="27015"
+worldtype="Moon"
+autosaveinterval=300
+clearinterval=60
+worldname="moon_save"
 
 
 ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters
 ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters
+# Edit with care | http://hurtworld.wikia.com/wiki/Hosting_A_Server
 fn_parms(){
 fn_parms(){
-parms="-game csco -usercon -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} -tickrate ${tickrate} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers_override ${maxplayers} +mapgroup ${mapgroup} +game_mode ${gamemode} +game_type ${gametype} +host_workshop_collection ${ws_collection_id} +workshop_start_map ${ws_start_map} -authkey ${authkey}"
+parms="-batchmode -nographics -autostart -gameport=${port} -updateport=${queryport} -worldtype=${worldtype} -loadworld=${worldname} -worldname=${worldname} -autosaveinterval=${autosaveinterval} -clearallinterval=${clearinterval}"
 }
 }
 
 
 #### LinuxGSM Settings ####
 #### LinuxGSM Settings ####
@@ -105,32 +84,27 @@ logdays="7"
 
 
 ## SteamCMD Settings
 ## SteamCMD Settings
 # Server appid
 # Server appid
-appid="740"
-appid_co="600380"
+appid="600760"
 # Steam App Branch Select
 # Steam App Branch Select
 # Allows to opt into the various Steam app branches. Default branch is "".
 # Allows to opt into the various Steam app branches. Default branch is "".
 # Example: "-beta latest_experimental"
 # Example: "-beta latest_experimental"
 branch=""
 branch=""
 
 
-## SteamCMD Login | https://github.com/GameServerManagers/LinuxGSM/wiki/SteamCMD#steamcmd-login
-steamuser="username"
-steampass='password'
-
 ## LinuxGSM Server Details
 ## LinuxGSM Server Details
 # Do not edit
 # Do not edit
-gamename="Classic Offensive"
-engine="source"
+gamename="Stationeers"
+engine="unity3d"
 
 
 #### Directories ####
 #### Directories ####
 # Edit with care
 # Edit with care
 
 
 ## Server Specific Directories
 ## Server Specific Directories
-systemdir="${serverfiles}/csco"
+systemdir="${serverfiles}"
 executabledir="${serverfiles}"
 executabledir="${serverfiles}"
-executable="./srcds_run"
-servercfg="${servicename}.cfg"
-servercfgdefault="server.cfg"
-servercfgdir="${systemdir}/cfg"
+executable="./rocketstation_DedicatedServer.x86_64"
+servercfg="default.ini"
+servercfgdefault="default.ini"
+servercfgdir="${systemdir}"
 servercfgfullpath="${servercfgdir}/${servercfg}"
 servercfgfullpath="${servercfgdir}/${servercfg}"
 
 
 ## Backup Directory
 ## Backup Directory
@@ -138,7 +112,7 @@ backupdir="${rootdir}/backups"
 
 
 ## Logging Directories
 ## Logging Directories
 logdir="${rootdir}/log"
 logdir="${rootdir}/log"
-gamelogdir="${systemdir}/logs"
+gamelogdir="${HOME}/.config/unity3d/Rocketwerkz/Stationeers"
 lgsmlogdir="${logdir}/script"
 lgsmlogdir="${logdir}/script"
 consolelogdir="${logdir}/console"
 consolelogdir="${logdir}/console"
 lgsmlog="${lgsmlogdir}/${servicename}-script.log"
 lgsmlog="${lgsmlogdir}/${servicename}-script.log"
@@ -148,4 +122,5 @@ postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log"
 
 
 ## Logs Naming
 ## Logs Naming
 lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log"
 lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log"
-consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log"
+consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log"
+

+ 5 - 0
lgsm/config-default/config-lgsm/tuserver/_default.cfg

@@ -13,6 +13,11 @@ ip="0.0.0.0"
 port="7777"
 port="7777"
 queryport="27015"
 queryport="27015"
 
 
+## Optional: Game Server Login Token
+# GSLT can be used for running a public server.
+# More info: https://gameservermanagers.com/gslt
+gslt=""
+
 ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters
 ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters
 fn_parms(){
 fn_parms(){
 parms="-log -MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -TowerServerINI=${servicename}.ini"
 parms="-log -MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -TowerServerINI=${servicename}.ini"

+ 5 - 0
lgsm/config-default/config-lgsm/zpsserver/_default.cfg

@@ -16,6 +16,11 @@ sourcetvport="27020"
 defaultmap="zps_deadend"
 defaultmap="zps_deadend"
 maxplayers="20"
 maxplayers="20"
 
 
+## Optional: Game Server Login Token
+# GSLT can be used for running a public server.
+# More info: https://gameservermanagers.com/gslt
+gslt=""
+
 ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters
 ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters
 fn_parms(){
 fn_parms(){
 parms="-game zps -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}"
 parms="-game zps -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}"

+ 1 - 0
lgsm/data/serverlist.csv

@@ -58,6 +58,7 @@ rust,rustserver,Rust
 samp,sampserver,San Andreas Multiplayer
 samp,sampserver,San Andreas Multiplayer
 ss3,ss3server,Serious Sam 3: BFE
 ss3,ss3server,Serious Sam 3: BFE
 sb,sbserver,Starbound
 sb,sbserver,Starbound
+st,stserver,Stationeers
 squad,squadserver,Squad
 squad,squadserver,Squad
 sven,svenserver,Sven Co-op
 sven,svenserver,Sven Co-op
 tf2,tf2server,Team Fortress 2
 tf2,tf2server,Team Fortress 2

+ 3 - 0
lgsm/functions/check_system_requirements.sh

@@ -27,6 +27,9 @@ elif [ "${gamename}" == "Minecraft" ]; then
 elif [ "${gamename}" == "Natural Selection 2" ]||[ "${gamename}" == "NS2: Combat" ]; then
 elif [ "${gamename}" == "Natural Selection 2" ]||[ "${gamename}" == "NS2: Combat" ]; then
 	ramrequirementmb="1000"
 	ramrequirementmb="1000"
 	ramrequirementgb="1"
 	ramrequirementgb="1"
+elif [ "${shortname}" == "st" ]; then
+	ramrequirementmb="1000"
+	ramrequirementgb="1"
 fi
 fi
 
 
 # If the game or engine has a minimum RAM Requirement, compare it to system's available RAM.
 # If the game or engine has a minimum RAM Requirement, compare it to system's available RAM.

+ 7 - 7
lgsm/functions/command_backup.sh

@@ -114,10 +114,10 @@ fn_backup_compression(){
 	fn_script_log_info "backup ${rootdirduexbackup} ${backupname}.tar.gz, in progress"
 	fn_script_log_info "backup ${rootdirduexbackup} ${backupname}.tar.gz, in progress"
         excludedir=$(fn_backup_relpath)
         excludedir=$(fn_backup_relpath)
 
 
-	# CHECK THAT excludedir is a valid path.
+	# Check that excludedir is a valid path.
 	if [ ! -d "${excludedir}" ] ; then
 	if [ ! -d "${excludedir}" ] ; then
-		fn_print_info_nl "Problem identifying the previous backup directory for exclusion."
-		fn_script_log_error "Problem identifying the previous backup directory for exclusion"
+		fn_print_fail_nl "Problem identifying the previous backup directory for exclusion."
+		fn_script_log_fatal "Problem identifying the previous backup directory for exclusion"
 		core_exit.sh
 		core_exit.sh
 	fi
 	fi
 
 
@@ -195,16 +195,16 @@ fn_backup_relpath() {
   	declare -a rdirtoks=($(readlink -f "${rootdir}" | sed "s/\// /g"))
   	declare -a rdirtoks=($(readlink -f "${rootdir}" | sed "s/\// /g"))
 
 
 	if [ ${#rdirtoks[@]} -eq 0 ]; then
 	if [ ${#rdirtoks[@]} -eq 0 ]; then
-		fn_print_info_nl "Problem assessing rootdir during relative path assessment"
-		fn_script_log_error "Problem assessing rootdir during relative path assessment: ${rootdir}"
+		fn_print_fail_nl "Problem assessing rootdir during relative path assessment"
+		fn_script_log_fatal "Problem assessing rootdir during relative path assessment: ${rootdir}"
 		core_exit.sh
 		core_exit.sh
 	fi
 	fi
 
 
 	# Populate an array of tokens initialized from the backupdir components:
 	# Populate an array of tokens initialized from the backupdir components:
   	declare -a bdirtoks=($(readlink -f "${backupdir}" | sed "s/\// /g"))
   	declare -a bdirtoks=($(readlink -f "${backupdir}" | sed "s/\// /g"))
 	if [ ${#bdirtoks[@]} -eq 0 ]; then
 	if [ ${#bdirtoks[@]} -eq 0 ]; then
-		fn_print_info_nl "Problem assessing backupdir during relative path assessment"
-		fn_script_log_error "Problem assessing backupdir during relative path assessment: ${rootdir}"
+		fn_print_fail_nl "Problem assessing backupdir during relative path assessment"
+		fn_script_log_fatal "Problem assessing backupdir during relative path assessment: ${rootdir}"
 		core_exit.sh
 		core_exit.sh
 	fi
 	fi
 
 

+ 1 - 1
lgsm/functions/command_monitor.sh

@@ -79,7 +79,7 @@ fn_monitor_tmux(){
 		fn_print_ok_eol_nl
 		fn_print_ok_eol_nl
 		fn_script_log_pass "Checking session: OK"
 		fn_script_log_pass "Checking session: OK"
 		# runs gsquery check on game with specific engines.
 		# runs gsquery check on game with specific engines.
-		local allowed_engines_array=( avalanche2.0 avalanche3.0 goldsource idtech3 idtech3_ql iw2.0 iw3.0 madness quake refractor realvirtuality source spark starbound unity3d unreal unreal2 )
+		local allowed_engines_array=( avalanche2.0 avalanche3.0 goldsource idtech2 idtech3 idtech3_ql iw2.0 iw3.0 madness quake refractor realvirtuality source spark starbound unity3d unreal unreal2 )
 		for allowed_engine in "${allowed_engines_array[@]}"
 		for allowed_engine in "${allowed_engines_array[@]}"
 		do
 		do
 			if [ "${allowed_engine}" == "starbound" ]; then
 			if [ "${allowed_engine}" == "starbound" ]; then

+ 1 - 1
lgsm/functions/core_dl.sh

@@ -115,7 +115,7 @@ fn_fetch_file(){
 		# if larger file shows progress bar
 		# if larger file shows progress bar
 		if [ "${local_filename##*.}" == "bz2" ]||[ "${local_filename##*.}" == "gz" ]||[ "${local_filename##*.}" == "zip" ]||[ "${local_filename##*.}" == "jar" ]; then
 		if [ "${local_filename##*.}" == "bz2" ]||[ "${local_filename##*.}" == "gz" ]||[ "${local_filename##*.}" == "zip" ]||[ "${local_filename##*.}" == "jar" ]; then
 			echo -ne "downloading ${local_filename}..."
 			echo -ne "downloading ${local_filename}..."
-			sleep 1
+			sleep 0.5
 			curlcmd=$(${curlpath} --progress-bar --fail -L -o "${local_filedir}/${local_filename}" "${remote_fileurl}")
 			curlcmd=$(${curlpath} --progress-bar --fail -L -o "${local_filedir}/${local_filename}" "${remote_fileurl}")
 			echo -ne "downloading ${local_filename}..."
 			echo -ne "downloading ${local_filename}..."
 		else
 		else

+ 2 - 2
lgsm/functions/gsquery.py

@@ -18,8 +18,8 @@ class PythonGSQ:
         self.default_buffer_length = 1024
         self.default_buffer_length = 1024
         #
         #
         sourcequery=[ 'avalanche3.0','madness','quakelive','realvirtuality','refractor','source','goldsource','spark','starbound','unity3d']
         sourcequery=[ 'avalanche3.0','madness','quakelive','realvirtuality','refractor','source','goldsource','spark','starbound','unity3d']
-        idtech2query=['idtech3','quake','iw3.0']
-        idtech3query=['idtech2','iw2.0']
+        idtech3query=['idtech3','quake','iw3.0']
+        idtech2query=['idtech2','iw2.0']
         if self.option.engine in sourcequery:
         if self.option.engine in sourcequery:
             self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0'
             self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0'
         elif self.option.engine in idtech2query:
         elif self.option.engine in idtech2query:

+ 22 - 0
lgsm/functions/info_config.sh

@@ -890,6 +890,25 @@ fn_info_config_squad(){
 	maxplayers=${maxplayers:-"0"}
 	maxplayers=${maxplayers:-"0"}
 }
 }
 
 
+fn_info_config_stationeers(){
+	if [ ! -f "${servercfgfullpath}" ]; then
+		servername="${unavailable}"
+		serverpassword="${unavailable}"
+		rconpassword="${unavailable}"
+		maxplayers="${unavailable}"
+	else
+		servername=$(grep "SERVERNAME" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/SERVERNAME//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		serverpassword=$(grep "PASSWORD" "${servercfgfullpath}" | grep "^PASSWORD" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/PASSWORD//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		rconpassword=$(grep "RCONPASSWORD" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/RCONPASSWORD//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		maxplayers=$(grep "MAXPLAYER" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/MAXPLAYER//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+
+		# Not Set
+		servername=${servername:-"NOT SET"}
+		serverpassword=${serverpassword:-"NOT SET"}
+		rconpassword=${rconpassword:-"NOT SET"}
+		maxplayers=${maxplayers:-"0"}
+	fi
+}
 
 
 # ARK: Survival Evolved
 # ARK: Survival Evolved
 if [ "${gamename}" == "ARK: Survivial Evolved" ]; then
 if [ "${gamename}" == "ARK: Survivial Evolved" ]; then
@@ -993,4 +1012,7 @@ elif [ "${gamename}" == "Multi Theft Auto" ]; then
 	fn_info_config_mta
 	fn_info_config_mta
 elif [ "${gamename}" == "Squad" ]; then
 elif [ "${gamename}" == "Squad" ]; then
 	fn_info_config_squad
 	fn_info_config_squad
+# Stationeers
+elif [ "${gamename}" == "Stationeers" ]; then
+	fn_info_config_stationeers
 fi
 fi

+ 14 - 2
lgsm/functions/info_messages.sh

@@ -402,7 +402,7 @@ fn_info_message_ports(){
 
 
 	parmslocation="${red}UNKNOWN${default}"
 	parmslocation="${red}UNKNOWN${default}"
 	# engines/games that require editing in the config file
 	# engines/games that require editing in the config file
-	local ports_edit_array=( "avalanche2.0" "avalanche3.0" "Ballistic Overkill" "dontstarve" "idtech2" "idtech3" "idtech3_ql" "lwjgl2" "Project Cars" "projectzomboid" "quake" "refractor" "realvirtuality" "renderware" "seriousengine35" "teeworlds" "terraria" "unreal" "unreal2" "unreal3" "TeamSpeak 3" "Mumble" "7 Days To Die" )
+	local ports_edit_array=( "avalanche2.0" "avalanche3.0" "Ballistic Overkill" "dontstarve" "idtech2" "idtech3" "idtech3_ql" "lwjgl2" "Project Cars" "projectzomboid" "quake" "refractor" "realvirtuality" "renderware" "seriousengine35" "Stationeers" "teeworlds" "terraria" "unreal" "unreal2" "unreal3" "TeamSpeak 3" "Mumble" "7 Days To Die" )
 	for port_edit in "${ports_edit_array[@]}"
 	for port_edit in "${ports_edit_array[@]}"
 	do
 	do
 		if [ "${shortname}" == "ut3" ]; then
 		if [ "${shortname}" == "ut3" ]; then
@@ -618,7 +618,7 @@ fn_info_message_minecraft(){
 	echo -e ""
 	echo -e ""
 	{
 	{
 		echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
 		echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
-		echo -e "> Game\tINBOUND\t${port}\tudp"
+		echo -e "> Game\tINBOUND\t${port}\ttcp"
 	} | column -s $'\t' -t
 	} | column -s $'\t' -t
 }
 }
 
 
@@ -835,6 +835,16 @@ fn_info_message_starbound(){
 	} | column -s $'\t' -t
 	} | column -s $'\t' -t
 }
 }
 
 
+fn_info_message_stationeers(){
+	echo -e "netstat -atunp | grep rocketstation"
+	echo -e ""
+	{
+		echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
+		echo -e "> Game\tINBOUND\t${port}\ttcp"
+		echo -e "> Query\tINBOUND\t${queryport}\ttcp"
+	} | column -s $'\t' -t
+}
+
 fn_info_message_teamspeak3(){
 fn_info_message_teamspeak3(){
 	echo -e "netstat -atunp | grep ts3server"
 	echo -e "netstat -atunp | grep ts3server"
 	echo -e ""
 	echo -e ""
@@ -1021,6 +1031,8 @@ fn_info_message_select_engine(){
 		fn_info_message_samp
 		fn_info_message_samp
 	elif [ "${gamename}" == "Squad" ]; then
 	elif [ "${gamename}" == "Squad" ]; then
 		fn_info_message_squad
 		fn_info_message_squad
+	elif [ "${gamename}" == "Stationeers" ]; then
+		fn_info_message_stationeers
 	elif [ "${gamename}" == "TeamSpeak 3" ]; then
 	elif [ "${gamename}" == "TeamSpeak 3" ]; then
 		fn_info_message_teamspeak3
 		fn_info_message_teamspeak3
 	elif [ "${gamename}" == "Tower Unite" ]; then
 	elif [ "${gamename}" == "Tower Unite" ]; then

+ 12 - 1
lgsm/functions/install_config.sh

@@ -61,7 +61,12 @@ fn_set_config_vars(){
 		echo "changing hostname."
 		echo "changing hostname."
 		fn_script_log_info "changing hostname."
 		fn_script_log_info "changing hostname."
 		sleep 1
 		sleep 1
-		sed -i "s/SERVERNAME/${servername}/g" "${servercfgfullpath}"
+
+		if [ $(grep SERVERNAME=SERVERNAME \"${lgsmdir}/config-default/config-game/${config}\") ]; then
+			sed -i "s/SERVERNAME=SERVERNAME/SERVERNAME=${servername}/g" "${servercfgfullpath}"
+		else
+			sed -i "s/SERVERNAME/${servername}/g" "${servercfgfullpath}"
+		fi
 		echo "changing rcon/admin password."
 		echo "changing rcon/admin password."
 		fn_script_log_info "changing rcon/admin password."
 		fn_script_log_info "changing rcon/admin password."
 		sed -i "s/ADMINPASSWORD/${rconpass}/g" "${servercfgfullpath}"
 		sed -i "s/ADMINPASSWORD/${rconpass}/g" "${servercfgfullpath}"
@@ -462,6 +467,12 @@ elif [ "${gamename}" == "Starbound" ]; then
 	fn_fetch_default_config
 	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
+elif [ "${gamename}" == "Stationeers" ]; then
+	gamedirname="Stationeers"
+	array_configs+=( default.ini )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "San Andreas Multiplayer" ]; then
 elif [ "${gamename}" == "San Andreas Multiplayer" ]; then
 	gamedirname="SanAndreasMultiplayer"
 	gamedirname="SanAndreasMultiplayer"
 	array_configs+=( server.cfg )
 	array_configs+=( server.cfg )

+ 1 - 1
lgsm/functions/install_gslt.sh

@@ -12,7 +12,7 @@ echo ""
 echo "Game Server Login Token"
 echo "Game Server Login Token"
 echo "================================="
 echo "================================="
 sleep 1
 sleep 1
-if [ "${gamename}" == "Counter-Strike: Global Offensive" ]||[ "${gamename}" == "Counter-Strike: Source" ]; then
+if [ "${gamename}" == "Counter-Strike: Global Offensive" ]||[ "${gamename}" == "Counter-Strike: Source" ]||[ "${gamename}" == "No More Room in Hell" ]; then
 	echo "GSLT is required to run a public ${gamename} server"
 	echo "GSLT is required to run a public ${gamename} server"
 	fn_script_log_info "GSLT is required to run a public ${gamename} server"
 	fn_script_log_info "GSLT is required to run a public ${gamename} server"
 else
 else

+ 14 - 14
lgsm/functions/install_server_files.sh

@@ -10,35 +10,35 @@ local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 
 fn_install_server_files(){
 fn_install_server_files(){
 	if [ "${gamename}" == "Battlefield: 1942" ]; then
 	if [ "${gamename}" == "Battlefield: 1942" ]; then
-		remote_fileurl="http://files.gameservermanagers.com/BattleField1942/bf1942_lnxded-1.61-hacked-to-1.612.full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="bf1942_lnxded-1.61-hacked-to-1.612.full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="a86a5d3cd64ca59abcc9bb9f777c2e5d"
+		remote_fileurl="http://files.linuxgsm.com/BattleField1942/bf1942_lnxded-1.61-hacked-to-1.612.full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="bf1942_lnxded-1.61-hacked-to-1.612.full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="a86a5d3cd64ca59abcc9bb9f777c2e5d"
 	elif [ "${gamename}" == "Call of Duty" ]; then
 	elif [ "${gamename}" == "Call of Duty" ]; then
-		remote_fileurl="http://files.gameservermanagers.com/CallOfDuty/cod-lnxded-1.5b-full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="cod-lnxded-1.5-large.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="19629895a4cf6fd8f6d1ee198b5304cd"
+		remote_fileurl="http://files.linuxgsm.com/CallOfDuty/cod-lnxded-1.5b-full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="cod-lnxded-1.5-large.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="19629895a4cf6fd8f6d1ee198b5304cd"
 	elif [ "${gamename}" == "Call of Duty: United Offensive" ]; then
 	elif [ "${gamename}" == "Call of Duty: United Offensive" ]; then
-		remote_fileurl="http://files.gameservermanagers.com/CallOfDutyUnitedOffensive/coduo-lnxded-1.51b-full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="coduo-lnxded-1.51b-full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="f1804ef13036e2b4ab535db000b19e97"
+		remote_fileurl="http://files.linuxgsm.com/CallOfDutyUnitedOffensive/coduo-lnxded-1.51b-full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="coduo-lnxded-1.51b-full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="f1804ef13036e2b4ab535db000b19e97"
 	elif [ "${gamename}" == "Call of Duty 2" ]; then
 	elif [ "${gamename}" == "Call of Duty 2" ]; then
-		remote_fileurl="http://files.gameservermanagers.com/CallOfDuty2/cod2-lnxded-1.3-full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="cod2-lnxded-1.3-full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="078128f83d06dc3d7699428dc2870214"
+		remote_fileurl="http://files.linuxgsm.com/CallOfDuty2/cod2-lnxded-1.3-full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="cod2-lnxded-1.3-full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="078128f83d06dc3d7699428dc2870214"
 	elif [ "${gamename}" == "Call of Duty 4" ]; then
 	elif [ "${gamename}" == "Call of Duty 4" ]; then
-		remote_fileurl="http://files.gameservermanagers.com/CallOfDuty4/cod4x18_dedrun.tar.bz2"; local_filedir="${tmpdir}"; local_filename="cod4x18_dedrun.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="bebdfc1755626462bdaad49f6f926c08"
+		remote_fileurl="http://files.linuxgsm.com/CallOfDuty4/cod4x18_dedrun.tar.bz2"; local_filedir="${tmpdir}"; local_filename="cod4x18_dedrun.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="bebdfc1755626462bdaad49f6f926c08"
 	elif [ "${gamename}" == "Call of Duty: World at War" ]; then
 	elif [ "${gamename}" == "Call of Duty: World at War" ]; then
-		remote_fileurl="http://files.gameservermanagers.com/CallOfDutyWorldAtWar/codwaw-lnxded-1.7-full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="codwaw-lnxded-1.7-full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="0489697ff3bf678c109bfb377d1b7895"
+		remote_fileurl="http://files.linuxgsm.com/CallOfDutyWorldAtWar/codwaw-lnxded-1.7-full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="codwaw-lnxded-1.7-full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="0489697ff3bf678c109bfb377d1b7895"
 	elif [ "${gamename}" == "GoldenEye: Source" ]; then
 	elif [ "${gamename}" == "GoldenEye: Source" ]; then
-		remote_fileurl="http://files.gameservermanagers.com/GoldenEyeSource/GoldenEye_Source_v5.0.6_full_server.tar.bz2"; local_filedir="${tmpdir}"; local_filename="GoldenEye_Source_v5.0.6_full_server.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="c45c16293096706e8b5e2cd64a6f2931"
+		remote_fileurl="http://files.linuxgsm.com/GoldenEyeSource/GoldenEye_Source_v5.0.6_full_server.tar.bz2"; local_filedir="${tmpdir}"; local_filename="GoldenEye_Source_v5.0.6_full_server.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="c45c16293096706e8b5e2cd64a6f2931"
 	elif [ "${gamename}" == "Quake 2" ]; then
 	elif [ "${gamename}" == "Quake 2" ]; then
-		remote_fileurl="http://files.gameservermanagers.com/Quake2/quake2-3.20-glibc-i386-full-linux2.0.tar.bz2"; local_filedir="${tmpdir}"; local_filename="quake2-3.20-glibc-i386-full-linux2.0.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="0b8c7e2d51f40b56b328c69e986e7c5f"
+		remote_fileurl="http://files.linuxgsm.com/Quake2/quake2-3.20-glibc-i386-full-linux2.0.tar.bz2"; local_filedir="${tmpdir}"; local_filename="quake2-3.20-glibc-i386-full-linux2.0.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="0b8c7e2d51f40b56b328c69e986e7c5f"
 	elif [ "${gamename}" == "Quake 3: Arena" ]; then
 	elif [ "${gamename}" == "Quake 3: Arena" ]; then
-		remote_fileurl="http://files.gameservermanagers.com/Quake3/quake3-1.32c-x86-full-linux.tar.bz2"; local_filedir="${tmpdir}"; local_filename="quake3-1.32c-x86-full-linux.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="fd7258d827474f67663dda297bff4306"
+		remote_fileurl="http://files.linuxgsm.com/Quake3/quake3-1.32c-x86-full-linux.tar.bz2"; local_filedir="${tmpdir}"; local_filename="quake3-1.32c-x86-full-linux.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="fd7258d827474f67663dda297bff4306"
 	elif [ "${gamename}" == "QuakeWorld" ]; then
 	elif [ "${gamename}" == "QuakeWorld" ]; then
-		remote_fileurl="http://files.gameservermanagers.com/QuakeWorld/nquake.server.linux.083116.full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="nquake.server.linux.083116.full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="75a409cf08d808f075e4dacdc7b21b78"
+		remote_fileurl="http://files.linuxgsm.com/QuakeWorld/nquake.server.linux.083116.full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="nquake.server.linux.083116.full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="75a409cf08d808f075e4dacdc7b21b78"
 	elif [ "${gamename}" == "Unreal Tournament 2004" ]; then
 	elif [ "${gamename}" == "Unreal Tournament 2004" ]; then
-		remote_fileurl="http://files.gameservermanagers.com/UnrealTournament2004/ut2004-server-3339-ultimate-linux.tar.bz2"; local_filedir="${tmpdir}"; local_filename="ut2004-server-3339-ultimate-linux.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="67c5e2cd9c2a4b04f163962ee41eff54"
+		remote_fileurl="http://files.linuxgsm.com/UnrealTournament2004/ut2004-server-3369-2-ultimate-linux.tar.bz2"; local_filedir="${tmpdir}"; local_filename="ut2004-server-3369-2-ultimate-linux.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="67c5e2cd9c2a4b04f163962ee41eff54"
 	elif [ "${gamename}" == "Unreal Tournament 99" ]; then
 	elif [ "${gamename}" == "Unreal Tournament 99" ]; then
-		remote_fileurl="http://files.gameservermanagers.com/UnrealTournament99/ut99-server-451-ultimate-linux.tar.bz2"; local_filedir="${tmpdir}"; local_filename="ut99-server-451-ultimate-linux.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="49cb24d0550ff6ddeaba6007045c6edd"
+		remote_fileurl="http://files.linuxgsm.com/UnrealTournament99/ut99-server-451-ultimate-linux.tar.bz2"; local_filedir="${tmpdir}"; local_filename="ut99-server-451-ultimate-linux.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="49cb24d0550ff6ddeaba6007045c6edd"
 	elif [ "${gamename}" == "Unreal Tournament" ]; then
 	elif [ "${gamename}" == "Unreal Tournament" ]; then
 		remote_fileurl="https://s3.amazonaws.com/unrealtournament/UnrealTournament-Client-XAN-3395761-Linux.zip"; local_filedir="${tmpdir}"; local_filename="UnrealTournament-Server-XAN-3395761-Linux.zip";  chmodx="noexecute" run="norun"; force="noforce"; md5="f04ad5b96865b19613303331ff4075eb"
 		remote_fileurl="https://s3.amazonaws.com/unrealtournament/UnrealTournament-Client-XAN-3395761-Linux.zip"; local_filedir="${tmpdir}"; local_filename="UnrealTournament-Server-XAN-3395761-Linux.zip";  chmodx="noexecute" run="norun"; force="noforce"; md5="f04ad5b96865b19613303331ff4075eb"
 	elif [ "${gamename}" == "Unreal Tournament 3" ]; then
 	elif [ "${gamename}" == "Unreal Tournament 3" ]; then
-		remote_fileurl="http://files.gameservermanagers.com/UnrealTournament3/UT3-linux-server-2.1.tar.bz2"; local_filedir="${tmpdir}"; local_filename="UT3-linux-server-2.1.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="2527437b46f1b47f20228d27d72395a6"
+		remote_fileurl="http://files.linuxgsm.com/UnrealTournament3/UT3-linux-server-2.1.tar.bz2"; local_filedir="${tmpdir}"; local_filename="UT3-linux-server-2.1.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="2527437b46f1b47f20228d27d72395a6"
 	elif [ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then
 	elif [ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then
-		remote_fileurl="http://files.gameservermanagers.com/WolfensteinEnemyTerritory/enemy-territory.260b.tar.bz2"; local_filedir="${tmpdir}"; local_filename="enemy-territory.260b.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="f833f514bfcdd46b42c111f83350c5a7"
+		remote_fileurl="http://files.linuxgsm.com/WolfensteinEnemyTerritory/enemy-territory.260b.tar.bz2"; local_filedir="${tmpdir}"; local_filename="enemy-territory.260b.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="f833f514bfcdd46b42c111f83350c5a7"
 	elif [ "${gamename}" == "San Andreas Multiplayer" ]; then
 	elif [ "${gamename}" == "San Andreas Multiplayer" ]; then
 		remote_fileurl="http://files.sa-mp.com/samp037svr_R2-1.tar.gz"; local_filedir="${tmpdir}"; local_filename="samp037svr_R2-1.tar.gz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="93705e165550c97484678236749198a4"
 		remote_fileurl="http://files.sa-mp.com/samp037svr_R2-1.tar.gz"; local_filedir="${tmpdir}"; local_filename="samp037svr_R2-1.tar.gz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="93705e165550c97484678236749198a4"
 	fi
 	fi

+ 2 - 4
lgsm/functions/update_minecraft.sh

@@ -70,12 +70,10 @@ fn_update_currentbuild(){
 fn_update_availablebuild(){
 fn_update_availablebuild(){
 	# Gets latest build info.
 	# Gets latest build info.
 	availablebuild=$(${curlpath} -s "https://launchermeta.mojang.com/mc/game/version_manifest.json" | sed -e 's/^.*"release":"\([^"]*\)".*$/\1/')
 	availablebuild=$(${curlpath} -s "https://launchermeta.mojang.com/mc/game/version_manifest.json" | sed -e 's/^.*"release":"\([^"]*\)".*$/\1/')
-	sleep 1
-
 	# Checks if availablebuild variable has been set
 	# Checks if availablebuild variable has been set
 	if [ -z "${availablebuild}" ]; then
 	if [ -z "${availablebuild}" ]; then
 		fn_print_fail "Checking for update: mojang.com"
 		fn_print_fail "Checking for update: mojang.com"
-		sleep 1
+		sleep 0.5
 		fn_print_fail "Checking for update: mojang.com: Not returning version info"
 		fn_print_fail "Checking for update: mojang.com: Not returning version info"
 		fn_script_log_fatal "Failure! Checking for update: mojang.com: Not returning version info"
 		fn_script_log_fatal "Failure! Checking for update: mojang.com: Not returning version info"
 		core_exit.sh
 		core_exit.sh
@@ -84,7 +82,7 @@ fn_update_availablebuild(){
 	else
 	else
 		fn_print_ok_nl "Checking for update: mojang.com"
 		fn_print_ok_nl "Checking for update: mojang.com"
 		fn_script_log_pass "Checking for update: mojang.com"
 		fn_script_log_pass "Checking for update: mojang.com"
-		sleep 1
+		sleep 0.5
 	fi
 	fi
 }
 }
 
 

+ 32 - 3
lgsm/functions/update_ts3.sh

@@ -83,8 +83,32 @@ else
 fi
 fi
 }
 }
 
 
+
 fn_update_ts3_availablebuild(){
 fn_update_ts3_availablebuild(){
 	# Gets latest build info.
 	# Gets latest build info.
+	if [ "${arch}" == "x86_64" ]; then
+		availablebuild=$(${curlpath} -s 'https://www.teamspeak.com/versions/server.json' | jq -r '.linux.x86_64.version')
+	elif [ "${arch}" == "x86" ]; then
+		availablebuild=$(${curlpath} -s 'https://www.teamspeak.com/versions/server.json' | jq -r '.linux.x86.version')
+	fi
+	# Checks if availablebuild variable has been set
+	if [ -z "${availablebuild}" ]; then
+		fn_print_fail "Checking for update: teamspeak.com"
+		sleep 0.5
+		fn_print_fail "Checking for update: teamspeak.com: Not returning version info"
+		fn_script_log_fatal "Failure! Checking for update: teamspeak.com: Not returning version info"
+		core_exit.sh
+	elif [ "${installer}" == "1" ]; then
+		:
+	else
+		fn_print_ok_nl "Checking for update: teamspeak.com"
+		fn_script_log_pass "Checking for update: teamspeak.com"
+		sleep 0.5
+	fi
+}
+
+fn_update_ts3_availablebuild_legacy(){
+	# Gets latest build info.
 
 
 	# Grabs all version numbers but not in correct order.
 	# Grabs all version numbers but not in correct order.
 	wget "http://dl.4players.de/ts/releases/?C=M;O=D" -q -O -| grep -i dir | egrep -o '<a href=\".*\/\">.*\/<\/a>' | egrep -o '[0-9\.?]+'|uniq > "${tmpdir}/.ts3_version_numbers_unsorted.tmp"
 	wget "http://dl.4players.de/ts/releases/?C=M;O=D" -q -O -| grep -i dir | egrep -o '<a href=\".*\/\">.*\/<\/a>' | egrep -o '[0-9\.?]+'|uniq > "${tmpdir}/.ts3_version_numbers_unsorted.tmp"
@@ -180,9 +204,14 @@ fn_update_ts3_compare(){
 
 
 fn_update_ts3_arch
 fn_update_ts3_arch
 if [ "${installer}" == "1" ]; then
 if [ "${installer}" == "1" ]; then
-	fn_update_ts3_availablebuild
-	fn_update_ts3_dl
-else
+	# if jq available uses json update checker
+	if [ "$(command -v jq)" ]||[ "$(which jq >/dev/null 2>&1)" ]; then
+		fn_update_ts3_availablebuild
+	else
+		fn_update_ts3_availablebuild_legacy
+	fi
+		fn_update_ts3_dl
+	else
 	# Checks for server update from teamspeak.com using a mirror dl.4players.de.
 	# Checks for server update from teamspeak.com using a mirror dl.4players.de.
 	fn_print_dots "Checking for update: teamspeak.com"
 	fn_print_dots "Checking for update: teamspeak.com"
 	fn_script_log_info "Checking for update: teamspeak.com"
 	fn_script_log_info "Checking for update: teamspeak.com"

+ 1 - 1
linuxgsm.sh

@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 	set -x
 fi
 fi
 
 
-version="171216"
+version="180313"
 shortname="core"
 shortname="core"
 gameservername="core"
 gameservername="core"
 rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
 rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"