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

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

# Conflicts:
#	lgsm/functions/check_deps.sh
Daniel Gibbs пре 9 година
родитељ
комит
9aa123bcb7
73 измењених фајлова са 418 додато и 98 уклоњено
  1. 1 0
      7DaysToDie/sdtdserver
  2. 2 1
      ARKSurvivalEvolved/arkserver
  3. 1 0
      Arma3/arma3server
  4. 1 0
      BlackMesa/bmdmserver
  5. 1 0
      BladeSymphony/bsserver
  6. 1 0
      BrainBread2/bb2server
  7. 1 0
      CodenameCURE/ccserver
  8. 1 0
      CounterStrike/csserver
  9. 1 0
      CounterStrikeConditionZero/csczserver
  10. 1 0
      CounterStrikeGlobalOffensive/csgoserver
  11. 7 1
      CounterStrikeSource/cssserver
  12. 1 0
      DayOfDefeat/dodserver
  13. 1 0
      DayOfDefeatSource/dodsserver
  14. 1 0
      DayOfInfamy/doiserver
  15. 1 0
      DeathmatchClassic/dmcserver
  16. 1 0
      DontStarveTogether/dstserver
  17. 1 0
      DoubleActionBoogaloo/dabserver
  18. 161 0
      EmpiresMod/emserver
  19. 1 0
      FistfulOfFrags/fofserver
  20. 2 1
      GarrysMod/gmodserver
  21. 1 0
      GoldenEyeSource/gesserver
  22. 1 0
      HalfLife2Deathmatch/hl2dmserver
  23. 1 0
      HalfLifeDeathmatch/hldmserver
  24. 1 0
      HalfLifeDeathmatchSource/hldmsserver
  25. 3 1
      Hurtworld/hwserver
  26. 1 0
      Insurgency/insserver
  27. 1 0
      JustCause2/jc2server
  28. 1 0
      KillingFloor/kfserver
  29. 1 0
      Left4Dead/l4dserver
  30. 1 0
      Left4Dead2/l4d2server
  31. 1 0
      Mumble/mumbleserver
  32. 1 0
      NS2Combat/ns2cserver
  33. 1 0
      NaturalSelection2/ns2server
  34. 1 0
      NoMoreRoomInHell/nmrihserver
  35. 1 0
      OpposingForce/opforserver
  36. 1 0
      PiratesVikingandKnightsII/pvkiiserver
  37. 1 0
      ProjectZomboid/pzserver
  38. 1 0
      QuakeLive/qlserver
  39. 1 0
      RedOrchestra/roserver
  40. 1 0
      Ricochet/ricochetserver
  41. 1 0
      Rust/rustserver
  42. 1 0
      SeriousSam3BFE/ss3sserver
  43. 1 0
      Starbound/sbserver
  44. 1 0
      SvenCoop/svencoopserver
  45. 1 0
      TeamFortress2/tf2server
  46. 1 0
      TeamFortressClassic/tfcserver
  47. 4 4
      TeamSpeak3/cfg/lgsm-default.ini
  48. 1 0
      TeamSpeak3/ts3server
  49. 1 0
      Teeworlds/twserver
  50. 1 0
      Terraria/terrariaserver
  51. 1 0
      UnrealTournament2004/ut2k4server
  52. 3 2
      UnrealTournament99/ut99server
  53. 2 10
      lgsm/functions/check.sh
  54. 14 10
      lgsm/functions/check_deps.sh
  55. 5 3
      lgsm/functions/check_ip.sh
  56. 10 3
      lgsm/functions/check_system_requirements.sh
  57. 2 2
      lgsm/functions/command_backup.sh
  58. 48 48
      lgsm/functions/command_dev_detect_deps.sh
  59. 31 0
      lgsm/functions/command_dev_detect_glibc.sh
  60. 2 1
      lgsm/functions/core_dl.sh
  61. 0 1
      lgsm/functions/core_exit.sh
  62. 5 1
      lgsm/functions/core_functions.sh
  63. 14 0
      lgsm/functions/core_getopt.sh
  64. 0 4
      lgsm/functions/fix.sh
  65. 17 1
      lgsm/functions/fix_glibc.sh
  66. 5 1
      lgsm/functions/info_distro.sh
  67. 6 0
      lgsm/functions/info_glibc.sh
  68. 3 1
      lgsm/functions/install_config.sh
  69. 1 1
      lgsm/functions/install_gslt.sh
  70. 1 1
      lgsm/functions/update_minecraft.sh
  71. BIN
      lgsm/lib/ubuntu12.04/i386/libpthread.so.0
  72. 12 0
      tests/tests_jc2server.sh
  73. 13 0
      tests/tests_ts3server.sh

+ 1 - 0
7DaysToDie/sdtdserver

@@ -61,6 +61,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}"
 executabledir="${filesdir}"

+ 2 - 1
ARKSurvivalEvolved/arkserver

@@ -40,7 +40,7 @@ ip="0.0.0.0"
 updateonstart="off"
 
 fn_parms(){
-parms="TheIsland?listen?MultiHome=${ip}?SessionName=${servername}?MaxPlayers=${maxplayers}?QueryPort=${queryport}?RCONPort=${rconport}?Port=${port}?ServerAdminPassword=${rconpassword}"
+parms="\"TheIsland?listen?MultiHome=${ip}?SessionName=${servername}?MaxPlayers=${maxplayers}?QueryPort=${queryport}?RCONPort=${rconport}?Port=${port}?ServerAdminPassword=${rconpassword}\""
 }
 
 #### Advanced Variables ####
@@ -66,6 +66,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/ShooterGame"
 executabledir="${systemdir}/Binaries/Linux"

+ 1 - 0
Arma3/arma3server

@@ -80,6 +80,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}"
 executabledir="${filesdir}"

+ 1 - 0
BlackMesa/bmdmserver

@@ -71,6 +71,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/bms"
 executabledir="${filesdir}"

+ 1 - 0
BladeSymphony/bsserver

@@ -66,6 +66,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/berimbau"
 executabledir="${filesdir}"

+ 1 - 0
BrainBread2/bb2server

@@ -71,6 +71,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/brainbread2"
 executabledir="${filesdir}"

+ 1 - 0
CodenameCURE/ccserver

@@ -66,6 +66,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/cure"
 executabledir="${filesdir}"

+ 1 - 0
CounterStrike/csserver

@@ -66,6 +66,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/cstrike"
 executabledir="${filesdir}"

+ 1 - 0
CounterStrikeConditionZero/csczserver

