Browse Source

Merge remote-tracking branch 'refs/remotes/origin/master' into functions-renaming-merge

# Conflicts:
#	functions/check.sh
#	functions/command_details.sh
#	functions/command_install.sh
#	functions/fn_functions
Daniel Gibbs 10 years ago
parent
commit
ffa128b710

+ 9 - 1
Arma3/arma3server

@@ -25,10 +25,11 @@ steampass="password"
 
 
 # Start Variables
 # Start Variables
 ip="0.0.0.0"
 ip="0.0.0.0"
+port="2302"
 updateonstart="off"
 updateonstart="off"
 
 
 fn_parms(){
 fn_parms(){
-parms="-netlog -ip=${ip} -cfg=${networkcfgfullpath} -config=${servercfgfullpath} -mod=${mods}"
+parms="-netlog -ip=${ip} -port=${port} -cfg=${networkcfgfullpath} -config=${servercfgfullpath} -mod=${mods} -servermod=${servermods} -bepath=${bepath} -autoinit -loadmissiontomemory"
 }
 }
 
 
 # ARMA 3 Modules
 # ARMA 3 Modules
@@ -39,6 +40,13 @@ parms="-netlog -ip=${ip} -cfg=${networkcfgfullpath} -config=${servercfgfullpath}
 # and chmod modules directories to 775
 # and chmod modules directories to 775
 mods=""
 mods=""
 
 
+# Server-side Mods
+servermods=""
+
+# Path to BattlEye
+# leave empty for default
+bepath=""
+
 #### Advanced Variables ####
 #### Advanced Variables ####
 
 
 # Github Branch Select
 # Github Branch Select

+ 16 - 5
Arma3/cfg/lgsm-default.server.cfg

@@ -5,18 +5,20 @@
 
 
 
 
 // PORTS
 // PORTS
-
+// please specify the serverport as a parameter in arma3server executable
+// it will automatically use the serverport including the next 3 for steam query & steam master.
+// the fourth port ist not documented in https://community.bistudio.com/wiki/Arma_3_Dedicated_Server#Port_Forwarding
 // Server Port
 // Server Port
 //  default: 2302.
 //  default: 2302.
-serverport=2302;
+// serverport=2302;
 
 
 // Steam Master Port
 // Steam Master Port
 //  default: 2304.
 //  default: 2304.
-steamport=2304;
+// steamport=2304;
 
 
 // Steam Query Port
 // Steam Query Port
 //  default: 2303.
 //  default: 2303.
-steamqueryport=2303;
+//steamqueryport=2303;
 
 
 
 
 // GENERAL SETTINGS
 // GENERAL SETTINGS
@@ -119,4 +121,13 @@ doubleIdDetected = "";					//
 // ban = ban (_this select 0)
 // ban = ban (_this select 0)
 onUnsignedData = "kick (_this select 0)";
 onUnsignedData = "kick (_this select 0)";
 onHackedData = 	"kick (_this select 0)";
 onHackedData = 	"kick (_this select 0)";
-onDifferentData = "";
+onDifferentData = "";
+
+// HEADLESS CLIENT SUPPORT
+// specify ip-adresses of allowed headless clients
+// if more than one:
+// headlessClients[]={"127.0.0.1", "192.168.0.1"};
+// localClient[]={"127.0.0.1", "192.168.0.1"};
+headlessClients[]={"127.0.0.1"};
+localClient[]={"127.0.0.1"};
+battleyeLicense=1;

+ 152 - 0
Hurtworld/hwserver

@@ -0,0 +1,152 @@
+#!/bin/bash
+# Hurtworld
+# Server Management Script
+# Author: Daniel Gibbs,
+# Contributor: UltimateByte
+# Website: http://gameservermanagers.com
+if [ -f ".dev-debug" ]; then
+	exec 5>dev-debug.log
+	BASH_XTRACEFD="5"
+	set -x
+fi
+
+version="191215"
+
+#### Variables ####
+
+# Notification Email
+# (on|off)
+emailnotification="off"
+email="email@example.com"
+
+# Steam login
+steamuser="anonymous"
+steampass=""
+
+# Server settings
+servername="Hurtworld LGSM Server"
+ip="0.0.0.0"
+port="12871"
+queryport="12881"
+maxplayers="20"
+map="" #Optional
+creativemode="0" #Free Build
+logfile="gamelog.txt"
+
+# Adding admins using STEAMID64
+# Example : addadmin 012345678901234567; addadmin 987654321098765432
+admins=""
+
+# Advanced
+# Rollback server state (remove after start command)
+loadsave=""
+# Use unstable 64 bit server executable (O/1)
+x64mode="0"
+
+# http://hurtworld.wikia.com/wiki/Hosting_A_Server
+fn_parms(){
+parms="-batchmode -nographics -exec \"host ${port} ${map} ${loadsave};queryport ${queryport};maxplayers ${maxplayers};servername ${servername};creativemode ${creativemode};${admins}\" -logfile \"${logfile}\" "
+}
+
+#### Advanced Variables ####
+
+# Github Branch Select
+# Allows for the use of different function files
+# from a different repo and/or branch.
+githubuser="dgibbs64"
+githubrepo="linuxgsm"
+githubbranch="hurt-world"
+
+# Steam
+appid="405100"
+
+# Server Details
+servicename="hurtworld-server"
+gamename="Hurtworld"
+engine="unity3d"
+
+# Directories
+rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))"
+selfname=$(basename $(readlink -f "${BASH_SOURCE[0]}"))
+lockselfname=".${servicename}.lock"
+filesdir="${rootdir}/serverfiles"
+systemdir="${filesdir}"
+executabledir="${filesdir}"
+if [ "${x64mode}" == "1" ]; then
+	executable="./Hurtworld.x86_64"
+else
+	executable="./Hurtworld.x86"
+fi
+backupdir="${rootdir}/backups"
+
+# Logging
+logdays="7"
+gamelogdir="${rootdir}/log/server"
+scriptlogdir="${rootdir}/log/script"
+consolelogdir="${rootdir}/log/console"
+
+gamelog="${gamelogdir}/${servicename}-game.log"
+scriptlog="${scriptlogdir}/${servicename}-script.log"
+consolelog="${consolelogdir}/${servicename}-console.log"
+emaillog="${scriptlogdir}/${servicename}-email.log"
+
+scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log"
+consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log"
+
+##### Script #####
+# Do not edit
+
+fn_getgithubfile(){
+filename=$1
+exec=$2
+fileurl=${3:-$filename}
+filepath="${rootdir}/${filename}"
+filedir=$(dirname "${filepath}")
+# If the function file is missing, then download
+if [ ! -f "${filepath}" ]; then
+	if [ ! -d "${filedir}" ]; then
+		mkdir "${filedir}"
+	fi
+	githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${fileurl}"
+	echo -e "    fetching ${filename}...\c"
+	if [ "$(command -v curl)" ]||[ "$(which curl >/dev/null 2>&1)" ]||[ -f "/usr/bin/curl" ]||[ -f "/bin/curl" ]; then
+		:
+	else	
+		echo -e "\e[0;31mFAIL\e[0m\n"
+		echo "Curl is not installed!"
+		echo -e ""
+		exit
+	fi
+	curl=$(curl --fail -o "${filepath}" "${githuburl}" 2>&1)
+	if [ $? -ne 0 ]; then
+		echo -e "\e[0;31mFAIL\e[0m\n"
+		echo "		${curl}"|grep "curl:"
+		echo -e "${githuburl}\n"
+		exit
+	else
+		echo -e "\e[0;32mOK\e[0m"
+	fi	
+	if [ "${exec}" ]; then
+		chmod +x "${filepath}"
+	fi
+fi
+if [ "${exec}" ]; then
+	source "${filepath}"
+fi
+}
+
+fn_runfunction(){
+	fn_getgithubfile "functions/${functionfile}" 1
+}
+
+fn_functions(){
+# Functions are defined in fn_functions.
+functionfile="${FUNCNAME}"
+fn_runfunction
+}
+
+fn_functions
+
+getopt=$1
+fn_getopt
+

