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

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

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

+ 1 - 1
Mumble/mumbleserver

@@ -59,7 +59,7 @@ filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}"
 executabledir="${filesdir}"
 executable="./murmur.x86"
-servercfg="murmur.ini"
+servercfg="${servicename}.ini"
 servercfgdefault="murmur.ini"
 servercfgdir="${filesdir}"
 servercfgfullpath="${servercfgdir}/${servercfg}"

+ 1 - 0
lgsm/functions/check.sh

@@ -11,6 +11,7 @@ local commandname="CHECK"
 # check.sh selects which checks to run by using arrays
 
 check_root.sh
+check_tmuxception.sh
 check_permissions.sh
 
 if [ "${function_selfname}" != "command_install.sh" ]&&[ "${function_selfname}" != "command_update_functions.sh" ]; then

+ 48 - 4
lgsm/functions/check_permissions.sh

@@ -3,7 +3,7 @@
 # Author: Daniel Gibbs
 # Contributor: UltimateByte
 # Website: https://gameservermanagers.com
-# Description: Checks ownership & permissions of scripts, files and folders.
+# Description: Checks ownership & permissions of scripts, files and directories.
 
 local commandname="CHECK"
 local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
@@ -66,7 +66,7 @@ fn_check_permissions(){
 
 	# Check rootdir permissions
 	if [ -n "${rootdir}" ]; then
-		# Get permission numbers on folder under the form 775
+		# Get permission numbers on directory under the form 775
 		rootdirperm="$(stat -c %a "${rootdir}")"
 		# Grab the first and second digit for user and group permission
 		userrootdirperm="${rootdirperm:0:1}"
@@ -74,12 +74,56 @@ fn_check_permissions(){
 		if [ "${userrootdirperm}" != "7" ] && [ "${grouprootdirperm}" != "7" ]; then
 			fn_print_fail_nl "Permissions issues found"
 			fn_script_log_fatal "Permissions issues found"
-			fn_print_information_nl "The following directorys does not have the correct permissions:"
-			fn_script_log_info "The following directorys does not have the correct permissions:"
+			fn_print_information_nl "The following directory does not have the correct permissions:"
+			fn_script_log_info "The following directory does not have the correct permissions:"
+			fn_script_log_info "${rootdir}"
 			ls -l "${rootdir}"
 			core_exit.sh
 		fi
 	fi
+	# Check if executable is executable and attempt to fix it
+	# First get executable name
+	execname="$(basename "${executable}")"
+	if [ -f "${executabledir}/${execname}" ]; then
+		# Get permission numbers on file under the form 775
+		execperm="$(stat -c %a "${executabledir}/${execname}")"
+		# Grab the first and second digit for user and group permission
+		userexecperm="${execperm:0:1}"
+		groupexecperm="${execperm:1:1}"
+		# Check for invalid user permission
+		if [ "${userexecperm}" == "0" ] || [ "${userexecperm}" == "2" ] || [ "${userexecperm}" == "4" ]  || [ "${userexecperm}" == "6" ]; then
+			# If user permission is invalid, then check for invalid group permissions
+			if [ "${groupexecperm}" == "0" ] || [ "${groupexecperm}" == "2" ] || [ "${groupexecperm}" == "4" ]  || [ "${groupexecperm}" == "6" ]; then
+				# If permission issues are found
+				fn_print_warn_nl "Permissions issue found"
+				fn_script_log_warn "Permissions issue found"
+				fn_print_information_nl "The following file is not executable:"
+				ls -l "${executabledir}/${execname}"
+				fn_script_log_info "The following file is not executable:"
+				fn_script_log_info "${executabledir}/${execname}"
+				fn_print_information_nl "Applying chmod u+x,g+x ${executabledir}/${execname}"
+				fn_script_log_info "Applying chmod u+x,g+x ${execperm}"
+				# Make the executable executable
+				chmod u+x,g+x "${executabledir}/${execname}"
+				# Second check to see if it's been successfully applied
+				# Get permission numbers on file under the form 775
+				execperm="$(stat -c %a "${executabledir}/${execname}")"
+				# Grab the first and second digit for user and group permission
+				userexecperm="${execperm:0:1}"
+				groupexecperm="${execperm:1:1}"
+				if [ "${userexecperm}" == "0" ] || [ "${userexecperm}" == "2" ] || [ "${userexecperm}" == "4" ]  || [ "${userexecperm}" == "6" ]; then
+					if [ "${groupexecperm}" == "0" ] || [ "${groupexecperm}" == "2" ] || [ "${groupexecperm}" == "4" ]  || [ "${groupexecperm}" == "6" ]; then
+					# If errors are still found
+					fn_print_fail_nl "The following file could not be set executable:"
+					ls -l "${executabledir}/${execname}"
+					fn_script_log_warn "The following file could not be set executable:"
+					fn_script_log_info "${executabledir}/${execname}"
+					core_exit.sh
+					fi
+				fi
+			fi
+		fi
+	fi
 }
 
 fn_check_ownership

+ 3 - 1
lgsm/functions/check_status.sh

@@ -21,9 +21,11 @@ if [ "${gamename}" == "TeamSpeak 3" ]; then
 	fi
 	
 elif [ "${gamename}" == "Mumble" ]; then
+	# Get config info
+	info_config.sh
 	# 1: Server is listening
 	# 0: Server is not listening, considered closed
-	mumblepid=$(netstat -nap  2>/dev/null | grep udp | grep 64738 | grep murmur | awk '{ print $6 }' | awk -F'/' '{ print $1 }')
+	mumblepid=$(netstat -nap  2>/dev/null | grep udp | grep ${port} | grep murmur | awk '{ print $6 }' | awk -F'/' '{ print $1 }')
 	if [ -z "${mumblepid}" ]; then
 		status=0
 	else

+ 5 - 6
lgsm/functions/check_system_requirements.sh

@@ -14,14 +14,13 @@ info_distro.sh
 if [ "${gamename}" == "Rust" ]; then
 	ramrequirementmb="4000"
 	ramrequirementgb="4"
-fi
-
-if [ "${gamename}" == "ARMA 3" ]; then
+elif [ "${gamename}" == "ARMA 3" ]; then
 	ramrequirementmb="1000"
 	ramrequirementgb="1"
-fi
-
-if [ "${gamename}" == "Minecraft" ]; then
+elif [ "${gamename}" == "Minecraft" ]; then
+	ramrequirementmb="1000"
+	ramrequirementgb="1"
+elif [ "${gamename}" == "Natural Selection 2" ]||[ "${gamename}" == "NS2: Combat" ]; then
 	ramrequirementmb="1000"
 	ramrequirementgb="1"
 fi

+ 32 - 0
lgsm/functions/check_tmuxception.sh

@@ -0,0 +1,32 @@
+#!/bin/bash
+# LGSM check_config.sh function
+# Author: Daniel Gibbs
+# Contributor: UltimateByte
+# Website: https://gameservermanagers.com
+# Description: Checks if run from tmux or screen
+
+local commandname="check"
+
+fn_check_is_in_tmux(){
+  if [ -n "${TMUX}" ];then
+		fn_print_fail_nl "tmuxception error: Sorry Cobb you cannot start a tmux session inside of a tmux session."
+		fn_script_log_fatal "tmuxception error: Attempted to start a tmux session inside of a tmux session."
+		fn_print_information_nl "LGSM creates a tmux session when starting the server."
+		echo "It is not possible to run a tmux session inside another tmux session"
+		echo "https://github.com/GameServerManagers/LinuxGSM/wiki/Tmux#tmuxception"
+		core_exit.sh
+	fi
+}
+fn_check_is_in_screen(){
+	if [ "$TERM" == "screen" ];then
+		fn_print_fail_nl "tmuxception error: Sorry Cobb you cannot start a tmux session inside of a screen session."
+		fn_script_log_fatal "tmuxception error: Attempted to start a tmux session inside of a screen session."
+		fn_print_information_nl "LGSM creates a tmux session when starting the server."
+		echo "It is not possible to run a tmux session inside screen session"
+		echo "https://github.com/GameServerManagers/LinuxGSM/wiki/Tmux#tmuxception"
+		core_exit.sh
+	fi
+}
+
+fn_check_is_in_tmux
+fn_check_is_in_screen

+ 3 - 1
lgsm/functions/command_details.sh

@@ -227,6 +227,8 @@ fn_details_script(){
 		if [ -n "${servercfgfullpath}" ]; then
 			if [ -f "${servercfgfullpath}" ]; then
 				echo -e "${blue}Config file:\t${default}${servercfgfullpath}"
+			elif [ -d "${servercfgfullpath}" ]; then
+				echo -e "${blue}Config dir:\t${default}${servercfgfullpath}"
 			else
 				echo -e "${blue}Config file:\t${default}${red}${servercfgfullpath}${default} (${red}FILE MISSING${default})"
 			fi
@@ -426,7 +428,7 @@ fn_details_source(){
 		echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
 		echo -e "> Game/RCON\tINBOUND\t${port}\ttcp/udp"
 		if [ -n "${sourcetvport}" ]; then
-		        echo -e "> SourceTV\tINBOUND\t${sourcetvport}\tudp"
+			echo -e "> SourceTV\tINBOUND\t${sourcetvport}\tudp"
 		fi
 		echo -e "< Client\tOUTBOUND\t${clientport}\tudp"
 	} | column -s $'\t' -t

+ 12 - 12
lgsm/functions/command_fastdl.sh

@@ -3,7 +3,7 @@
 # Author: Daniel Gibbs
 # Contributor: UltimateByte
 # Website: https://gameservermanagers.com
-# Description: Creates a FastDL folder.
+# Description: Creates a FastDL directory.
 
 local commandname="FASTDL"
 local commandaction="FastDL"
@@ -52,7 +52,7 @@ fn_fastdl_init(){
 	done
 	fn_script_log "Initiating FastDL creation"
 
-	# Check and create folders
+	# Check and create directories
 	if [ ! -d "${webdir}" ]; then
 		echo ""
 		fn_print_info "Creating FastDL directories"
@@ -67,7 +67,7 @@ fn_fastdl_init(){
 		echo -en "\n"
 	fi
 	if [ ! -d "${fastdldir}" ]; then
-		# No folder, won't ask for removing old ones
+		# No directory, won't ask for removing old ones
 		newfastdl=1
 		fn_print_dots "Creating fastdl directory"
 		sleep 0.5
@@ -88,7 +88,7 @@ fn_fastdl_config(){
 	fn_script_log "Configuration"
 	sleep 2
 	echo -en "\n"
-	# Prompt for clearing old files if folder was already here
+	# Prompt for clearing old files if directory was already here
 	if [ -n "${newfastdl}" ] && [ "${newfastdl}" == "0" ]; then
 		fn_print_dots
 		while true; do
@@ -133,12 +133,12 @@ fn_fastdl_gmod_config(){
 fn_clear_old_fastdl(){
 	# Clearing old FastDL if user answered yes
 	if [ "${clearoldfastdl}" == "on" ]; then
-		fn_print_info "Clearing existing FastDL folder"
-		fn_script_log "Clearing existing FastDL folder"
+		fn_print_info "Clearing existing FastDL directory"
+		fn_script_log "Clearing existing FastDL directory"
 		sleep 0.5
 		rm -R "${fastdldir:?}"/*
-		fn_print_ok "Old FastDL folder cleared"
-		fn_script_log "Old FastDL folder cleared"
+		fn_print_ok "Old FastDL directory cleared"
+		fn_script_log "Old FastDL directory cleared"
 		sleep 1
 		echo -en "\n"
 	fi
@@ -152,7 +152,7 @@ fn_gmod_fastdl(){
 	sleep 1
 	echo -en "\n"
 
-	# No choice to cd to the directory, as find can't then display relative folder
+	# No choice to cd to the directory, as find can't then display relative directory
 	cd "${systemdir}"
 
 	# Map Files
@@ -221,7 +221,7 @@ fn_gmod_fastdl(){
 	# Going back to rootdir in order to prevent mistakes
 	cd "${rootdir}"
 
-	# Correct addons folder structure for FastDL
+	# Correct addons directory structure for FastDL
 	if [ -d "${fastdldir}/addons" ]; then
 		fn_print_info "Adjusting addons' file structure"
 		fn_script_log "Adjusting addon's file structure"
@@ -233,7 +233,7 @@ fn_gmod_fastdl(){
 		echo -en "\n"
 	fi
 
-	# Correct content that may be into a lua folder by mistake like some darkrpmodification addons
+	# Correct content that may be into a lua directory by mistake like some darkrpmodification addons
 	if [ -d "${fastdldir}/lua" ]; then
 		fn_print_dots "Typical DarkRP shit detected, fixing"
 		sleep 2
@@ -244,7 +244,7 @@ fn_gmod_fastdl(){
 	fi
 }
 
-# Generate lua file that will force download any file into the FastDL folder
+# Generate lua file that will force download any file into the FastDL directory
 fn_lua_fastdl(){
 	# Remove lua file if luaressource is turned off and file exists
 	echo ""

+ 3 - 1
lgsm/functions/command_stop.sh

@@ -245,8 +245,10 @@ fn_stop_teamspeak3(){
 }
 
 fn_stop_mumble(){
+	# Get needed port info
+	info_config.sh
 	fn_print_dots "Stopping ${servername}"
-	mumblepid=$(netstat -nap  2>/dev/null | grep udp | grep 64738 | grep murmur | awk '{ print $6 }' | awk -F'/' '{ print $1 }')
+	mumblepid=$(netstat -nap  2>/dev/null | grep udp | grep "${port}" | grep murmur | awk '{ print $6 }' | awk -F'/' '{ print $1 }')
 	kill ${mumblepid}
 	sleep 1
 	check_status.sh

+ 3 - 7
lgsm/functions/core_functions.sh

@@ -116,7 +116,7 @@ fn_fetch_core_dl
 }
 
 
-# Command
+# Commands
 
 command_console.sh(){
 functionfile="${FUNCNAME}"
@@ -258,7 +258,7 @@ functionfile="${FUNCNAME}"
 fn_fetch_function
 }
 
-check_tmux.sh(){
+check_tmuxception.sh(){
 functionfile="${FUNCNAME}"
 fn_fetch_function
 }
@@ -299,6 +299,7 @@ functionfile="${FUNCNAME}"
 fn_fetch_function
 }
 
+
 # Fix
 
 fix.sh(){
@@ -543,11 +544,6 @@ functionfile="${FUNCNAME}"
 fn_fetch_function
 }
 
-fix_ut99.sh(){
-functionfile="${FUNCNAME}"
-fn_fetch_function
-}
-
 # Calls the global Ctrl-C trap
 core_trap.sh
 

+ 4 - 1
lgsm/functions/core_getopt.sh

@@ -300,6 +300,8 @@ case "${getopt}" in
 		command_backup.sh;;
 	dev|dev-debug)
 		command_dev_debug.sh;;
+	c|console)
+		command_console.sh;;
 	i|install)
 		command_install.sh;;
 	dd|detect-deps)
@@ -329,6 +331,7 @@ case "${getopt}" in
 		echo -e "${blue}details\t${default}dt |Displays useful information about the server."
 		echo -e "${blue}postdetails\t${default}pd |Post stripped details to pastebin (for support)"
 		echo -e "${blue}backup\t${default}b  |Create archive of the server."
+		echo -e "${blue}debug\t${default}d  |See the output of the server directly to your terminal."
 		echo -e "${blue}install\t${default}i  |Install the server."
 	} | column -s $'\t' -t
 	esac
@@ -405,7 +408,7 @@ case "${getopt}" in
 		echo -e "${blue}debug\t${default}d  |See the output of the server directly to your terminal."
 		echo -e "${blue}install\t${default}i  |Install the server."
 		echo -e "${blue}auto-install\t${default}ai |Install the server, without prompts."
-		echo -e "${blue}fastdl\t${default}fd |Generates or update a FastDL folder for your server."
+		echo -e "${blue}fastdl\t${default}fd |Generates or update a FastDL directory for your server."
 	} | column -s $'\t' -t
 	esac
 }

+ 28 - 28
lgsm/functions/info_config.sh

@@ -27,15 +27,15 @@ fn_info_config_avalanche(){
 		slots=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]')
 		port=$(grep "BindPort" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]')
 
+		ip=$(grep "BindIP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/BindIP//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		ipsetinconfig=1
+		ipinconfigvar="BindIP"
+
 		# Not Set
 		servername=${servername:-"NOT SET"}
 		serverpassword=${serverpassword:-"NOT SET"}
 		slots=${slots:-"0"}
 		port=${port:-"0"}
-
-		ip=$(grep "BindIP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/BindIP//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
-		ipsetinconfig=1
-		ipinconfigvar="BindIP"
 	fi
 }
 
@@ -54,15 +54,15 @@ fn_info_config_bf1942(){
 		port=$(grep "game.serverPort" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]')
 		queryport="22000"
 
+		ip=$(grep "game.serverIP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverIP//g' | tr -d '=\";,:' | xargs)
+		ipsetinconfig=1
+		ipinconfigvar="game.serverIP"
+
 		# Not Set
 		servername=${servername:-"NOT SET"}
 		serverpassword=${serverpassword:-"NOT SET"}
 		slots=${slots:-"0"}
 		port=${port:-"0"}
-
-		ip=$(grep "game.serverIP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverIP//g' | tr -d '=\";,:' | xargs)
-		ipsetinconfig=1
-		ipinconfigvar="game.serverIP"
 	fi
 }
 
@@ -112,6 +112,10 @@ fn_info_config_minecraft(){
 		gamemode=$(grep "gamemode" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
 		gameworld=$(grep "level-name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/level-name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
 
+		ip=$(grep "server-ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/server-ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		ipsetinconfig=1
+		ipinconfigvar="server-ip"
+
 		# Not Set
 		servername=${servername:-"NOT SET"}
 		rconpassword=${rconpassword:-"NOT SET"}
@@ -121,9 +125,6 @@ fn_info_config_minecraft(){
 		gamemode=${gamemode:-"NOT SET"}
 		gameworld=${gameworld:-"NOT SET"}
 
-		ip=$(grep "server-ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/server-ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
-		ipsetinconfig=1
-		ipinconfigvar="server-ip"
 	fi
 }
 
@@ -165,15 +166,15 @@ fn_info_config_quakelive(){
 		serverpassword=$(grep "g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
 		slots=$(grep "sv_maxClients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
 
+		ip=$(grep "set net_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set net_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		ipsetinconfig=1
+		ipinconfigvar="set net_ip"
+
 		# Not Set
 		rconpassword=${rconpassword:-"NOT SET"}
 		servername=${servername:-"NOT SET"}
 		serverpassword=${serverpassword:-"NOT SET"}
 		slots=${slots:-"0"}
-
-		ip=$(grep "set net_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set net_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
-		ipsetinconfig=1
-		ipinconfigvar="set net_ip"
 	fi
 }
 
@@ -191,6 +192,9 @@ fn_info_config_wolfensteinenemyterritory(){
 		serverpassword=$(grep "set g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
 		slots=$(grep "set sv_maxclients" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]')
 
+		ip=$(grep "set net_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set net_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		ipsetinconfig=1
+		ipinconfigvar="set net_ip"
 
 		# Not Set
 		rconpassword=${rconpassword:-"NOT SET"}
@@ -198,10 +202,6 @@ fn_info_config_wolfensteinenemyterritory(){
 		serverpassword=${serverpassword:-"NOT SET"}
 		slots=${slots:-"0"}
 		port=${port:-"27960"}
-
-		ip=$(grep "set net_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set net_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
-		ipsetinconfig=1
-		ipinconfigvar="set net_ip"
 	fi
 }
 
@@ -303,14 +303,14 @@ fn_info_config_teamspeak3(){
 		queryport=$(grep "query_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
 		fileport=$(grep "filetransfer_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
 
+		ip=$(grep "voice_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/voice_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		ipsetinconfig=1
+		ipinconfigvar="voice_ip"
+
 		# Not Set
 		port=${port:-"9987"}
 		queryport=${queryport:-"10011"}
 		fileport=${fileport:-"30033"}
-
-		ip=$(grep "voice_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/voice_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
-		ipsetinconfig=1
-		ipinconfigvar="voice_ip"
 	fi
 }
 
@@ -323,14 +323,14 @@ fn_info_config_mumble(){
 		port=$(grep "port" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^;/d' -e 's/port//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
 		queryport="${port}"
 
+		ip=$(grep "host=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^;/d' -e 's/host=//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		ipsetinconfig=1
+		ipinconfigvar="voice_ip"
+
 		# Not Set
 		port=${port:-"64738"}
 		queryport=${queryport:-"64738"}
 		servername="Mumble Port ${port}"
-
-		ip=$(cat "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^;/d' -e 's/voice_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
-		ipsetinconfig=1
-		ipinconfigvar="voice_ip"
 	fi
 }
 
@@ -515,4 +515,4 @@ elif [ "${gamename}" == "7 Days To Die" ]; then
 	fn_info_config_sdtd
 elif [ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then
 	fn_info_config_wolfensteinenemyterritory
-fi
+fi

+ 13 - 11
lgsm/functions/info_parms.sh

@@ -26,17 +26,6 @@ fn_info_config_quakelive(){
 	rconpassword=${rconpassword:-"NOT SET"}
 }
 
-fn_info_config_realvirtuality(){
-	port=$(grep "^serverport=" "${servercfgfullpath}" | tr -cd '[:digit:]')
-	queryport=$(grep "^steamqueryport=" "${servercfgfullpath}" | tr -cd '[:digit:]')
-	masterport=$(grep "^steamport=" "${servercfgfullpath}" | tr -cd '[:digit:]')
-
-	# Not Set
-	port=${port:-"2302"}
-	queryport=${queryport:-"2303"}
-	masterport=${masterport:-"2304"}
-}
-
 fn_info_config_source(){
 	defaultmap=${defaultmap:-"NOT SET"}
 	maxplayers=${maxplayers:-"0"}
@@ -44,6 +33,16 @@ fn_info_config_source(){
 	clientport=${clientport:-"0"}
 }
 
+fn_info_config_spark(){
+	# Not Set
+	port=${port:-"0"}
+	queryport=$((port + 1))
+	maxplayers=${maxplayers:-"0"}
+	webadminuser=${webadminuser:-"NOT SET"}
+	webadminpass=${webadminpass:-"NOT SET"}
+	webadminport=${webadminport:-"0"}
+}
+
 fn_info_config_teeworlds(){
 	if [ ! -f "${servercfgfullpath}" ]; then
 		servername="unnamed server"
@@ -139,6 +138,9 @@ elif [ "${engine}" == "seriousengine35" ]; then
 # Source Engine Games
 elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
 	fn_info_config_source
+# Spark
+elif [ "${engine}" == "spark" ]; then
+	fn_info_config_spark
 # Teeworlds
 elif [ "${engine}" == "teeworlds" ]; then
 	fn_info_config_teeworlds

+ 7 - 3
lgsm/functions/install_config.sh

@@ -39,8 +39,8 @@ fn_set_config_vars(){
 # Checks if cfg dir exists, creates it if it doesn't
 fn_check_cfgdir(){
 	if [ ! -d "${servercfgdir}" ]; then
-		echo "creating ${servercfgdir} config folder."
-		fn_script_log_info "creating ${servercfgdir} config folder."
+		echo "creating ${servercfgdir} config directory."
+		fn_script_log_info "creating ${servercfgdir} config directory."
 		mkdir -pv "${servercfgdir}"
 	fi
 }
@@ -270,7 +270,11 @@ elif [ "${gamename}" == "No More Room in Hell" ]; then
 	fn_default_config_remote
 	fn_set_config_vars
 elif [ "${gamename}" == "Mumble" ]; then
-	:
+	gamedirname="Mumble"
+	array_configs+=( murmur.ini )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "Natural Selection 2" ]; then
 	:
 elif [ "${gamename}" == "NS2: Combat" ]; then

+ 2 - 2
lgsm/functions/logs.sh

@@ -15,7 +15,7 @@ if [ -n "${consolelog}" ]; then
 	fi
 fi
 
-# For games not displaying a console, and having logs into their game folder
+# For games not displaying a console, and having logs into their game directory
 if [ "${function_selfname}" == "command_start.sh" ] && [ -n "${gamelogfile}" ]; then
 	if [ -n "$(find "${systemdir}" -name "gamelog*.log")" ]; then
 		fn_print_info "Moving game logs to ${gamelogdir}"
@@ -86,7 +86,7 @@ if [ $(find "${scriptlogdir}"/ -type f -mtime +"${logdays}"|wc -l) -ne "0" ]; th
 		find "${legacyserverlogdir}"/ -type f -mtime +"${logdays}"| tee >> "${scriptlog}"
 		legacycount=$(find "${legacyserverlogdir}"/ -type f -mtime +"${logdays}"|wc -l)
 		find "${legacyserverlogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \;
-		# Remove folder if empty
+		# Remove directory if empty
 		if [ ! "$(ls -A "${legacyserverlogdir}")" ]; then
 		rm -rf "${legacyserverlogdir}"
 		fi