@@ -66,6 +66,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/czero"
 executabledir="${filesdir}"

+ 1 - 0
CounterStrikeGlobalOffensive/csgoserver

@@ -94,6 +94,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/csgo"
 executabledir="${filesdir}"

+ 7 - 1
CounterStrikeSource/cssserver

@@ -38,9 +38,14 @@ clientport="27005"
 ip="0.0.0.0"
 updateonstart="off"
 
+# Required: Game Server Login Token
+# GSLT is required for running a public server.
+# More info: https://gameservermanagers.com/gslt
+gslt=""
+
 # https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server
 fn_parms(){
-parms="-game cstrike -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}"
+parms="-game cstrike -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}"
 }
 
 #### Advanced Variables ####
@@ -66,6 +71,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/cstrike"
 executabledir="${filesdir}"

+ 1 - 0
DayOfDefeat/dodserver

@@ -66,6 +66,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/dod"
 executabledir="${filesdir}"

+ 1 - 0
DayOfDefeatSource/dodsserver

@@ -66,6 +66,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/dod"
 executabledir="${filesdir}"

+ 1 - 0
DayOfInfamy/doiserver

@@ -68,6 +68,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/doi"
 executabledir="${filesdir}"

+ 1 - 0
DeathmatchClassic/dmcserver

@@ -66,6 +66,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/dmc"
 executabledir="${filesdir}"

+ 1 - 0
DontStarveTogether/dstserver

@@ -64,6 +64,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}"
 executabledir="${filesdir}/bin"

+ 1 - 0
DoubleActionBoogaloo/dabserver

@@ -66,6 +66,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/dab"
 executabledir="${filesdir}"

+ 161 - 0
EmpiresMod/emserver

@@ -0,0 +1,161 @@
+#!/bin/bash
+# Empires Mod
+# Server Management Script
+# Author: Daniel Gibbs
+# Website: https://gameservermanagers.com
+if [ -f ".dev-debug" ]; then
+	exec 5>dev-debug.log
+	BASH_XTRACEFD="5"
+	set -x
+fi
+
+version="210516"
+
+#### Variables ####
+
+# Notification Alerts
+# (on|off)
+
+# Email
+emailalert="off"
+email="email@example.com"
+
+# Pushbullet
+# https://www.pushbullet.com/#settings
+pushbulletalert="off"
+pushbullettoken="accesstoken"
+
+# Steam login
+steamuser="anonymous"
+steampass=""
+
+# Start Variables
+defaultmap="emp_district"
+maxplayers="62"
+port="27015"
+sourcetvport="27020"
+clientport="27005"
+ip="0.0.0.0"
+updateonstart="off"
+
+# Optional: Game Server Login Token
+# GSLT can be used for running a public server.
+# More info: https://gameservermanagers.com/gslt
+gslt=""
+
+# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server
+fn_parms(){
+parms="-game empires -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}"
+}
+
+#### 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="master"
+
+# Steam
+appid="460040"
+
+# Server Details
+servicename="em-server"
+gamename="Empires Mod"
+engine="source"
+
+# Directories
+rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))"
+selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
+lockselfname=".${servicename}.lock"
+lgsmdir="${rootdir}/lgsm"
+functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
+filesdir="${rootdir}/serverfiles"
+systemdir="${filesdir}/empires"
+executabledir="${filesdir}"
+executable="./srcds_run"
+servercfg="${servicename}.cfg"
+servercfgdir="${systemdir}/cfg"
+servercfgfullpath="${servercfgdir}/${servercfg}"
+servercfgdefault="${servercfgdir}/server.cfg"
+backupdir="${rootdir}/backups"
+
+# Logging
+logdays="7"
+gamelogdir="${systemdir}/logs"
+scriptlogdir="${rootdir}/log/script"
+consolelogdir="${rootdir}/log/console"
+consolelogging="on"
+
+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
+
+# Fetches core_dl for file downloads
+fn_fetch_core_dl(){
+github_file_url_dir="lgsm/functions"
+github_file_url_name="${functionfile}"
+filedir="${functionsdir}"
+filename="${github_file_url_name}"
+githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
+# If the file is missing, then download
+if [ ! -f "${filedir}/${filename}" ]; then
+	if [ ! -d "${filedir}" ]; then
+		mkdir -p "${filedir}"
+	fi
+	echo -e "    fetching ${filename}...\c"
+	# Check curl exists and use available path
+	curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)"
+	for curlcmd in ${curlpaths}
+	do
+		if [ -x "${curlcmd}" ]; then
+			break
+		fi
+	done
+	# If curl exists download file
+	if [ "$(basename ${curlcmd})" == "curl" ]; then
+		curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1)
+		if [ $? -ne 0 ]; then
+			echo -e "\e[0;31mFAIL\e[0m\n"
+			echo "${curlfetch}"
+			echo -e "${githuburl}\n"
+			exit 1
+		else
+			echo -e "\e[0;32mOK\e[0m"
+		fi
+	else
+		echo -e "\e[0;31mFAIL\e[0m\n"
+		echo "Curl is not installed!"
+		echo -e ""
+		exit 1
+	fi
+	chmod +x "${filedir}/${filename}"
+fi
+source "${filedir}/${filename}"
+}
+
+core_dl.sh(){
+# Functions are defined in core_functions.sh.
+functionfile="${FUNCNAME}"
+fn_fetch_core_dl
+}
+
+core_functions.sh(){
+# Functions are defined in core_functions.sh.
+functionfile="${FUNCNAME}"
+fn_fetch_core_dl
+}
+
+core_dl.sh
+core_functions.sh
+
+getopt=$1
+core_getopt.sh

+ 1 - 0
FistfulOfFrags/fofserver

@@ -66,6 +66,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/fof"
 executabledir="${filesdir}"

+ 2 - 1
GarrysMod/gmodserver

@@ -46,8 +46,8 @@ maxplayers="16"
 port="27015"
 sourcetvport="27020"
 clientport="27005"
-ip="0.0.0.0"
 tickrate="66"
+ip="0.0.0.0"
 updateonstart="off"
 
 # Custom Start Parameters
@@ -87,6 +87,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/garrysmod"
 addonsdir="${systemdir}/addons"

+ 1 - 0
GoldenEyeSource/gesserver

@@ -67,6 +67,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/gesource"
 executabledir="${filesdir}"

+ 1 - 0
HalfLife2Deathmatch/hl2dmserver

@@ -66,6 +66,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/hl2mp"
 executabledir="${filesdir}"