+ 20 - 0
TeamSpeak3/cfg/lgsm-default.ini

@@ -0,0 +1,20 @@
+machine_id=
+default_voice_port=9987
+voice_ip=0.0.0.0
+licensepath=
+filetransfer_port=30033
+filetransfer_ip=0.0.0.0
+query_port=10011
+query_ip=0.0.0.0
+query_ip_whitelist=query_ip_whitelist.txt
+query_ip_blacklist=query_ip_blacklist.txt
+dbplugin=ts3db_sqlite3
+dbpluginparameter=
+dbsqlpath=sql/
+dbsqlcreatepath=create_sqlite/
+dbconnections=10
+logpath=logs
+logquerycommands=0
+dbclientkeepdays=30
+logappend=0
+query_skipbruteforcecheck=0

+ 2 - 1
TeamSpeak3/ts3server

@@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 	set -x
 fi
 fi
 
 
-version="201215"
+version="251215"
 
 
 #### Variables ####
 #### Variables ####
 
 
@@ -37,6 +37,7 @@ executable="./ts3server_startscript.sh"
 servercfg="${servicename}.ini"
 servercfg="${servicename}.ini"
 servercfgdir="${filesdir}"
 servercfgdir="${filesdir}"
 servercfgfullpath="${servercfgdir}/${servercfg}"
 servercfgfullpath="${servercfgdir}/${servercfg}"
+servercfgdefault="${servercfgdir}/lgsm-default.ini"
 backupdir="${rootdir}/backups"
 backupdir="${rootdir}/backups"
 
 
 # Logging
 # Logging

+ 179 - 144
functions/command_details.sh

@@ -2,14 +2,14 @@
 # LGSM command_details.sh function
 # LGSM command_details.sh function
 # Author: Daniel Gibbs
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 # Website: http://gameservermanagers.com
-lgsm_version="211215"
+lgsm_version="261215"
 
 
 # Description: Displays server infomation.
 # Description: Displays server infomation.
 
 
 # Standard Details
 # Standard Details
 # This applies to all engines
 # This applies to all engines
 
 
-command_details.sh_os(){
+fn_details_os(){
 echo -e ""
 echo -e ""
 echo -e "\e[93mDistro Details\e[0m"
 echo -e "\e[93mDistro Details\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
@@ -23,7 +23,7 @@ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
 } | column -s $'\t' -t 
 } | column -s $'\t' -t 
 }
 }
 
 
-command_details.sh_performance(){
+fn_details_performance(){
 echo -e ""
 echo -e ""
 echo -e "\e[93mPerformance\e[0m"
 echo -e "\e[93mPerformance\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
@@ -39,7 +39,7 @@ echo -e ""
 } | column -s $'\t' -t 
 } | column -s $'\t' -t 
 }
 }
 
 
-command_details.sh_disk(){
+fn_details_disk(){
 echo -e ""
 echo -e ""
 echo -e "\e[93mStorage\e[0m"
 echo -e "\e[93mStorage\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
@@ -55,7 +55,7 @@ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
 } | column -s $'\t' -t 
 } | column -s $'\t' -t 
 }
 }
 
 
-command_details.sh_gameserver(){
+fn_details_gameserver(){
 echo -e ""
 echo -e ""
 
 
 ## server details
 ## server details
@@ -180,7 +180,7 @@ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
 } | column -s $'\t' -t 
 } | column -s $'\t' -t 
 }
 }
 
 
-command_details.sh_backup(){
+fn_details_backup(){
 echo -e ""
 echo -e ""
 echo -e "\e[92mBackups\e[0m"
 echo -e "\e[92mBackups\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
@@ -197,14 +197,14 @@ else
 fi
 fi
 }
 }
 
 
-command_details.sh_commandlineparms(){
+fn_details_commandlineparms(){
 echo -e ""
 echo -e ""
 echo -e "\e[92mCommand-line Parameters\e[0m"
 echo -e "\e[92mCommand-line Parameters\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
 echo -e "${executable} ${parms}"
 echo -e "${executable} ${parms}"
 }
 }
 
 
-command_details.sh_statusbottom(){
+fn_details_statusbottom(){
 echo -e ""
 echo -e ""
 if [ "${gamename}" == "Teamspeak 3" ]; then
 if [ "${gamename}" == "Teamspeak 3" ]; then
 	if [ "${ts3status}" = "Server seems to have died" ] || [ "${ts3status}"	= "No server running (ts3server.pid is missing)" ]; then
 	if [ "${ts3status}" = "Server seems to have died" ] || [ "${ts3status}"	= "No server running (ts3server.pid is missing)" ]; then
@@ -225,15 +225,15 @@ echo -e ""
 
 
 # Engine Specific details
 # Engine Specific details
 
 
-command_details.sh_avalanche(){
+fn_details_avalanche(){
 check_ip.sh
 check_ip.sh
 info_config.sh
 info_config.sh
 info_distro.sh
 info_distro.sh
-command_details.sh_os
-command_details.sh_performance
-command_details.sh_disk
-command_details.sh_gameserver
-command_details.sh_backup
+fn_details_os
+fn_details_performance
+fn_details_disk
+fn_details_gameserver
+fn_details_backup
 echo -e ""
 echo -e ""
 echo -e "\e[92mPorts\e[0m"
 echo -e "\e[92mPorts\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
@@ -248,18 +248,18 @@ echo -e ""
 	echo -e "> Game\tINBOUND\t${port}\tudp"
 	echo -e "> Game\tINBOUND\t${port}\tudp"
 } | column -s $'\t' -t 
 } | column -s $'\t' -t 
 
 
-command_details.sh_statusbottom
+fn_details_statusbottom
 }
 }
 
 
-command_details.sh_dontstarve(){
+fn_details_dontstarve(){
 check_ip.sh
 check_ip.sh
 info_config.sh
 info_config.sh
 info_distro.sh
 info_distro.sh
-command_details.sh_os
-command_details.sh_performance
-command_details.sh_disk
-command_details.sh_gameserver
-command_details.sh_backup
+fn_details_os
+fn_details_performance
+fn_details_disk
+fn_details_gameserver
+fn_details_backup
 echo -e ""
 echo -e ""
 echo -e "\e[92mPorts\e[0m"
 echo -e "\e[92mPorts\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
@@ -274,18 +274,18 @@ echo -e ""
 	echo -e "> Game\tINBOUND\t${port}\tudp"
 	echo -e "> Game\tINBOUND\t${port}\tudp"
 } | column -s $'\t' -t 
 } | column -s $'\t' -t 
 
 
-command_details.sh_statusbottom
+fn_details_statusbottom
 }
 }
 
 
-command_details.sh_projectzomboid(){
+fn_details_projectzomboid(){
 check_ip.sh
 check_ip.sh
 info_config.sh
 info_config.sh
 info_distro.sh
 info_distro.sh
-command_details.sh_os
-command_details.sh_performance
-command_details.sh_disk
-command_details.sh_gameserver
-command_details.sh_backup
+fn_details_os
+fn_details_performance
+fn_details_disk
+fn_details_gameserver
+fn_details_backup
 echo -e ""
 echo -e ""
 echo -e "\e[92mPorts\e[0m"
 echo -e "\e[92mPorts\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
@@ -300,21 +300,21 @@ echo -e ""
 	echo -e "> Game\tINBOUND\t${port}\tudp"
 	echo -e "> Game\tINBOUND\t${port}\tudp"
 } | column -s $'\t' -t 
 } | column -s $'\t' -t 
 
 
-command_details.sh_statusbottom
+fn_details_statusbottom
 }
 }
 
 
 
 
-command_details.sh_realvirtuality(){
+fn_details_realvirtuality(){
 check_ip.sh
 check_ip.sh
 fn_parms
 fn_parms
 info_config.sh
 info_config.sh
 info_distro.sh
 info_distro.sh
-command_details.sh_os
-command_details.sh_performance
-command_details.sh_disk
-command_details.sh_gameserver
-command_details.sh_backup
-command_details.sh_commandlineparms
+fn_details_os
+fn_details_performance
+fn_details_disk
+fn_details_gameserver
+fn_details_backup
+fn_details_commandlineparms
 echo -e ""
 echo -e ""
 echo -e "\e[92mPorts\e[0m"
 echo -e "\e[92mPorts\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
@@ -335,20 +335,20 @@ fi
 	echo -e "> Steam: Master traffic\tINBOUND\t${masterport}\tudp"
 	echo -e "> Steam: Master traffic\tINBOUND\t${masterport}\tudp"
 } | column -s $'\t' -t 
 } | column -s $'\t' -t 
 
 
-command_details.sh_statusbottom
+fn_details_statusbottom
 }
 }
 
 
-command_details.sh_seriousengine35(){
+fn_details_seriousengine35(){
 check_ip.sh
 check_ip.sh
 fn_parms
 fn_parms
 info_config.sh
 info_config.sh
 info_distro.sh
 info_distro.sh
-command_details.sh_os
-command_details.sh_performance
-command_details.sh_disk
-command_details.sh_gameserver
-command_details.sh_backup
-command_details.sh_commandlineparms
+fn_details_os
+fn_details_performance
+fn_details_disk
+fn_details_gameserver
+fn_details_backup
+fn_details_commandlineparms
 echo -e ""
 echo -e ""
 echo -e "\e[92mPorts\e[0m"
 echo -e "\e[92mPorts\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
@@ -364,20 +364,20 @@ echo -e ""
 	echo -e "> Query\tINBOUND\t${queryport}\tudp"
 	echo -e "> Query\tINBOUND\t${queryport}\tudp"
 } | column -s $'\t' -t 
 } | column -s $'\t' -t 
 
 
-command_details.sh_statusbottom
+fn_details_statusbottom
 }
 }
 
 
-command_details.sh_source(){
+fn_details_source(){
 check_ip.sh
 check_ip.sh
 fn_parms
 fn_parms
 info_config.sh
 info_config.sh
 info_distro.sh
 info_distro.sh
-command_details.sh_os
-command_details.sh_performance
-command_details.sh_disk
-command_details.sh_gameserver
-command_details.sh_backup
-command_details.sh_commandlineparms
+fn_details_os
+fn_details_performance
+fn_details_disk
+fn_details_gameserver
+fn_details_backup
+fn_details_commandlineparms
 echo -e ""
 echo -e ""
 echo -e "\e[92mPorts\e[0m"
 echo -e "\e[92mPorts\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
@@ -396,20 +396,20 @@ echo -e ""
 	echo -e "< Client\tOUTBOUND\t${clientport}\tudp"
 	echo -e "< Client\tOUTBOUND\t${clientport}\tudp"
 } | column -s $'\t' -t
 } | column -s $'\t' -t
 
 
-command_details.sh_statusbottom
+fn_details_statusbottom
 }
 }
 
 
-command_details.sh_spark(){
+fn_details_spark(){
 check_ip.sh
 check_ip.sh
 fn_parms
 fn_parms
 info_config.sh
 info_config.sh
 info_distro.sh
 info_distro.sh
-command_details.sh_os
-command_details.sh_performance
-command_details.sh_disk
-command_details.sh_gameserver
-command_details.sh_backup
-command_details.sh_commandlineparms
+fn_details_os
+fn_details_performance
+fn_details_disk
+fn_details_gameserver
+fn_details_backup
+fn_details_commandlineparms
 echo -e ""
 echo -e ""
 echo -e "\e[92mPorts\e[0m"
 echo -e "\e[92mPorts\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
@@ -434,20 +434,20 @@ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
 	echo -e "\e[34mWebAdmin password:\t\e[0m${webadminpass}"
 	echo -e "\e[34mWebAdmin password:\t\e[0m${webadminpass}"
 } | column -s $'\t' -t
 } | column -s $'\t' -t
 
 
-command_details.sh_statusbottom
+fn_details_statusbottom
 }
 }
 
 
-command_details.sh_starbound(){
+fn_details_starbound(){
 check_ip.sh
 check_ip.sh
 fn_parms
 fn_parms
 info_config.sh
 info_config.sh
 info_distro.sh
 info_distro.sh
-command_details.sh_os
-command_details.sh_performance
-command_details.sh_disk
-command_details.sh_gameserver
-command_details.sh_backup
-command_details.sh_commandlineparms
+fn_details_os
+fn_details_performance
+fn_details_disk
+fn_details_gameserver
+fn_details_backup
+fn_details_commandlineparms
 echo -e ""
 echo -e ""
 echo -e "\e[92mPorts\e[0m"
 echo -e "\e[92mPorts\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
@@ -464,19 +464,19 @@ echo -e ""
 	echo -e "> Rcon\tINBOUND\t${rconport}\ttcp"
 	echo -e "> Rcon\tINBOUND\t${rconport}\ttcp"
 } | column -s $'\t' -t
 } | column -s $'\t' -t
 
 
-command_details.sh_statusbottom
+fn_details_statusbottom
 
 
 }
 }
 
 
-command_details.sh_teamspeak3(){
+fn_details_teamspeak3(){
 info_config.sh
 info_config.sh
 info_distro.sh
 info_distro.sh
-command_details.sh_os
-command_details.sh_performance
-command_details.sh_disk
-command_details.sh_gameserver
-command_details.sh_backup
-command_details.sh_commandlineparms
+fn_details_os
+fn_details_performance
+fn_details_disk
+fn_details_gameserver
+fn_details_backup
+fn_details_commandlineparms
 echo -e ""
 echo -e ""
 echo -e "\e[92mPorts\e[0m"
 echo -e "\e[92mPorts\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
@@ -493,20 +493,20 @@ echo -e ""
 	echo -e "> File transfer\tINBOUND\t${fileport}\ttcp"
 	echo -e "> File transfer\tINBOUND\t${fileport}\ttcp"
 } | column -s $'\t' -t
 } | column -s $'\t' -t
 
 
-command_details.sh_statusbottom
+fn_details_statusbottom
 }
 }
 
 