+ 1 - 0
HalfLifeDeathmatch/hldmserver

@@ -65,6 +65,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/valve"
 executabledir="${filesdir}"

+ 1 - 0
HalfLifeDeathmatchSource/hldmsserver

@@ -66,6 +66,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/hl1mp"
 executabledir="${filesdir}"

+ 3 - 1
Hurtworld/hwserver

@@ -31,8 +31,9 @@ steamuser="anonymous"
 steampass=""
 
 # Server settings
-servername="Hurtworld LGSM Server"
 ip="0.0.0.0"
+updateonstart="off"
+servername="Hurtworld LGSM Server"
 port="12871"
 queryport="12881"
 maxplayers="20"
@@ -79,6 +80,7 @@ selfname=$(basename $(readlink -f "${BASH_SOURCE[0]}"))
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}"
 executabledir="${filesdir}"

+ 1 - 0
Insurgency/insserver

@@ -68,6 +68,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/insurgency"
 executabledir="${filesdir}"

+ 1 - 0
JustCause2/jc2server

@@ -30,6 +30,7 @@ steamuser="anonymous"
 steampass=""
 
 # Start Variables
+ip="0.0.0.0"
 updateonstart="off"
 
 fn_parms(){

+ 1 - 0
KillingFloor/kfserver

@@ -65,6 +65,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/System"
 executabledir="${systemdir}"

+ 1 - 0
Left4Dead/l4dserver

@@ -66,6 +66,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/left4dead"
 executabledir="${filesdir}"

+ 1 - 0
Left4Dead2/l4d2server

@@ -65,6 +65,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/left4dead2"
 executabledir="${filesdir}"

+ 1 - 0
Mumble/mumbleserver

@@ -53,6 +53,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}"
 executabledir="${filesdir}"

+ 1 - 0
NS2Combat/ns2cserver

@@ -73,6 +73,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}"
 executabledir="${filesdir}/ia32"

+ 1 - 0
NaturalSelection2/ns2server

@@ -78,6 +78,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}"
 executabledir="${filesdir}"

+ 1 - 0
NoMoreRoomInHell/nmrihserver

@@ -71,6 +71,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/nmrih"
 executabledir="${filesdir}"

+ 1 - 0
OpposingForce/opforserver

@@ -66,6 +66,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/gearbox"
 executabledir="${filesdir}"

+ 1 - 0
PiratesVikingandKnightsII/pvkiiserver

@@ -66,6 +66,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/pvkii"
 executabledir="${filesdir}"

+ 1 - 0
ProjectZomboid/pzserver

@@ -65,6 +65,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}"
 executabledir="${filesdir}"

+ 1 - 0
QuakeLive/qlserver

@@ -69,6 +69,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}"
 executabledir="${filesdir}"

+ 1 - 0
RedOrchestra/roserver

@@ -61,6 +61,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/system"
 executabledir="${systemdir}"

+ 1 - 0
Ricochet/ricochetserver

@@ -66,6 +66,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/ricochet"
 executabledir="${filesdir}"

+ 1 - 0
Rust/rustserver

@@ -83,6 +83,7 @@ selfname=$(basename $(readlink -f "${BASH_SOURCE[0]}"))
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}"
 executabledir="${filesdir}"

+ 1 - 0
SeriousSam3BFE/ss3sserver

@@ -61,6 +61,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/Bin"
 executable="./runSam3_DedicatedServer.sh"

+ 1 - 0
Starbound/sbserver

@@ -60,6 +60,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}"
 executabledir="${filesdir}/linux"

+ 1 - 0
SvenCoop/svencoopserver

@@ -65,6 +65,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/svencoop"
 executabledir="${filesdir}"

+ 1 - 0
TeamFortress2/tf2server

@@ -71,6 +71,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/tf"
 executabledir="${filesdir}"

+ 1 - 0
TeamFortressClassic/tfcserver

@@ -66,6 +66,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/tfc"
 executabledir="${filesdir}"

+ 4 - 4
TeamSpeak3/cfg/lgsm-default.ini

@@ -1,11 +1,11 @@
 machine_id=
 default_voice_port=9987
-voice_ip=0.0.0.0
+voice_ip=0.0.0.0, ::
 licensepath=
 filetransfer_port=30033
-filetransfer_ip=0.0.0.0
+filetransfer_ip=0.0.0.0, ::
 query_port=10011
-query_ip=0.0.0.0
+query_ip=0.0.0.0, ::
 query_ip_whitelist=query_ip_whitelist.txt
 query_ip_blacklist=query_ip_blacklist.txt
 dbplugin=ts3db_sqlite3
@@ -17,4 +17,4 @@ logpath=logs
 logquerycommands=0
 dbclientkeepdays=30
 logappend=0
-query_skipbruteforcecheck=0
+query_skipbruteforcecheck=0

+ 1 - 0
TeamSpeak3/ts3server

@@ -39,6 +39,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}"
 executabledir="${filesdir}"

+ 1 - 0
Teeworlds/twserver

@@ -61,6 +61,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}"
 executabledir="${filesdir}"

+ 1 - 0
Terraria/terrariaserver

@@ -61,6 +61,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}"
 executabledir="${filesdir}"

+ 1 - 0
UnrealTournament2004/ut2k4server

@@ -44,6 +44,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/System"
 executabledir="${systemdir}"

+ 3 - 2
UnrealTournament99/ut99server

@@ -20,7 +20,7 @@ version="210516"
 emailalert="off"
 email="email@example.com"
 
-# Pushbullet 
+# Pushbullet
 # https://www.pushbullet.com/#settings
 pushbulletalert="off"
 pushbullettoken="accesstoken"
@@ -53,6 +53,7 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/System"
 executabledir="${systemdir}"
@@ -112,7 +113,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
 			exit 1
 		else
 			echo -e "\e[0;32mOK\e[0m"
-		fi		
+		fi
 	else
 		echo -e "\e[0;31mFAIL\e[0m\n"
 		echo "Curl is not installed!"

+ 2 - 10
lgsm/functions/check.sh

@@ -13,7 +13,7 @@ local commandname="CHECK"
 check_root.sh
 check_permissions.sh
 
-if [ "${function_selfname}" != "command_install.sh" ] && [ "${function_selfname}" != "command_update_functions.sh" ]; then
+if [ "${function_selfname}" != "command_install.sh" ]&&[ "${function_selfname}" != "command_update_functions.sh" ]; then
 	check_system_dir.sh
 fi
 
@@ -59,14 +59,6 @@ do
 	fi
 done
 