-command_details.sh_teeworlds(){
+fn_details_teeworlds(){
 check_ip.sh
 check_ip.sh
 fn_parms
 fn_parms
 info_config.sh
 info_config.sh
 info_distro.sh
 info_distro.sh
-command_details.sh_os
-command_details.sh_performance
-command_details.sh_disk
-command_details.sh_gameserver
-command_details.sh_backup
-command_details.sh_commandlineparms
+fn_details_os
+fn_details_performance
+fn_details_disk
+fn_details_gameserver
+fn_details_backup
+fn_details_commandlineparms
 echo -e ""
 echo -e ""
 echo -e "\e[92mPorts\e[0m"
 echo -e "\e[92mPorts\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
@@ -521,20 +521,20 @@ echo -e ""
 	echo -e "> Game\tINBOUND\t${port}\ttcp"
 	echo -e "> Game\tINBOUND\t${port}\ttcp"
 } | column -s $'\t' -t
 } | column -s $'\t' -t
 
 
-command_details.sh_statusbottom
+fn_details_statusbottom
 }
 }
 
 
-command_details.sh_terraria(){
+fn_details_terraria(){
 check_ip.sh
 check_ip.sh
 fn_parms
 fn_parms
 info_config.sh
 info_config.sh
 info_distro.sh
 info_distro.sh
-command_details.sh_os
-command_details.sh_performance
-command_details.sh_disk
-command_details.sh_gameserver
-command_details.sh_backup
-command_details.sh_commandlineparms
+fn_details_os
+fn_details_performance
+fn_details_disk
+fn_details_gameserver
+fn_details_backup
+fn_details_commandlineparms
 echo -e ""
 echo -e ""
 echo -e "\e[92mPorts\e[0m"
 echo -e "\e[92mPorts\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
@@ -551,20 +551,20 @@ echo -e ""
 	echo -e "> Rcon\tINBOUND\t${rconport}\ttcp"
 	echo -e "> Rcon\tINBOUND\t${rconport}\ttcp"
 } | column -s $'\t' -t
 } | column -s $'\t' -t
 
 
-command_details.sh_statusbottom
+fn_details_statusbottom
 }
 }
 
 
-command_details.sh_unity3d(){
-check_ip.sh
+fn_details_sdtd(){
+fn_check_ip.sh
 fn_parms
 fn_parms
 info_config.sh
 info_config.sh
 info_distro.sh
 info_distro.sh
-command_details.sh_os
-command_details.sh_performance
-command_details.sh_disk
-command_details.sh_gameserver
-command_details.sh_backup
-command_details.sh_commandlineparms
+fn_details_os
+fn_details_performance
+fn_details_disk
+fn_details_gameserver
+fn_details_backup
+fn_details_commandlineparms
 echo -e ""
 echo -e ""
 echo -e "\e[92mPorts\e[0m"
 echo -e "\e[92mPorts\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
@@ -598,20 +598,51 @@ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
 	echo -e "\e[34mTelnet password:\t\e[0m${telnetpass}"
 	echo -e "\e[34mTelnet password:\t\e[0m${telnetpass}"
 } | column -s $'\t' -t
 } | column -s $'\t' -t
 
 
-command_details.sh_statusbottom
+fn_details_statusbottom
 }
 }
 
 
-command_details.sh_unreal(){
+fn_details_hurtworld(){
+check_ip.sh
+fn_parms
+fn_details_config
+fn_details_distro
+fn_details_os
+fn_details_performance
+fn_details_disk
+fn_details_gameserver
+fn_details_backup
+fn_details_commandlineparms
+echo -e ""
+echo -e "\e[92mPorts\e[0m"
+printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
+echo -e "Change ports by editing the parameters in"
+echo -e "hwserver script"
+echo -e ""
+echo -e "Useful port diagnostic command:"
+echo -e "netstat -atunp | grep Hurtworld.x86"
+echo -e ""
+{
+	echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
+	echo -e "> Game/RCON\tINBOUND\t${port}\tudp"
+	echo -e "> Query\tINBOUND\t${queryport}\tudp"
+
+} | column -s $'\t' -t
+echo -e ""
+
+fn_details_statusbottom
+}
+
+fn_details_unreal(){
 check_ip.sh
 check_ip.sh
 fn_parms
 fn_parms
 info_config.sh
 info_config.sh
 info_distro.sh
 info_distro.sh
-command_details.sh_os
-command_details.sh_performance
-command_details.sh_disk
-command_details.sh_gameserver
-command_details.sh_backup
-command_details.sh_commandlineparms
+fn_details_os
+fn_details_performance
+fn_details_disk
+fn_details_gameserver
+fn_details_backup
+fn_details_commandlineparms
 echo -e ""
 echo -e ""
 echo -e "\e[92mPorts\e[0m"
 echo -e "\e[92mPorts\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
@@ -655,20 +686,20 @@ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
 	echo -e "\e[34mWebAdmin password:\t\e[0m${webadminpass}"
 	echo -e "\e[34mWebAdmin password:\t\e[0m${webadminpass}"
 } | column -s $'\t' -t
 } | column -s $'\t' -t
 
 
-command_details.sh_statusbottom
+fn_details_statusbottom
 }
 }
 
 
-command_details.sh_ark(){
+fn_details_ark(){
 check_ip.sh
 check_ip.sh
 fn_parms
 fn_parms
 info_config.sh
 info_config.sh
 info_distro.sh
 info_distro.sh
-command_details.sh_os
-command_details.sh_performance
-command_details.sh_disk
-command_details.sh_gameserver
-command_details.sh_backup
-command_details.sh_commandlineparms
+fn_details_os
+fn_details_performance
+fn_details_disk
+fn_details_gameserver
+fn_details_backup
+fn_details_commandlineparms
 echo -e ""
 echo -e ""
 echo -e "\e[92mPorts\e[0m"
 echo -e "\e[92mPorts\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
@@ -684,53 +715,57 @@ echo -e ""
 	echo -e "> Query\tINBOUND\t${queryport}\tudp"
 	echo -e "> Query\tINBOUND\t${queryport}\tudp"
 } | column -s $'\t' -t
 } | column -s $'\t' -t
 
 
-command_details.sh_statusbottom
+fn_details_statusbottom
 }
 }
 
 
 if [ ! -e "${servercfgfullpath}" ]; then
 if [ ! -e "${servercfgfullpath}" ]; then
-	echo ""
-	fn_printwarnnl "\e[0;31mCONFIGURATION FILE MISSING!\e[0m"
-	echo "${servercfgfullpath}"
-	echo "Some details cannot be displayed"
-	echo -en ".\r"
-	sleep 1
-	echo -en "..\r"
-	sleep 1
-	echo -en "...\r"
-	sleep 1
-	echo -en "   \r"
+	if [ "${gamename}" != "Hurtworld" ]; then
+		echo ""
+		fn_printwarnnl "\e[0;31mCONFIGURATION FILE MISSING!\e[0m"
+		echo "${servercfgfullpath}"
+		echo "Some details cannot be displayed"
+		echo -en ".\r"
+		sleep 1
+		echo -en "..\r"
+		sleep 1
+		echo -en "...\r"
+		sleep 1
+		echo -en "   \r"
+	fi
 fi
 fi
 
 
 info_glibc.sh
 info_glibc.sh
 
 
 if [ "${engine}" == "avalanche" ]; then
 if [ "${engine}" == "avalanche" ]; then
-	command_details.sh_avalanche
+	fn_details_avalanche
 elif [ "${engine}" == "dontstarve" ]; then
 elif [ "${engine}" == "dontstarve" ]; then
-		command_details.sh_dontstarve
+		fn_details_dontstarve
 elif [ "${engine}" == "projectzomboid" ]; then
 elif [ "${engine}" == "projectzomboid" ]; then
-	command_details.sh_projectzomboid
+	fn_details_projectzomboid
 elif [ "${engine}" == "realvirtuality" ]; then
 elif [ "${engine}" == "realvirtuality" ]; then
-	command_details.sh_realvirtuality
+	fn_details_realvirtuality
 elif [ "${engine}" == "seriousengine35" ]; then
 elif [ "${engine}" == "seriousengine35" ]; then
-	command_details.sh_seriousengine35
+	fn_details_seriousengine35
 elif [ "${engine}" == "source" ] || [ "${engine}" == "goldsource" ]; then
 elif [ "${engine}" == "source" ] || [ "${engine}" == "goldsource" ]; then
-	command_details.sh_source
+	fn_details_source
 elif [ "${engine}" == "spark" ]; then
 elif [ "${engine}" == "spark" ]; then
-	command_details.sh_spark
+	fn_details_spark
 elif [ "${engine}" == "starbound" ]; then
 elif [ "${engine}" == "starbound" ]; then
-	command_details.sh_starbound
+	fn_details_starbound
 elif [ "${engine}" == "teeworlds" ]; then
 elif [ "${engine}" == "teeworlds" ]; then
-	command_details.sh_teeworlds
+	fn_details_teeworlds
 elif [ "${engine}" == "terraria" ]; then
 elif [ "${engine}" == "terraria" ]; then
-	command_details.sh_terraria
-elif [ "${engine}" == "unity3d" ]; then
-	command_details.sh_unity3d
+	fn_details_terraria
 elif [ "${engine}" == "unreal" ] || [ "${engine}" == "unreal2" ]; then
 elif [ "${engine}" == "unreal" ] || [ "${engine}" == "unreal2" ]; then
-	command_details.sh_unreal
+	fn_details_unreal
 elif [ "${gamename}" == "ARK: Survivial Evolved" ]; then
 elif [ "${gamename}" == "ARK: Survivial Evolved" ]; then
-	command_details.sh_ark
+	fn_details_ark
+elif [ "${gamename}" == "Hurtworld" ]; then
+	fn_details_hurtworld
+elif [ "${gamename}" == "7 Days To Die" ]; then
+	fn_details_sdtd
 elif [ "${gamename}" == "Teamspeak 3" ]; then
 elif [ "${gamename}" == "Teamspeak 3" ]; then
-	command_details.sh_teamspeak3
+	fn_details_teamspeak3
 else
 else
 	fn_printerrornl "Unable to detect server engine."
 	fn_printerrornl "Unable to detect server engine."
 fi
 fi

+ 4 - 2
functions/command_install.sh

@@ -2,7 +2,7 @@
 # LGSM fn_install function
 # LGSM fn_install function
 # Author: Daniel Gibbs
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 # Website: http://gameservermanagers.com
-lgsm_version="201215"
+lgsm_version="261215"
 
 
 check_root.sh
 check_root.sh
 install_header.sh
 install_header.sh
@@ -32,6 +32,8 @@ install_config.sh
 if [ "${gamename}" == "Counter Strike: Global Offensive" ]; then
 if [ "${gamename}" == "Counter Strike: Global Offensive" ]; then
 	install_gslt.sh
 	install_gslt.sh
 	fix_csgo.sh
 	fix_csgo.sh
+elif [ "${gamename}" == "Teamspeak 3" ]; then
+	fn_install_ts3db
 elif [ "${gamename}" == "Team Fortress 2" ]; then
 elif [ "${gamename}" == "Team Fortress 2" ]; then
 	install_gslt.sh
 	install_gslt.sh
 elif [ "${gamename}" == "Killing Floor" ]; then
 elif [ "${gamename}" == "Killing Floor" ]; then
@@ -43,4 +45,4 @@ elif [ "${gamename}" == "Unreal Tournament 2004" ]; then
 elif [ "${gamename}" == "Unreal Tournament 99" ]; then
 elif [ "${gamename}" == "Unreal Tournament 99" ]; then
 	install_fix_ut99.sh
 	install_fix_ut99.sh
 fi
 fi
-install_complete.sh
+install_complete.sh

+ 4 - 4
functions/command_monitor.sh

@@ -9,7 +9,7 @@ lgsm_version="061115"
 
 
 local modulename="Monitor"
 local modulename="Monitor"
 
 
-command_monitor.sh_teamspeak3(){
+fn_monitor_teamspeak3(){
 check_root.sh
 check_root.sh
 check_systemdir.sh
 check_systemdir.sh
 logs.sh
 logs.sh
@@ -53,7 +53,7 @@ echo -en "\n"
 fn_restart
 fn_restart
 }
 }
 
 
-command_monitor.sh_tmux(){
+fn_monitor_tmux(){
 check_root.sh
 check_root.sh
 check_systemdir.sh
 check_systemdir.sh
 check_ip.sh
 check_ip.sh
@@ -111,7 +111,7 @@ fi
 }
 }
 
 
 if [ "${gamename}" == "Teamspeak 3" ]; then
 if [ "${gamename}" == "Teamspeak 3" ]; then
-	command_monitor.sh_teamspeak3
+	fn_monitor_teamspeak3
 else
 else
-	command_monitor.sh_tmux
+	fn_monitor_tmux
 fi
 fi

+ 4 - 4
functions/command_start.sh

@@ -8,7 +8,7 @@ lgsm_version="201215"
 
 
 local modulename="Starting"
 local modulename="Starting"
 
 
-command_start.sh_teamspeak3(){
+fn_start_teamspeak3(){
 check_root.sh
 check_root.sh
 check_systemdir.sh
 check_systemdir.sh
 check_logs.sh
 check_logs.sh
@@ -72,7 +72,7 @@ sleep 0.5
 echo -en "\n"
 echo -en "\n"
 }
 }
 
 
-command_start.sh_tmux(){
+fn_start_tmux(){
 check_root.sh
 check_root.sh
 check_systemdir.sh
 check_systemdir.sh
 check_ip.sh
 check_ip.sh
@@ -201,7 +201,7 @@ echo -en "\n"
 }
 }
 
 
 if [ "${gamename}" == "Teamspeak 3" ]; then
 if [ "${gamename}" == "Teamspeak 3" ]; then
-	command_start.sh_teamspeak3
+	fn_start_teamspeak3
 else
 else
-	command_start.sh_tmux
+	fn_start_tmux
 fi
 fi

+ 4 - 4
functions/command_stop.sh

@@ -28,7 +28,7 @@ sdtd_telnet(){
     ')
     ')
 }
 }
 
 
-command_stop.sh_teamspeak3(){
+fn_stop_teamspeak3(){
 check_root.sh
 check_root.sh
 check_systemdir.sh
 check_systemdir.sh
 fn_printdots "${servername}"
 fn_printdots "${servername}"
@@ -49,7 +49,7 @@ sleep 1
 echo -en "\n"
 echo -en "\n"
 }
 }
 
 