-local allowed_commands_array=( command_console.sh command_start.sh )
-for allowed_command in "${allowed_commands_array[@]}"
-do
-	if [ "${allowed_command}" == "${function_selfname}" ]||[ "${gamename}" != "TeamSpeak 3" ]; then
-		check_tmux.sh
-	fi
-done
-
 local allowed_commands_array=( command_console.sh command_debug.sh command_details.sh command_monitor.sh command_start.sh command_stop.sh )
 for allowed_command in "${allowed_commands_array[@]}"
 do
@@ -83,7 +75,7 @@ do
 	fi
 done
 
-local allowed_commands_array=( command_install.sh command_start.sh command_debug.sh )
+local allowed_commands_array=( command_debug.sh command_start.sh command_install.sh )
 for allowed_command in "${allowed_commands_array[@]}"
 do
 	if [ "${allowed_command}" == "${function_selfname}" ]; then

+ 14 - 10
lgsm/functions/check_deps.sh

@@ -18,10 +18,10 @@ fn_deps_detector(){
 	if [ "${depstatus}" == "0" ]; then
 		missingdep=0
 		if [ "${function_selfname}" == "command_install.sh" ]; then
-			if [ "${tmuxcheck}" != "1" ]; then
+			if [ "${tmuxcheck}" == "1" ]; then
 				# Added for users compiling tmux from source to bypass rpm check
 				echo -e "${green}tmux${default}"
-				tmuxcheck=1
+				unset tmuxcheck
 			fi
 			echo -e "${green}${deptocheck}${default}"
 			sleep 0.5
@@ -138,12 +138,12 @@ if [ -n "$(command -v dpkg-query)" ]; then
 	array_deps_missing=()
 
 	# LGSM requirements
-	array_deps_required=( curl ca-certificates file bsdmainutils util-linux python bzip2 gzip )
+	array_deps_required=( curl wget ca-certificates file bsdmainutils util-linux python bzip2 gzip )
 
 	# All servers except ts3 require tmux
 	if [ "${executable}" != "./ts3server_startscript.sh" ]; then
-		if [ "$(command -v tmux)" ]||[ "$(which tmux)" ]||[ -f "/usr/bin/tmux" ]||[ -f "/bin/tmux" ]; then
-			: # Added for users compiling tmux from source to bypass rpm check
+		if [ "$(command -v tmux)" ]||[ "$(which tmux 2>/dev/null)" ]||[ -f "/usr/bin/tmux" ]||[ -f "/bin/tmux" ]; then
+			tmuxcheck=1 # Added for users compiling tmux from source to bypass rpm check
 		else
 			array_deps_required+=( tmux )
 		fi
@@ -168,7 +168,11 @@ if [ -n "$(command -v dpkg-query)" ]; then
 		array_deps_required+=( telnet expect )
 	# No More Room in Hell, Counter Strike: Source and Garry's Mod
 	elif [ "${gamename}" == "No More Room in Hell" ]||[ "${gamename}" == "Counter Strike: Source" ]||[ "${gamename}" == "Garry's Mod" ]; then
-		array_deps_required+=( lib32tinfo5 )
+		if [ "${arch}" == "x86_64" ]; then
+			array_deps_required+=( lib32tinfo5 )
+		else
+			array_deps_required+=( libtinfo5 )
+		fi
 	# Brainbread 2 and Don't Starve Together
 	elif [ "${gamename}" == "Brainbread 2" ]||[ "${gamename}" == "Don't Starve Together" ]; then
 		array_deps_required+=( libcurl4-gnutls-dev:i386 )
@@ -194,15 +198,15 @@ elif [ -n "$(command -v yum)" ]; then
 
 	# LGSM requirements
 	if [ "${distroversion}" == "6" ]; then
-		array_deps_required=( curl util-linux-ng python file gzip bzip2 )
+		array_deps_required=( curl wget util-linux-ng python file gzip bzip2 )
 	else
-		array_deps_required=( curl util-linux python file gzip bzip2 )
+		array_deps_required=( curl wget util-linux python file gzip bzip2 )
 	fi
 
 	# All servers except ts3 require tmux
 	if [ "${executable}" != "./ts3server_startscript.sh" ]; then
-		if [ "$(command -v tmux)" ]||[ "$(which tmux)" ]||[ -f "/usr/bin/tmux" ]||[ -f "/bin/tmux" ]; then
-			: # Added for users compiling tmux from source to bypass rpm check
+		if [ "$(command -v tmux)" ]||[ "$(which tmux 2>/dev/null)" ]||[ -f "/usr/bin/tmux" ]||[ -f "/bin/tmux" ]; then
+			tmuxcheck=1 # Added for users compiling tmux from source to bypass rpm check
 		else
 			array_deps_required+=( tmux )
 		fi

+ 5 - 3
lgsm/functions/check_ip.sh

@@ -19,9 +19,11 @@ if [ "${gamename}" != "TeamSpeak 3" ]; then
 
 	if [ "${ip}" == "0.0.0.0" ]||[ "${ip}" == "" ]; then
 		if [ "${getipwc}" -ge "2" ]; then
-			fn_print_dots ""
-			sleep 0.5
-			fn_print_fail "Multiple active network interfaces found.\n\n"
+			fn_print_dots "Check IP"
+			sleep 1
+			fn_print_fail "Check IP: Multiple active network interfaces found."
+			sleep 1
+			echo -en "\n"
 			fn_print_infomation "Specify the IP you want to use within the ${selfname} script.\n"
 			echo -en "Set ip=\"0.0.0.0\" to one of the following:\n"
 			echo -en "${getip}\n"

+ 10 - 3
lgsm/functions/check_system_requirements.sh

@@ -16,13 +16,20 @@ if [ "${gamename}" == "Rust" ]; then
 	ramrequirementgb="4"
 fi
 
+if [ "${gamename}" == "ARMA 3" ]; then
+	ramrequirementmb="1000"
+	ramrequirementgb="1"
+fi
+
 # If the game or engine has a minimum RAM Requirement, compare it to system's available RAM.
-if [ -n "${ramrequirement}" ]; then
+if [ -n "${ramrequirementmb}" ]; then
 	if [ "${physmemtotalmb}" -lt "${ramrequirementmb}" ]; then
+		fn_print_dots "Check RAM"
+		sleep 0.5
 		# Warn the user
-		fn_print_warn "Insufficient memory: ${ramrequirementgb}G required, ${physmemtotal} available"
+		fn_print_warn_nl "Check RAM: ${ramrequirementgb}G required, ${physmemtotal} available"
 		sleep 1
-		fn_print_warning "You may experiance poor performance from your server"
+		echo  "	* ${gamename} server may fail to run or experience poor performance."
 		sleep 1
 	fi
 fi

+ 2 - 2
lgsm/functions/command_backup.sh

@@ -47,7 +47,7 @@ if [ ! -d "${backupdir}" ]; then
 	mkdir "${backupdir}"
 fi
 tar -czf "${backupdir}/${backupname}.tar.gz" -C "${rootdir}" --exclude "backups" ./*
-if [ $? != 0 ]; then
+if [ $? == 0 ]; then
 	fn_print_ok_nl "Backup created: ${backupname}.tar.gz is $(du -sh "${backupdir}/${backupname}.tar.gz" | awk '{print $1}') size"
 	fn_script_log_pass "Backup created: ${backupdir}/${backupname}.tar.gz is $(du -sh "${backupdir}/${backupname}.tar.gz" | awk '{print $1}') size"
 else
@@ -56,4 +56,4 @@ else
 fi
 sleep 1
 echo ""
-core_exit.sh
+core_exit.sh

+ 48 - 48
lgsm/functions/command_dev_detect_deps.sh

@@ -42,62 +42,62 @@ else
 	echo "readelf/eu-readelf not installed"
 fi
 
-${readelf} -d ${executable} |grep NEEDED|awk '{ print $5 }'|sed 's/\[//g'|sed 's/\]//g' > "${rootdir}/.depdetect_readelf"
+${readelf} -d ${executable} |grep NEEDED|awk '{ print $5 }'|sed 's/\[//g'|sed 's/\]//g' > "${lgsmdir}/tmp/.depdetect_readelf"
 
 
-echo "yum install " > "${rootdir}/.depdetect_centos_list_uniq"
-echo "apt-get install " > "${rootdir}/.depdetect_ubuntu_list_uniq"
-echo "apt-get install " > "${rootdir}/.depdetect_debian_list_uniq"
+echo "yum install " > "${lgsmdir}/tmp/.depdetect_centos_list_uniq"
+echo "apt-get install " > "${lgsmdir}/tmp/.depdetect_ubuntu_list_uniq"
+echo "apt-get install " > "${lgsmdir}/tmp/.depdetect_debian_list_uniq"
 while read lib; do
 	sharedlib=${lib}
 	if [ "${lib}" == "libm.so.6" ]||[ "${lib}" == "libc.so.6" ]||[ "${lib}" == "libpthread.so.0" ]||[ "${lib}" == "libdl.so.2" ]||[ "${lib}" == "libnsl.so.1" ]||[ "${lib}" == "libgcc_s.so.1" ]||[ "${lib}" == "librt.so.1" ]||[ "${lib}" == "ld-linux.so.2" ]; then
-		echo "glibc.i686" >> "${rootdir}/.depdetect_centos_list"
-		echo "lib32gcc1" >> "${rootdir}/.depdetect_ubuntu_list"
-		echo "lib32gcc1" >> "${rootdir}/.depdetect_debian_list"
+		echo "glibc.i686" >> "${lgsmdir}/tmp/.depdetect_centos_list"
+		echo "lib32gcc1" >> "${lgsmdir}/tmp/.depdetect_ubuntu_list"
+		echo "lib32gcc1" >> "${lgsmdir}/tmp/.depdetect_debian_list"
 
 	elif [ "${lib}" == "libstdc++.so.6" ]; then
-		echo "libstdc++.i686" >> "${rootdir}/.depdetect_centos_list"
-		echo "libstdc++6:i386" >> "${rootdir}/.depdetect_ubuntu_list"
-		echo "libstdc++6:i386" >> "${rootdir}/.depdetect_debian_list"
+		echo "libstdc++.i686" >> "${lgsmdir}/tmp/.depdetect_centos_list"
+		echo "libstdc++6:i386" >> "${lgsmdir}/tmp/.depdetect_ubuntu_list"
+		echo "libstdc++6:i386" >> "${lgsmdir}/tmp/.depdetect_debian_list"
 
 	elif [ "${lib}" == "libstdc++.so.5" ]; then
-		echo "compat-libstdc++-33.i686" >> "${rootdir}/.depdetect_centos_list"
-		echo "libstdc++5:i386" >> "${rootdir}/.depdetect_ubuntu_list"
-		echo "libstdc++5:i386" >> "${rootdir}/.depdetect_debian_list"
+		echo "compat-libstdc++-33.i686" >> "${lgsmdir}/tmp/.depdetect_centos_list"
+		echo "libstdc++5:i386" >> "${lgsmdir}/tmp/.depdetect_ubuntu_list"
+		echo "libstdc++5:i386" >> "${lgsmdir}/tmp/.depdetect_debian_list"
 
 	elif [ "${lib}" == "libspeex.so.1" ]||[ "${lib}" == "libspeexdsp.so.1" ]; then
-		echo "speex.i686" >> "${rootdir}/.depdetect_centos_list"
-		echo "speex:i386" >> "${rootdir}/.depdetect_ubuntu_list"
-		echo "speex:i386" >> "${rootdir}/.depdetect_debian_list"
+		echo "speex.i686" >> "${lgsmdir}/tmp/.depdetect_centos_list"
+		echo "speex:i386" >> "${lgsmdir}/tmp/.depdetect_ubuntu_list"
+		echo "speex:i386" >> "${lgsmdir}/tmp/.depdetect_debian_list"
 
 	elif [ "${lib}" == "./libSDL-1.2.so.0" ]||[ "${lib}" == "libSDL-1.2.so.0" ]; then
-		echo "SDL.i686" >> "${rootdir}/.depdetect_centos_list"
-		echo "libsdl1.2debian" >> "${rootdir}/.depdetect_ubuntu_list"
-		echo "libsdl1.2debian" >> "${rootdir}/.depdetect_debian_list"
+		echo "SDL.i686" >> "${lgsmdir}/tmp/.depdetect_centos_list"
+		echo "libsdl1.2debian" >> "${lgsmdir}/tmp/.depdetect_ubuntu_list"
+		echo "libsdl1.2debian" >> "${lgsmdir}/tmp/.depdetect_debian_list"
 
 	elif [ "${lib}" == "libtbb.so.2" ]; then
-		echo "tbb.i686" >> "${rootdir}/.depdetect_centos_list"
-		echo "libtbb2" >> "${rootdir}/.depdetect_ubuntu_list"
-		echo "libtbb2" >> "${rootdir}/.depdetect_debian_list"
+		echo "tbb.i686" >> "${lgsmdir}/tmp/.depdetect_centos_list"
+		echo "libtbb2" >> "${lgsmdir}/tmp/.depdetect_ubuntu_list"
+		echo "libtbb2" >> "${lgsmdir}/tmp/.depdetect_debian_list"
 
 	elif [ "${lib}" == "libtier0.so" ]||[ "${lib}" == "Core.so" ]||[ "${lib}" == "Editor.so" ]||[ "${lib}" == "Engine.so" ]||[ "${lib}" == "liblua.so" ]||[ "${lib}" == "libsteam_api.so" ]||[ "${lib}" == "ld-linux-x86-64.so.2" ]||[ "${lib}" == "libPhysX3_x86.so" ]||[ "${lib}" == "libPhysX3Common_x86.so" ]||[ "${lib}" == "libPhysX3Cooking_x86.so" ]; then
 		# Known shared libs what dont requires dependencies
 		:
 	else
 		unknownlib=1
-		echo "${lib}" >> "${rootdir}/.depdetect_unknown"
+		echo "${lib}" >> "${lgsmdir}/tmp/.depdetect_unknown"
 	fi
-done < "${rootdir}/.depdetect_readelf"
-sort "${rootdir}/.depdetect_centos_list" | uniq >> "${rootdir}/.depdetect_centos_list_uniq"
-sort "${rootdir}/.depdetect_ubuntu_list" | uniq >> "${rootdir}/.depdetect_ubuntu_list_uniq"
-sort "${rootdir}/.depdetect_debian_list" | uniq >> "${rootdir}/.depdetect_debian_list_uniq"
+done < "${lgsmdir}/tmp/.depdetect_readelf"
+sort "${lgsmdir}/tmp/.depdetect_centos_list" | uniq >> "${lgsmdir}/tmp/.depdetect_centos_list_uniq"
+sort "${lgsmdir}/tmp/.depdetect_ubuntu_list" | uniq >> "${lgsmdir}/tmp/.depdetect_ubuntu_list_uniq"
+sort "${lgsmdir}/tmp/.depdetect_debian_list" | uniq >> "${lgsmdir}/tmp/.depdetect_debian_list_uniq"
 if [ "${unknownlib}" == "1" ]; then
-	sort "${rootdir}/.depdetect_unknown" | uniq >> "${rootdir}/.depdetect_unknown_uniq"
+	sort "${lgsmdir}/tmp/.depdetect_unknown" | uniq >> "${lgsmdir}/tmp/.depdetect_unknown_uniq"
 fi
 
-awk -vORS=' ' '{ print $1, $2 }' "${rootdir}/.depdetect_centos_list_uniq" > "${rootdir}/.depdetect_centos_line"
-awk -vORS=' ' '{ print $1, $2 }' "${rootdir}/.depdetect_ubuntu_list_uniq" > "${rootdir}/.depdetect_ubuntu_line"
-awk -vORS=' ' '{ print $1, $2 }' "${rootdir}/.depdetect_debian_list_uniq" > "${rootdir}/.depdetect_debian_line"
+awk -vORS=' ' '{ print $1, $2 }' "${lgsmdir}/tmp/.depdetect_centos_list_uniq" > "${lgsmdir}/tmp/.depdetect_centos_line"
+awk -vORS=' ' '{ print $1, $2 }' "${lgsmdir}/tmp/.depdetect_ubuntu_list_uniq" > "${lgsmdir}/tmp/.depdetect_ubuntu_line"
+awk -vORS=' ' '{ print $1, $2 }' "${lgsmdir}/tmp/.depdetect_debian_list_uniq" > "${lgsmdir}/tmp/.depdetect_debian_line"
 
 echo ""
 echo "Required Dependencies"
@@ -106,46 +106,46 @@ echo "${executable}"
 echo ""
 echo "CentOS"
 echo "================================="
-cat "${rootdir}/.depdetect_centos_line"
+cat "${lgsmdir}/tmp/.depdetect_centos_line"
 echo ""
 echo ""
 echo "Ubuntu"
 echo "================================="
-cat "${rootdir}/.depdetect_ubuntu_line"
+cat "${lgsmdir}/tmp/.depdetect_ubuntu_line"
 echo ""
 echo ""
 echo "Debian"
 echo "================================="
-cat "${rootdir}/.depdetect_debian_line"
+cat "${lgsmdir}/tmp/.depdetect_debian_line"
 echo ""
 if [ "${unknownlib}" == "1" ]; then
 	echo ""
 	echo "Unknown shared Library"
 	echo "================================="
-	cat "${rootdir}/.depdetect_unknown"
+	cat "${lgsmdir}/tmp/.depdetect_unknown"
 fi
 echo ""
 echo "Required Librarys"
 echo "================================="
-sort "${rootdir}/.depdetect_readelf" |uniq
+sort "${lgsmdir}/tmp/.depdetect_readelf" |uniq
 echo ""
 echo "ldd"
 echo "================================="
 ldd ${executable}
 echo -en "\n"
-rm -f "${rootdir}/.depdetect_centos_line"
-rm -f "${rootdir}/.depdetect_centos_list"
-rm -f "${rootdir}/.depdetect_centos_list_uniq"
+rm -f "${lgsmdir}/tmp/.depdetect_centos_line"
+rm -f "${lgsmdir}/tmp/.depdetect_centos_list"
+rm -f "${lgsmdir}/tmp/.depdetect_centos_list_uniq"
 
-rm -f "${rootdir}/.depdetect_debian_line"
-rm -f "${rootdir}/.depdetect_debian_list"
-rm -f "${rootdir}/.depdetect_debian_list_uniq"
+rm -f "${lgsmdir}/tmp/.depdetect_debian_line"
+rm -f "${lgsmdir}/tmp/.depdetect_debian_list"
+rm -f "${lgsmdir}/tmp/.depdetect_debian_list_uniq"
 
-rm -f "${rootdir}/.depdetect_ubuntu_line"
-rm -f "${rootdir}/.depdetect_ubuntu_list"
-rm -f "${rootdir}/.depdetect_ubuntu_list_uniq"
+rm -f "${lgsmdir}/tmp/.depdetect_ubuntu_line"
+rm -f "${lgsmdir}/tmp/.depdetect_ubuntu_list"
+rm -f "${lgsmdir}/tmp/.depdetect_ubuntu_list_uniq"
 
-rm -f "${rootdir}/.depdetect_readelf"
+rm -f "${lgsmdir}/tmp/.depdetect_readelf"
 
-rm -f "${rootdir}/.depdetect_unknown"
-rm -f "${rootdir}/.depdetect_unknown_uniq"
+rm -f "${lgsmdir}/tmp/.depdetect_unknown"
+rm -f "${lgsmdir}/tmp/.depdetect_unknown_uniq"

+ 31 - 0
lgsm/functions/command_dev_detect_glibc.sh

@@ -0,0 +1,31 @@
+#!/bin/bash
+# command_dev_detect_glibc.sh function
+# Author: Daniel Gibbs
+# Website: https://gameservermanagers.com
+# Description: Automatically detects the version of GLIBC that is required.
+# Can check a file or directory recursively.
+
+echo "================================="
+echo "GLIBC Requirements Checker"
+echo "================================="
+
+if [ -z "${filesdir}" ]; then
+	dir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))"
+fi
+
+if [ -d "${filesdir}" ]; then
+	echo "Checking directory: "
+	echo "${filesdir}"
+elif [ -f "${filesdir}" ]; then
+	echo "Checking file: "
+	echo "${filesdir}"
+fi
+echo ""
+
+find ${filesdir} -type f -print0 |
+while IFS= read -r -d $'\0' line; do
+	objdump -T $line 2>/dev/null|grep -oP "GLIBC[^ ]+" >>"${lgsmdir}/tmp/detect_glibc.tmp"
+done
+
+cat "${lgsmdir}/tmp/detect_glibc.tmp"|sort|uniq|sort -r --version-sort
+rm "${lgsmdir}/tmp/detect_glibc.tmp"

+ 2 - 1
lgsm/functions/core_dl.sh

@@ -130,8 +130,8 @@ fn_fetch_file(){
 				if [ -f "${scriptlog}" ]; then
 					fn_script_log_fatal "downloading ${filename}: FAIL"
 				fi
+				echo -e "${fileurl}" | tee -a "${scriptlog}"
 				echo "${curlcmd}" | tee -a "${scriptlog}"
-				echo -e "${fileurl}\n" | tee -a "${scriptlog}"
 				core_exit.sh
 			else
 				fn_print_ok_eol_nl
@@ -208,6 +208,7 @@ fn_fetch_function(){
 }
 
 fn_update_function(){
+	exitbypass=1
 	github_file_url_dir="lgsm/functions" # github dir containing the file
 	github_file_url_name="${functionfile}" # name of the github file
 	githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"

+ 0 - 1
lgsm/functions/core_exit.sh

@@ -35,4 +35,3 @@ else
 	trap - INT
 	exit ${exitcode}
 fi
-

+ 5 - 1
lgsm/functions/core_functions.sh

@@ -26,7 +26,7 @@ fn_fetch_function
 }
 
 # fn_fetch_core_dl also placed here to allow legacy servers to still download core functions
-if [ -z "${lgsmdir}" ]; then
+if [ -z "${lgsmdir}" ]||[ -z "${functionsdir}" ]||[ -z "${libdir}" ]; then
 	lgsmdir="${rootdir}/lgsm"
 	functionsdir="${lgsmdir}/functions"
 	libdir="${lgsmdir}/lib"
@@ -265,6 +265,10 @@ functionfile="${FUNCNAME}"
 fn_fetch_function
 }
 
+command_dev_detect_glibc.sh(){
+functionfile="${FUNCNAME}"
+fn_fetch_function
+}
 
 # Fix
 

+ 14 - 0
lgsm/functions/core_getopt.sh

@@ -43,6 +43,8 @@ case "${getopt}" in
 		fn_autoinstall;;
 	dd|depsdetect)
 		command_dev_detect_deps.sh;;
+	dg|detect-glibc)
+		command_dev_detect_glibc.sh;;
 	*)
 	if [ -n "${getopt}" ]; then
 		echo -e "${red}Unknown command${default}: $0 ${getopt}"
@@ -103,6 +105,8 @@ case "${getopt}" in
 		fn_autoinstall;;
 	dd|depsdetect)
 		command_dev_detect_deps.sh;;
+	dg|detect-glibc)
+		command_dev_detect_glibc.sh;;
 	*)
 	if [ -n "${getopt}" ]; then
 		echo -e "${red}Unknown command${default}: $0 ${getopt}"
@@ -156,6 +160,8 @@ case "${getopt}" in
 		command_install.sh;;
 	dd|depsdetect)
 		command_dev_detect_deps.sh;;
+	dg|detect-glibc)
+		command_dev_detect_glibc.sh;;
 	*)
 	if [ -n "${getopt}" ]; then
 		echo -e "${red}Unknown command${default}: $0 ${getopt}"
@@ -218,6 +224,8 @@ case "${getopt}" in
 		fn_autoinstall;;
 	dd|depsdetect)
 		command_dev_detect_deps.sh;;
+	dg|detect-glibc)
+		command_dev_detect_glibc.sh;;
 	fd|fastdl)
 		command_fastdl.sh;;
 	*)
@@ -283,6 +291,8 @@ case "${getopt}" in
 		compress_ut99_maps.sh;;
 	dd|depsdetect)
 		command_dev_detect_deps.sh;;
+	dg|detect-glibc)
+		command_dev_detect_glibc.sh;;
 	*)
 	if [ -n "${getopt}" ]; then
 		echo -e "${red}Unknown command${default}: $0 ${getopt}"
@@ -349,6 +359,8 @@ case "${getopt}" in
 		fn_autoinstall;;
 	dd|depsdetect)
 		command_dev_detect_deps.sh;;
+	dg|detect-glibc)
+		command_dev_detect_glibc.sh;;
 	mc|map-compressor)
 		compress_unreal2_maps.sh;;
 	*)
@@ -417,6 +429,8 @@ case "${getopt}" in
 		compress_unreal2_maps.sh;;
 	dd|depsdetect)
 		command_dev_detect_deps.sh;;
+	dg|detect-glibc)
+		command_dev_detect_glibc.sh;;
 	*)
 	if [ -n "${getopt}" ]; then
 		echo -e "${red}Unknown command${default}: $0 ${getopt}"

+ 0 - 4
lgsm/functions/fix.sh

@@ -44,10 +44,6 @@ if [ "${function_selfname}" != "command_install.sh" ]; then
 	elif [ "${gamename}" == "ARMA 3" ]; then
 		fix_arma3.sh
 	fi
-
-	if [ "${gamename}" != "TeamSpeak 3" ]; then
-		fix_glibc.sh
-	fi
 fi
 
 # Fixes that are run on install only.

+ 17 - 1
lgsm/functions/fix_glibc.sh

@@ -16,7 +16,7 @@ do
 	fi
 done
 
-local libm_servers_array=( "Double Action: Boogaloo" "Fistful of Frags" "Insurgency" "Natural Selection 2" "NS2: Combat" "No More Room in Hell" )
+local libm_servers_array=( "Codename CURE" "Day of Infamy" "Double Action: Boogaloo" "Empires Mod" "Fistful of Frags" "Garry's Mod" "Insurgency" "Natural Selection 2" "NS2: Combat" "No More Room in Hell" )
 for libm_server in "${libm_servers_array[@]}"
 do
 	if [ "${gamename}" == "${libm_server}" ]; then
@@ -24,4 +24,20 @@ do
 	fi
 done
 
+local libc_servers_array=( "Garry's Mod" )
+for libc_server in "${libc_servers_array[@]}"
+do
+	if [ "${gamename}" == "${libc_server}" ]; then
+		fn_fetch_file_github "lgsm/lib/ubuntu12.04/i386" "libc.so.6" "${lgsmdir}/lib" "noexecutecmd" "norun" "noforce" "nomd5"
+	fi
+done
+
+local libpthread_servers_array=( "Garry's Mod" )
+for libpthread_server in "${libpthread_servers_array[@]}"
+do
+	if [ "${gamename}" == "${libpthread_server}" ]; then
+		fn_fetch_file_github "lgsm/lib/ubuntu12.04/i386" "libpthread.so.0" "${lgsmdir}/lib" "noexecutecmd" "norun" "noforce" "nomd5"
+	fi
+done
+
 export LD_LIBRARY_PATH=:"${libdir}"

+ 5 - 1
lgsm/functions/info_distro.sh

@@ -25,7 +25,11 @@ else
 	distroname="$(uname -s) $(uname -r)"
 fi
 
-distroversion=$(grep VERSION_ID /etc/os-release | tr -cd '[:digit:]')
+if [ -f "/etc/os-release" ]; then
+	distroversion=$(grep VERSION_ID /etc/os-release | tr -cd '[:digit:]')
+elif [ -n "$(command -v yum)" ]; then
+	distroversion=$(rpm -qa \*-release | grep -Ei "oracle|redhat|centos" | cut -d"-" -f3)
+fi
 
 ## Glibc version
 # e.g: 1.17

+ 6 - 0
lgsm/functions/info_glibc.sh

@@ -11,9 +11,15 @@ if [ "${gamename}" == "Blade Symphony" ]; then
 	glibcfix="yes"
 elif [ "${gamename}" == "BrainBread 2" ]; then
 	glibcrequired="2.17"
+elif [ "${gamename}" == "Day of Infamy" ]; then
+	glibcrequired="2.15"
+	glibcfix="yes"
 elif [ "${gamename}" == "Double Action: Boogaloo" ]; then
 	glibcrequired="2.15"
 	glibcfix="yes"
+elif [ "${gamename}" == "Empires Mod" ]; then
+	glibcrequired="2.15"
+	glibcfix="yes"
 elif [ "${gamename}" == "Fistful of Frags" ]; then
 	glibcrequired="2.15"
 	glibcfix="yes"

+ 3 - 1
lgsm/functions/install_config.sh

@@ -247,7 +247,7 @@ elif [ "${gamename}" == "Day of Infamy" ]; then
 	fn_sourceconfig
 elif [ "${gamename}" == "Don't Starve Together" ]; then
 	echo -e "downloading lgsm-default.ini...\c"
-	wget -N /dev/null ${githuburl}/DontStarveTogether/lgsm-default.ini 2>&1 | grep -F HTTP | cut -c45- | uniq
+	wget -N /dev/null ${githuburl}/DontStarveTogether/cfg/lgsm-default.ini 2>&1 | grep -F HTTP | cut -c45- | uniq
 	sleep 1
 	fn_defaultconfig
 elif [ "${gamename}" == "Double Action: Boogaloo" ]; then
@@ -255,6 +255,8 @@ elif [ "${gamename}" == "Double Action: Boogaloo" ]; then
 	wget -N /dev/null ${githuburl}/DoubleActionBoogaloo/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
 	sleep 1
 	fn_sourceconfig
+elif [ "${gamename}" == "Empires Mod" ]; then
+	fn_defaultconfig
 elif [ "${gamename}" == "Fistful of Frags" ]; then
 	echo -e "downloading lgsm-default.cfg...\c"
 	wget -N /dev/null ${githuburl}/FistfulOfFrags/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq

+ 1 - 1
lgsm/functions/install_gslt.sh

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

+ 1 - 1
lgsm/functions/update_minecraft.sh

@@ -2,7 +2,7 @@
 # LGSM update_minecraft.sh function
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
-# Description: Handles updating of minecraft servers.
+# Description: Handles updating of Minecraft servers.
 
 local commandname="UPDATE"
 local commandaction="Update"

BIN
Insurgency/dependencies/libpthread.so.0 → lgsm/lib/ubuntu12.04/i386/libpthread.so.0


+ 12 - 0
tests/tests_jc2server.sh

@@ -473,6 +473,18 @@ fn_setstatus
 (command_validate.sh)
 fn_test_result_pass
 
+echo ""
+echo "4.9 - update-functions"
+echo "================================="
+echo "Description:"
+echo "runs update-functions."
+echo ""
+echo "Command: ./jc2server update-functions"
+requiredstatus="OFFLINE"
+fn_setstatus
+(command_update_functions.sh)
+fn_test_result_pass
+
 echo ""
 echo "5.1 - monitor - online"
 echo "================================="

+ 13 - 0
tests/tests_ts3server.sh

@@ -368,6 +368,7 @@ fn_setstatus
 (command_restart.sh)
 fn_test_result_pass
 
+echo ""
 echo "4.1 - update"
 echo "================================="
 echo "Description:"
@@ -378,6 +379,18 @@ fn_setstatus
 (command_update.sh)
 fn_test_result_pass
 
+echo ""
+echo "4.2 - update-functions"
+echo "================================="
+echo "Description:"
+echo "runs update-functions."
+echo ""
+echo "Command: ./jc2server update-functions"
+requiredstatus="OFFLINE"
+fn_setstatus
+(command_update_functions.sh)
+fn_test_result_pass
+
 echo ""
 echo "5.1 - monitor - online"
 echo "================================="