-command_stop.sh_tmux(){
+fn_stop_tmux(){
 check_root.sh
 check_root.sh
 check_systemdir.sh
 check_systemdir.sh
 info_config.sh
 info_config.sh
@@ -156,7 +156,7 @@ fi
 }
 }
 
 
 if [ "${gamename}" == "Teamspeak 3" ]; then
 if [ "${gamename}" == "Teamspeak 3" ]; then
-    command_stop.sh_teamspeak3
+    fn_stop_teamspeak3
 else
 else
-    command_stop.sh_tmux
+    fn_stop_tmux
 fi
 fi

+ 1 - 3
functions/fn_functions

@@ -2,7 +2,7 @@
 # LGSM fn_functions function
 # LGSM fn_functions function
 # Author: Daniel Gibbs
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 # Website: http://gameservermanagers.com
-lgsm_version="201215"
+lgsm_version="261215"
 
 
 # Description: Redirect to new core_functions.sh
 # Description: Redirect to new core_functions.sh
 
 
@@ -16,5 +16,3 @@ fn_getopt(){
 functionfile="${FUNCNAME}"
 functionfile="${FUNCNAME}"
 fn_runfunction
 fn_runfunction
 }
 }
-
-core_functions.sh

+ 75 - 25
functions/info_config.sh

@@ -2,7 +2,7 @@
 # LGSM info_config.sh function
 # LGSM info_config.sh function
 # Author: Daniel Gibbs
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 # Website: http://gameservermanagers.com
-lgsm_version="061115"
+lgsm_version="261215"
 
 
 # Description: Gets specific details from config files.
 # Description: Gets specific details from config files.
 
 
@@ -209,32 +209,33 @@ elif [ "${engine}" == "realvirtuality" ]; then
 		slots="\e[0;31mUNAVAILABLE\e[0m"
 		slots="\e[0;31mUNAVAILABLE\e[0m"
 	fi
 	fi
 
 
-	# port
-	if [ -f "${servercfgfullpath}" ]; then
-		port=$(grep "serverport=" "${servercfgfullpath}" | grep -v // | tr -d '\r' | tr -cd '[:digit:]')
-	fi
-	if [ ! -n "${port}" ]; then
-		port="0"
-	fi
-
-	# query port
-	if [ -f "${servercfgfullpath}" ]; then
-		queryport=$(grep "steamqueryport=" "${servercfgfullpath}" | grep -v // | tr -d '\r' | tr -cd '[:digit:]')
-	fi
-	if [ ! -n "${queryport}" ]; then
-		queryport="0"
-	fi
-
-	# master port
-	if [ -f "${servercfgfullpath}" ]; then
-		masterport=$(grep "steamport=" "${servercfgfullpath}" | grep -v // | tr -d '\r' | tr -cd '[:digit:]')
-	fi
-	if [ ! -n "${masterport}" ]; then
-		masterport="0"
-	fi
+        # port
+        if [ "${port}" != "" ]; then
+                        port=${port}
+        fi
+        if [ ! -n "${port}" ]; then
+                port="0"
+        fi
+
+        # query port
+        if [ "${port}" != "" ]; then
+                queryport=$((port+1))
+        fi
+        if [ ! -n "${queryport}" ]; then
+                queryport="0"
+        fi
+
+        # master port
+        if [ "${port}" != "" ]; then
+                masterport=$((port+2))
+        fi
+        if [ ! -n "${masterport}" ]; then
+                masterport="0"
+        fi
 
 
 	fn_servercfgfullpath
 	fn_servercfgfullpath
 
 
+# Serious Sam
 elif [ "${engine}" == "seriousengine35" ]; then
 elif [ "${engine}" == "seriousengine35" ]; then
 
 
 	# server name
 	# server name
@@ -295,6 +296,7 @@ elif [ "${engine}" == "seriousengine35" ]; then
 
 
 	fn_servercfgfullpath
 	fn_servercfgfullpath
 
 
+# Source Engine Games
 elif [ "${engine}" == "source" ] || [ "${engine}" == "goldsource" ]; then
 elif [ "${engine}" == "source" ] || [ "${engine}" == "goldsource" ]; then
 
 
 	# server name
 	# server name
@@ -329,6 +331,7 @@ elif [ "${engine}" == "source" ] || [ "${engine}" == "goldsource" ]; then
 
 
 	fn_servercfgfullpath
 	fn_servercfgfullpath
 
 
+# Spark (NS2: Combat)
 elif [ "${engine}" == "spark" ]; then
 elif [ "${engine}" == "spark" ]; then
 
 
 	# query port
 	# query port
@@ -341,6 +344,7 @@ elif [ "${engine}" == "spark" ]; then
 
 
 	fn_servercfgfullpath
 	fn_servercfgfullpath
 
 
+# Teamspeak 3
 elif [ "${gamename}" == "Teamspeak 3" ]; then
 elif [ "${gamename}" == "Teamspeak 3" ]; then
 
 
 	# ip
 	# ip
@@ -388,6 +392,7 @@ elif [ "${gamename}" == "Teamspeak 3" ]; then
 
 
 	fn_servercfgfullpath
 	fn_servercfgfullpath
 
 
+# Teeworlds
 elif [ "${engine}" == "teeworlds" ]; then
 elif [ "${engine}" == "teeworlds" ]; then
 
 
 	# server name
 	# server name
@@ -440,6 +445,7 @@ elif [ "${engine}" == "teeworlds" ]; then
 
 
 	fn_servercfgfullpath
 	fn_servercfgfullpath
 
 
+# Terraria
 elif [ "${engine}" == "terraria" ]; then
 elif [ "${engine}" == "terraria" ]; then
 
 
 	# port
 	# port
@@ -450,7 +456,8 @@ elif [ "${engine}" == "terraria" ]; then
 		port="0"
 		port="0"
 	fi
 	fi
 
 
-elif [ "${engine}" == "unity3d" ]; then
+# 7 Day To Die (unity3d)
+elif [ "${gamename}" == "7 Days To Die" ]; then
 
 
 	# server name
 	# server name
 	if [ -f "${servercfgfullpath}" ]; then
 	if [ -f "${servercfgfullpath}" ]; then
@@ -586,6 +593,48 @@ elif [ "${engine}" == "unity3d" ]; then
 
 
 	fn_servercfgfullpath
 	fn_servercfgfullpath
 
 
+# Hurtworld (unity3d)
+elif [ "${gamename}" == "Hurtworld" ]; then
+
+	# server name
+	if [ -n "${servername}" ]; then
+		servername="${servername}"
+	else
+		servername="\e[0;31mUNAVAILABLE\e[0m"	
+	fi
+
+	# server password
+	# not available yet
+
+	# slots
+	if [ -n "${maxplayers}" ]; then
+		slots="${maxplayers}"
+	else
+		slots="NOT SET"
+	fi
+
+	# game world
+	if [ -n "${map}" ]; then
+		gameworld="${map}"
+	else
+		gameworld="NO MAP SET"
+	fi
+
+	# port
+	if [ -n "${port}" ]; then
+		port="${port}"
+	else
+		port="0"
+	fi
+
+	# query port
+	if [ -n "${queryport}" ]; then
+		queryport="${queryport}"
+	else
+		queryport="0"
+	fi
+
+# Unreal Tournament 
 elif [ "${engine}" == "unreal" ] || [ "${engine}" == "unreal2" ]; then
 elif [ "${engine}" == "unreal" ] || [ "${engine}" == "unreal2" ]; then
 
 
 	# server name
 	# server name
@@ -716,6 +765,7 @@ elif [ "${engine}" == "unreal" ] || [ "${engine}" == "unreal2" ]; then
 
 
 	fn_servercfgfullpath
 	fn_servercfgfullpath
 
 
+# ARK: Survivaial Evolved
 elif [ "${gamename}" == "ARK: Survivial Evolved" ]; then
 elif [ "${gamename}" == "ARK: Survivial Evolved" ]; then
 
 
 	# server name
 	# server name

+ 14 - 18
functions/install_config.sh

@@ -2,12 +2,12 @@
 # LGSM install_config.sh function
 # LGSM install_config.sh function
 # Author: Daniel Gibbs
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 # Website: http://gameservermanagers.com
-lgsm_version="201215"
+lgsm_version="251215"
 
 
 fn_defaultconfig(){
 fn_defaultconfig(){
-echo "creating ${servercfg} config file."
-cp -v "${servercfgdefault}" "${servercfgfullpath}"
-sleep 1
+	echo "creating ${servercfg} config file."
+	cp -v "${servercfgdefault}" "${servercfgfullpath}"
+	sleep 1
 }
 }
 
 
 fn_userinputconfig(){
 fn_userinputconfig(){
@@ -102,16 +102,6 @@ fn_userinputconfig
 echo ""
 echo ""
 }
 }
 
 
-fn_ts3config(){
-echo "creating blank ${servercfg} config file."
-sleep 1
-echo  "${servercfg} can remain blank by default."
-sleep 1
-echo  "${servercfg} is located in ${servercfgfullpath}."
-sleep 1
-touch "${servercfgfullpath}"
-}
-
 fn_ut99config(){
 fn_ut99config(){
 echo "${defaultcfg} > ${servercfgfullpath}"
 echo "${defaultcfg} > ${servercfgfullpath}"
 tr -d '\r' < "${servercfgdefault}" > "${servercfgfullpath}"
 tr -d '\r' < "${servercfgdefault}" > "${servercfgfullpath}"
@@ -151,12 +141,15 @@ echo ""
 }
 }
 
 
 echo ""
 echo ""
+if [ "${gamename}" != "Hurtworld" ]; then
 echo "Creating Configs"
 echo "Creating Configs"
 echo "================================="
 echo "================================="
 sleep 1
 sleep 1
-mkdir -pv "${servercfgdir}"
-cd "${servercfgdir}"
-githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}"
+	mkdir -pv "${servercfgdir}"
+	cd "${servercfgdir}"
+	githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}"
+fi
+
 if [ "${gamename}" == "7 Days To Die" ]; then
 if [ "${gamename}" == "7 Days To Die" ]; then
 	fn_defaultconfig
 	fn_defaultconfig
 elif [ "${gamename}" == "ARK: Survivial Evolved" ]; then
 elif [ "${gamename}" == "ARK: Survivial Evolved" ]; then
@@ -283,7 +276,10 @@ elif [ "${gamename}" == "Serious Sam 3: BFE" ]; then
 	sleep 1
 	sleep 1
 	fn_serious3config
 	fn_serious3config
 elif [ "${gamename}" == "Teamspeak 3" ]; then
 elif [ "${gamename}" == "Teamspeak 3" ]; then
-	fn_ts3config
+	echo -e "downloading lgsm-default.ini...\c"
+	wget -N /dev/null ${githuburl}/TeamSpeak3/cfg/lgsm-default.ini 2>&1 | grep -F HTTP | cut -c45- | uniq
+	sleep 1
+	fn_defaultconfig
 elif [ "${gamename}" == "Team Fortress 2" ]; then
 elif [ "${gamename}" == "Team Fortress 2" ]; then
 	echo -e "downloading lgsm-default.cfg...\c"
 	echo -e "downloading lgsm-default.cfg...\c"
 	wget -N /dev/null ${githuburl}/TeamFortress2/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
 	wget -N /dev/null ${githuburl}/TeamFortress2/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq

+ 7 - 4
functions/install_fix_steam.sh

@@ -2,7 +2,7 @@
 # LGSM install_fix_steam.sh function
 # LGSM install_fix_steam.sh function
 # Author: Daniel Gibbs
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 # Website: http://gameservermanagers.com
-lgsm_version="201215"
+lgsm_version="261215"
 
 
 fn_steamclientfix(){
 fn_steamclientfix(){
 echo ""
 echo ""
@@ -14,10 +14,10 @@ cp -v "${rootdir}/steamcmd/linux32/steamclient.so" "${HOME}/.steam/sdk32/steamcl
 sleep 1
 sleep 1
 }
 }
 
 
-# Gary's Mod Specific
+# Server specific
 fn_libsteamfix(){
 fn_libsteamfix(){
 echo ""
 echo ""
-echo "Applying libsteam.so fix"
+echo "Applying libsteam.so and steamclient.so fixes"
 echo "================================="
 echo "================================="
 sleep 1
 sleep 1
 if [ "${gamename}" == "Garry's Mod" ]; then
 if [ "${gamename}" == "Garry's Mod" ]; then
@@ -26,11 +26,14 @@ if [ "${gamename}" == "Garry's Mod" ]; then
 elif [ "${gamename}" == "Serious Sam 3: BFE" ]; then
 elif [ "${gamename}" == "Serious Sam 3: BFE" ]; then
 	mkdir -pv "${HOME}/.steam/bin32"
 	mkdir -pv "${HOME}/.steam/bin32"
 	cp -v "${filesdir}/Bin/libsteam.so" "${HOME}/.steam/bin32/libsteam.so"
 	cp -v "${filesdir}/Bin/libsteam.so" "${HOME}/.steam/bin32/libsteam.so"
+elif [ "${gamename}" == "Hurtworld" ]; then
+	cp -v "${rootdir}/steamcmd/linux32/steamclient.so" "${filesdir}/Hurtworld_Data/Plugins/x86/steamclient.so"
+	cp -v "${rootdir}/steamcmd/linux32/steamclient.so" "${filesdir}/Hurtworld_Data/Plugins/x86_64/steamclient.so"
 fi
 fi
 sleep 1
 sleep 1
 }
 }
 
 
 fn_steamclientfix
 fn_steamclientfix
-if [ "${gamename}" == "Garry's Mod" ]||[ "${gamename}" == "Serious Sam 3: BFE" ]; then
+if [ "${gamename}" == "Garry's Mod" ]||[ "${gamename}" == "Serious Sam 3: BFE" ]||[ "${gamename}" == "Hurtworld" ]; then
 	fn_libsteamfix
 	fn_libsteamfix
 fi
 fi

+ 2 - 2
functions/install_gsquery.sh

@@ -2,7 +2,7 @@
 # LGSM install_gsquery.sh function
 # LGSM install_gsquery.sh function
 # Author: Daniel Gibbs
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 # Website: http://gameservermanagers.com
-lgsm_version="061115"
+lgsm_version="261215"
 
 
 fn_dlgsquery(){
 fn_dlgsquery(){
 cd "${rootdir}"
 cd "${rootdir}"
@@ -11,7 +11,7 @@ wget -N /dev/null "http://gameservermanagers.com/dl/gsquery.py" 2>&1 | grep -F "
 chmod +x gsquery.py
 chmod +x gsquery.py
 }
 }
 
 
-if [ "${engine}" == "avalanche" ]||[ "${engine}" == "goldsource" ]||[ "${engine}" == "realvirtuality" ]||[ "${engine}" == "source" ]||[ "${engine}" == "spark" ]||[ "${engine}" == "unity3d" ]||[ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then
+if [ "${engine}" == "avalanche" ]||[ "${engine}" == "goldsource" ]||[ "${engine}" == "realvirtuality" ]||[ "${engine}" == "source" ]||[ "${engine}" == "spark" ]||[ "${engine}" == "unity3d" ]||[ "${gamename}" == "Hurtworld" ]||[ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then
 	echo ""
 	echo ""
 	echo "GameServerQuery"
 	echo "GameServerQuery"
 	echo "============================"
 	echo "============================"

+ 1 - 14
functions/install_ts3.sh

@@ -2,7 +2,7 @@
 # LGSM install_ts3.sh function
 # LGSM install_ts3.sh function
 # Author: Daniel Gibbs
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 # Website: http://gameservermanagers.com
-lgsm_version="061115"
+lgsm_version="251215"
 
 
 info_distro.sh
 info_distro.sh
 # Gets the teamspeak server architecture
 # Gets the teamspeak server architecture
@@ -49,7 +49,6 @@ if [ -z "${availablebuild}" ]; then
 fi
 fi
 
 
 cd "${rootdir}"
 cd "${rootdir}"
-mkdir "${filesdir}"
 echo -e "downloading teamspeak3-server_linux-${ts3arch}-${availablebuild}.tar.gz...\c"
 echo -e "downloading teamspeak3-server_linux-${ts3arch}-${availablebuild}.tar.gz...\c"
 wget -N /dev/null http://dl.4players.de/ts/releases/${ts3_version_number}/teamspeak3-server_linux-${ts3arch}-${ts3_version_number}.tar.gz 2>&1 | grep -F HTTP | cut -c45-| uniq
 wget -N /dev/null http://dl.4players.de/ts/releases/${ts3_version_number}/teamspeak3-server_linux-${ts3arch}-${ts3_version_number}.tar.gz 2>&1 | grep -F HTTP | cut -c45-| uniq
 sleep 1
 sleep 1
@@ -79,15 +78,3 @@ else
 fi
 fi
 rm -f teamspeak3-server_linux-${ts3arch}-${availablebuild}.tar.gz
 rm -f teamspeak3-server_linux-${ts3arch}-${availablebuild}.tar.gz
 rm -rf "${rootdir}/teamspeak3-server_linux-${ts3arch}"
 rm -rf "${rootdir}/teamspeak3-server_linux-${ts3arch}"
-
-## Get privilege key
-echo ""
-echo "Getting privilege key"
-echo "================================="
-sleep 1
-echo "IMPORANT! Save these details for later."
-sleep 1
-cd "${executabledir}"
-./ts3server_startscript.sh start
-sleep 5
-./ts3server_startscript.sh stop

+ 64 - 0
functions/install_ts3db.sh

@@ -0,0 +1,64 @@
+#!/bin/bash
+# LGSM fn_install_ts3_mariadb function
+# Author: Daniel Gibbs
+# Contributor: PhilPhonic
+# Website: http://gameservermanagers.com
+lgsm_version="261215"
+
+fn_install_ts3db_mariadb(){
+	echo ""
+	echo "checking if libmariadb2 is installed"
+	echo "================================="
+	ldd ${filesdir}/libts3db_mariadb.so | grep "libmariadb.so.2 => not found"
+	if [ $? -eq 0 ]; then
+		echo "libmariadb2 not installed. Please install it first."
+		echo "exiting..."
+		exit
+	else
+		echo "libmariadb2 installed."
+	fi
+	echo ""
+	echo "Configuring ${gamename} Server for MariaDB/MySQL"
+	echo "================================="
+	sleep 1
+	read -p "Enter MariaDB hostname: " mariahostname
+	read -p "Enter MariaDB port: " mariaport
+	read -p "Enter MariaDB username: " mariausername
+	read -p "Enter MariaDB password: " mariapassword
+	read -p "Enter MariaDB database name: " mariadbname
+	echo "updating config."
+	echo "[config]" >> ${servercfgdir}/ts3db_mariadb.ini
+	echo "host='${mariahostname}'" >> ${servercfgdir}/ts3db_mariadb.ini
+	echo "port='${mariaport}'" >> ${servercfgdir}/ts3db_mariadb.ini
+	echo "username='${mariausername}'" >> ${servercfgdir}/ts3db_mariadb.ini
+	echo "password='${mariapassword}'" >> ${servercfgdir}/ts3db_mariadb.ini
+	echo "database='${mariadbname}'" >> ${servercfgdir}/ts3db_mariadb.ini
+	echo "socket=" >> ${servercfgdir}/ts3db_mariadb.ini	
+	sed -i "s/dbplugin=ts3db_sqlite3/dbplugin=ts3db_mariadb/g" "${servercfgfullpath}"
+	sed -i "s/dbpluginparameter=/dbpluginparameter=ts3db_mariadb.ini/g" "${servercfgfullpath}"
+	sed -i "s/dbsqlcreatepath=create_sqlite\//dbsqlcreatepath=create_mariadb\//g" "${servercfgfullpath}"
+	echo "================================="
+	sleep 1
+}
+
+echo ""
+while true; do
+	read -e -i "n" -p "Do you want to use MariaDB/MySQL instead of sqlite (Database Server including user and database already has to be set up!)? [y/N]" yn
+	case $yn in
+	[Yy]* ) fn_install_ts3db_mariadb && break;;
+	[Nn]* ) break;;
+	* ) echo "Please answer yes or no.";;
+	esac
+done
+
+## Get privilege key
+echo ""
+echo "Getting privilege key"
+echo "================================="
+sleep 1
+echo "IMPORANT! Save these details for later."
+sleep 1
+cd "${executabledir}"
+./ts3server_startscript.sh start inifile=ts3-server.ini
+sleep 5
+./ts3server_startscript.sh stop

+ 4 - 1
functions/monitor_gsquery.sh

@@ -17,9 +17,12 @@ if [ -f "${rootdir}/gsquery.py" ]; then
 	elif [ "${engine}" == "realvirtuality" ]; then
 	elif [ "${engine}" == "realvirtuality" ]; then
 		queryport=$(grep -s steamqueryport= "${servercfgfullpath}"|grep -v //|tr -d '\r'|tr -cd '[:digit:]')
 		queryport=$(grep -s steamqueryport= "${servercfgfullpath}"|grep -v //|tr -d '\r'|tr -cd '[:digit:]')
 		port=${queryport}
 		port=${queryport}
-	elif [ "${engine}" == "unity3d" ]; then
+	elif [ "${gamename}" == "7 Days To Die" ]; then
 		gameport=$(grep ServerPort "${servercfgfullpath}"|tr -cd '[:digit:]')
 		gameport=$(grep ServerPort "${servercfgfullpath}"|tr -cd '[:digit:]')
 		port=$((${gameport} + 1))
 		port=$((${gameport} + 1))
+	elif [ "${gamename}" == "Hurtworld" ]; then
+		gameport="${port}"
+		port="${queryport}"
 	fi
 	fi
 	fn_printinfo "Detected gsquery.py"
 	fn_printinfo "Detected gsquery.py"
 	fn_scriptlog "Detected gsquery.py"
 	fn_scriptlog "Detected gsquery.py"