Explorar o código

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

# Conflicts:
#	lgsm/functions/command_install.sh
#	lgsm/functions/install_config.sh
#	lgsm/functions/install_server_files.sh
Daniel Gibbs %!s(int64=9) %!d(string=hai) anos
pai
achega
5f461b14a4
Modificáronse 100 ficheiros con 1546 adicións e 920 borrados
  1. 9 2
      7DaysToDie/sdtdserver
  2. 9 2
      ARKSurvivalEvolved/arkserver
  3. 14 10
      Arma3/arma3server
  4. 6 4
      Battlefield1942/bf1942server
  5. 9 2
      BlackMesa/bmdmserver
  6. 9 2
      BladeSymphony/bsserver
  7. 9 2
      BrainBread2/bb2server
  8. 9 2
      CodenameCURE/ccserver
  9. 3 1
      CounterStrike/csserver
  10. 3 1
      CounterStrikeConditionZero/csczserver
  11. 3 1
      CounterStrikeGlobalOffensive/csgoserver
  12. 9 2
      CounterStrikeSource/cssserver
  13. 3 1
      DayOfDefeat/dodserver
  14. 9 2
      DayOfDefeatSource/dodsserver
  15. 9 2
      DayOfInfamy/doiserver
  16. 3 1
      DeathmatchClassic/dmcserver
  17. 9 1
      DontStarveTogether/dstserver
  18. 9 2
      DoubleActionBoogaloo/dabserver
  19. 9 2
      EmpiresMod/emserver
  20. BIN=BIN
      FistfulOfFrags/dependencies/libm.so.6
  21. 9 2
      FistfulOfFrags/fofserver
  22. BIN=BIN
      GarrysMod/dependencies/libc.so.6
  23. BIN=BIN
      GarrysMod/dependencies/libm.so.6
  24. BIN=BIN
      GarrysMod/dependencies/libpthread.so.0
  25. BIN=BIN
      GarrysMod/dependencies/libstdc++.so.6
  26. 9 2
      GarrysMod/gmodserver
  27. 3 1
      GoldenEyeSource/gesserver
  28. 3 1
      HalfLife2Deathmatch/hl2dmserver
  29. 3 1
      HalfLifeDeathmatch/hldmserver
  30. 3 1
      HalfLifeDeathmatchSource/hldmsserver
  31. 8 1
      Hurtworld/hwserver
  32. 10 3
      Insurgency/insserver
  33. 1 0
      JustCause2/cfg/config.lua
  34. 9 3
      JustCause2/jc2server
  35. 9 2
      KillingFloor/kfserver
  36. 1 1
      LICENSE
  37. 9 2
      Left4Dead/l4dserver
  38. 9 2
      Left4Dead2/l4d2server
  39. 2 0
      Minecraft/mcserver
  40. 3 1
      Mumble/mumbleserver
  41. BIN=BIN
      NS2Combat/dependencies/libc.so.6
  42. BIN=BIN
      NS2Combat/dependencies/libm.so.6
  43. BIN=BIN
      NS2Combat/dependencies/libstdc++.so.6
  44. 8 1
      NS2Combat/ns2cserver
  45. BIN=BIN
      NaturalSelection2/dependencies/libc.so.6
  46. BIN=BIN
      NaturalSelection2/dependencies/libm.so.6
  47. BIN=BIN
      NaturalSelection2/dependencies/libstdc++.so.6
  48. 4 2
      NaturalSelection2/ns2server
  49. BIN=BIN
      NoMoreRoomInHell/dependencies/libm.so.6
  50. 9 2
      NoMoreRoomInHell/nmrihserver
  51. 3 1
      OpposingForce/opforserver
  52. 9 2
      PiratesVikingandKnightsII/pvkiiserver
  53. 9 5
      ProjectZomboid/pzserver
  54. 11 4
      QuakeLive/qlserver
  55. 3 1
      RedOrchestra/roserver
  56. 3 1
      Ricochet/ricochetserver
  57. 9 2
      Rust/rustserver
  58. 9 2
      SeriousSam3BFE/ss3sserver
  59. 9 2
      Starbound/sbserver
  60. 9 2
      SvenCoop/svenserver
  61. 9 2
      TeamFortress2/tf2server
  62. 3 1
      TeamFortressClassic/tfcserver
  63. 3 1
      TeamSpeak3/ts3server
  64. 3 1
      Teeworlds/twserver
  65. 3 1
      Terraria/terrariaserver
  66. 2 0
      UnrealTournament/utserver
  67. 3 1
      UnrealTournament2004/ut2k4server
  68. 13 9
      UnrealTournament3/ut3server
  69. 3 1
      UnrealTournament99/ut99server
  70. 5 3
      WolfensteinEnemyTerritory/wetserver
  71. 5 1
      lgsm/functions/alert_email.sh
  72. 1 1
      lgsm/functions/alert_pushbullet.sh
  73. 1 1
      lgsm/functions/check.sh
  74. 32 13
      lgsm/functions/check_deps.sh
  75. 9 3
      lgsm/functions/check_ip.sh
  76. 2 2
      lgsm/functions/check_permissions.sh
  77. 2 2
      lgsm/functions/check_steamcmd.sh
  78. 7 1
      lgsm/functions/command_debug.sh
  79. 106 64
      lgsm/functions/command_details.sh
  80. 48 48
      lgsm/functions/command_dev_detect_deps.sh
  81. 13 4
      lgsm/functions/command_dev_detect_glibc.sh
  82. 53 0
      lgsm/functions/command_dev_detect_ldd.sh
  83. 1 0
      lgsm/functions/command_fastdl.sh
  84. 1 1
      lgsm/functions/command_install.sh
  85. 1 1
      lgsm/functions/command_monitor.sh
  86. 146 0
      lgsm/functions/command_postdetails.sh
  87. 1 0
      lgsm/functions/command_stop.sh
  88. 25 9
      lgsm/functions/core_functions.sh
  89. 102 5
      lgsm/functions/core_getopt.sh
  90. 0 6
      lgsm/functions/fix.sh
  91. 3 3
      lgsm/functions/fix_glibc.sh
  92. 0 30
      lgsm/functions/fix_ut99.sh
  93. 113 107
      lgsm/functions/gsquery.py
  94. 150 89
      lgsm/functions/info_config.sh
  95. 9 5
      lgsm/functions/info_glibc.sh
  96. 3 3
      lgsm/functions/info_parms.sh
  97. 321 400
      lgsm/functions/install_config.sh
  98. 11 7
      lgsm/functions/install_server_files.sh
  99. 2 0
      lgsm/functions/monitor_gsquery.sh
  100. 2 2
      lgsm/functions/update_minecraft.sh

+ 9 - 2
7DaysToDie/sdtdserver

@@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="210516"
+version="160916"
 
 #### Variables ####
 
@@ -19,6 +19,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -50,6 +51,11 @@ githubbranch="master"
 # Steam
 appid="294420"
 
+# Steam App Branch Select
+# Allows to opt into the various Steam app branches. Default branch is "".
+# Example: "-beta latest_experimental"
+branch=""
+
 # Server Details
 servicename="sdtd-server"
 gamename="7 Days To Die"
@@ -62,14 +68,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}"
 executabledir="${filesdir}"
 executable="./7DaysToDieServer.x86"
 servercfg="${servicename}.xml"
+servercfgdefault="serverconfig.xml"
 servercfgdir="${filesdir}"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/serverconfig.xml"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 9 - 2
ARKSurvivalEvolved/arkserver

@@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="210516"
+version="160916"
 
 #### Variables ####
 
@@ -19,6 +19,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -55,6 +56,11 @@ githubbranch="master"
 # Steam
 appid="376030"
 
+# Steam App Branch Select
+# Allows to opt into the various Steam app branches. Default branch is "".
+# Example: "-beta beta"
+branch=""
+
 # Server Details
 servicename="ark-server"
 gamename="ARK: Survivial Evolved"
@@ -67,6 +73,7 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/ShooterGame"
 executabledir="${systemdir}/Binaries/Linux"
@@ -74,7 +81,7 @@ executable="./ShooterGameServer"
 servercfgdir="${systemdir}/Saved/Config/LinuxServer"
 servercfg="GameUserSettings.ini"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.ini"
+servercfgdefault="${servercfgdir}/GameUserSettings.ini"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 14 - 10
Arma3/arma3server

@@ -10,7 +10,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="210516"
+version="160916"
 
 #### Variables ####
 
@@ -20,6 +20,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -41,10 +42,10 @@ parms="-netlog -ip=${ip} -port=${port} -cfg=${networkcfgfullpath} -config=${serv
 
 # ARMA 3 Modules
 # add mods with relative paths:
-# mods/\@CBA_A3\;
-# or several mods as:
-# mods/\@CBA_A3\;mods/\@task_force_radio
-# and chmod modules directories to 775
+# mods/@cba_a3
+# to load the "Community Base Addons v3" module found in the
+# directory serverfiles/mods/@cba_a3.  Load several mods as:
+# mods="mods/@ace\;mods/@acex\;mods/@cba_a3"
 mods=""
 
 # Server-side Mods
@@ -64,10 +65,12 @@ githubrepo="LinuxGSM"
 githubbranch="master"
 
 # Steam
-# Stable
 appid="233780"
-# Development
-# appid="233780 -beta development"
+
+# Steam App Branch Select
+# Allows to opt into the various Steam app branches. Default branch is "".
+# Example: "-beta development"
+branch=""
 
 # Server Details
 servicename="arma3-server"
@@ -81,17 +84,18 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}"
 executabledir="${filesdir}"
 executable="./arma3server"
 servercfg="${servicename}.server.cfg"
 networkcfg="${servicename}.network.cfg"
+servercfgdefault="server.cfg"
+networkcfgdefault="network.cfg"
 servercfgdir="${systemdir}/cfg"
 servercfgfullpath="${servercfgdir}/${servercfg}"
 networkcfgfullpath="${servercfgdir}/${networkcfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.server.cfg"
-networkcfgdefault="${servercfgdir}/lgsm-default.network.cfg"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 6 - 4
Battlefield1942/bf1942server

@@ -19,6 +19,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -26,10 +27,9 @@ pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Start Variables
-ip="0.0.0.0"
 
 fn_parms(){
-parms=" +hostServer 1 +dedicated 1"
+parms="+hostServer 1 +dedicated 1"
 }
 
 #### Advanced Variables ####
@@ -37,8 +37,8 @@ parms=" +hostServer 1 +dedicated 1"
 # Github Branch Select
 # Allows for the use of different function files
 # from a different repo and/or branch.
-githubuser="dgibbs64"
-githubrepo="linuxgsm"
+githubuser="GameServerManagers"
+githubrepo="LinuxGSM"
 githubbranch="master"
 
 # Server Details
@@ -53,11 +53,13 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}"
 executabledir="${systemdir}"
 executable="./start.sh"
 servercfg="serversettings.con"
+servercfgdefault="serversettings.con"
 servercfgdir="${systemdir}/mods/bf1942/settings"
 servercfgfullpath="${servercfgdir}/${servercfg}"
 backupdir="${rootdir}/backups"

+ 9 - 2
BlackMesa/bmdmserver

@@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="210516"
+version="160916"
 
 #### Variables ####
 
@@ -19,6 +19,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -60,6 +61,11 @@ githubbranch="master"
 # Steam
 appid="346680"
 
+# Steam App Branch Select
+# Allows to opt into the various Steam app branches. Default branch is "".
+# Example: "-beta public-beta"
+branch=""
+
 # Server Details
 servicename="bmdm-server"
 gamename="Black Mesa: Deathmatch"
@@ -72,14 +78,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/bms"
 executabledir="${filesdir}"
 executable="./srcds_run"
 servercfg="${servicename}.cfg"
+servercfgdefault="server.cfg"
 servercfgdir="${systemdir}/cfg"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.cfg"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 9 - 2
BladeSymphony/bsserver

@@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="210516"
+version="160916"
 
 #### Variables ####
 
@@ -19,6 +19,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -55,6 +56,11 @@ githubbranch="master"
 # Steam
 appid="228780"
 
+# Steam App Branch Select
+# Allows to opt into the various Steam app branches. Default branch is "".
+# Example: "-beta nightly -betapassword winteriscoming"
+branch=""
+
 # Server Details
 servicename="bs-server"
 gamename="Blade Symphony"
@@ -67,14 +73,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/berimbau"
 executabledir="${filesdir}"
 executable="./srcds_run.sh"
 servercfg="${servicename}.cfg"
+servercfgdefault="server.cfg"
 servercfgdir="${systemdir}/cfg"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.cfg"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 9 - 2
BrainBread2/bb2server

@@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="030616"
+version="160916"
 
 #### Variables ####
 
@@ -19,6 +19,7 @@ version="030616"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -60,6 +61,11 @@ githubbranch="master"
 # Steam
 appid="475370"
 
+# Steam App Branch Select
+# Allows to opt into the various Steam app branches. Default branch is "".
+# Example: "-beta beta_branch"
+branch=""
+
 # Server Details
 servicename="bb2-server"
 gamename="BrainBread 2"
@@ -72,14 +78,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/brainbread2"
 executabledir="${filesdir}"
 executable="./srcds_run"
 servercfg="${servicename}.cfg"
+servercfgdefault="server.cfg"
 servercfgdir="${systemdir}/cfg"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.cfg"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 9 - 2
CodenameCURE/ccserver

@@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="210516"
+version="160916"
 
 #### Variables ####
 
@@ -19,6 +19,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -55,6 +56,11 @@ githubbranch="master"
 # Steam
 appid="383410"
 
+# Steam App Branch Select
+# Allows to opt into the various Steam app branches. Default branch is "".
+# Example: "-beta beta"
+branch=""
+
 # Server Details
 servicename="cc-server"
 gamename="Codename CURE"
@@ -67,14 +73,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/cure"
 executabledir="${filesdir}"
 executable="./srcds_run"
 servercfg="${servicename}.cfg"
+servercfgdefault="server.cfg"
 servercfgdir="${systemdir}/cfg"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.cfg"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 3 - 1
CounterStrike/csserver

@@ -19,6 +19,7 @@ version="060816"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -67,14 +68,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/cstrike"
 executabledir="${filesdir}"
 executable="./hlds_run"
 servercfg="${servicename}.cfg"
+servercfgdefault="server.cfg"
 servercfgdir="${systemdir}"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.cfg"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 3 - 1
CounterStrikeConditionZero/csczserver

@@ -19,6 +19,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -67,14 +68,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/czero"
 executabledir="${filesdir}"
 executable="./hlds_run"
 servercfg="${servicename}.cfg"
+servercfgdefault="server.cfg"
 servercfgdir="${systemdir}"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.cfg"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 3 - 1
CounterStrikeGlobalOffensive/csgoserver

@@ -19,6 +19,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -95,14 +96,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/csgo"
 executabledir="${filesdir}"
 executable="./srcds_run"
 servercfg="${servicename}.cfg"
+servercfgdefault="server.cfg"
 servercfgdir="${systemdir}/cfg"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.cfg"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 9 - 2
CounterStrikeSource/cssserver

@@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="210516"
+version="160916"
 
 #### Variables ####
 
@@ -19,6 +19,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -60,6 +61,11 @@ githubbranch="master"
 # Steam
 appid="232330"
 
+# Steam App Branch Select
+# Allows to opt into the various Steam app branches. Default branch is "".
+# Example: "-beta prerelease"
+branch=""
+
 # Server Details
 servicename="css-server"
 gamename="Counter-Strike: Source"
@@ -72,14 +78,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/cstrike"
 executabledir="${filesdir}"
 executable="./srcds_run"
 servercfg="${servicename}.cfg"
+servercfgdefault="server.cfg"
 servercfgdir="${systemdir}/cfg"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.cfg"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 3 - 1
DayOfDefeat/dodserver

@@ -19,6 +19,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -67,14 +68,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/dod"
 executabledir="${filesdir}"
 executable="./hlds_run"
 servercfg="${servicename}.cfg"
+servercfgdefault="server.cfg"
 servercfgdir="${systemdir}"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.cfg"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 9 - 2
DayOfDefeatSource/dodsserver

@@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="210516"
+version="160916"
 
 #### Variables ####
 
@@ -19,6 +19,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -55,6 +56,11 @@ githubbranch="master"
 # Steam
 appid="232290"
 
+# Steam App Branch Select
+# Allows to opt into the various Steam app branches. Default branch is "".
+# Example: "-beta prerelease"
+branch=""
+
 # Server Details
 servicename="dods-server"
 gamename="Day of Defeat: Source"
@@ -67,14 +73,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/dod"
 executabledir="${filesdir}"
 executable="./srcds_run"
 servercfg="${servicename}.cfg"
+servercfgdefault="server.cfg"
 servercfgdir="${systemdir}/cfg"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.cfg"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 9 - 2
DayOfInfamy/doiserver

@@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="210516"
+version="160916"
 
 #### Variables ####
 
@@ -19,6 +19,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -57,6 +58,11 @@ githubbranch="master"
 # Steam
 appid="462310"
 
+# Steam App Branch Select
+# Allows to opt into the various Steam app branches. Default branch is "".
+# Example: "-beta beta"
+branch=""
+
 # Server Details
 servicename="doi-server"
 gamename="Day of Infamy"
@@ -69,14 +75,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/doi"
 executabledir="${filesdir}"
 executable="./srcds_run"
 servercfg="${servicename}.cfg"
+servercfgdefault="server.cfg"
 servercfgdir="${systemdir}/cfg"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.cfg"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 3 - 1
DeathmatchClassic/dmcserver

@@ -19,6 +19,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -67,14 +68,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/dmc"
 executabledir="${filesdir}"
 executable="./hlds_run"
 servercfg="${servicename}.cfg"
+servercfgdefault="server.cfg"
 servercfgdir="${systemdir}"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.cfg"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 9 - 1
DontStarveTogether/dstserver

@@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="130516"
+version="160916"
 
 #### Variables ####
 
@@ -19,6 +19,7 @@ version="130516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -53,6 +54,11 @@ githubbranch="master"
 # Steam
 appid="343050"
 
+# Steam App Branch Select
+# Allows to opt into the various Steam app branches. Default branch is "".
+# Example: "-beta anewreignbeta"
+branch=""
+
 # Server Details
 servicename="dst-server"
 gamename="Don't Starve Together"
@@ -65,11 +71,13 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}"
 executabledir="${filesdir}/bin"
 executable="./dontstarve_dedicated_server_nullrenderer"
 servercfg="settings.ini"
+servercfgdefault="settings.ini"
 servercfgdir="${HOME}/.klei/DoNotStarveTogether"
 servercfgfullpath="${servercfgdir}/${servercfg}"
 servercfgdefault="${servercfgdir}/lgsm-default.ini"

+ 9 - 2
DoubleActionBoogaloo/dabserver

@@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="210516"
+version="160916"
 
 #### Variables ####
 
@@ -19,6 +19,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -55,6 +56,11 @@ githubbranch="master"
 # Steam
 appid="317800"
 
+# Steam App Branch Select
+# Allows to opt into the various Steam app branches. Default branch is "".
+# Example: "-beta beta"
+branch=""
+
 # Server Details
 servicename="dab-server"
 gamename="Double Action: Boogaloo"
@@ -67,14 +73,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/dab"
 executabledir="${filesdir}"
 executable="./dabds.sh"
 servercfg="${servicename}.cfg"
+servercfgdefault="server.cfg"
 servercfgdir="${systemdir}/cfg"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.cfg"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 9 - 2
EmpiresMod/emserver

@@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="210516"
+version="160916"
 
 #### Variables ####
 
@@ -19,6 +19,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -60,6 +61,11 @@ githubbranch="master"
 # Steam
 appid="460040"
 
+# Steam App Branch Select
+# Allows to opt into the various Steam app branches. Default branch is "".
+# Example: "-beta beta"
+branch=""
+
 # Server Details
 servicename="em-server"
 gamename="Empires Mod"
@@ -72,14 +78,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/empires"
 executabledir="${filesdir}"
 executable="./srcds_run"
 servercfg="${servicename}.cfg"
+servercfgdefault="server.cfg"
 servercfgdir="${systemdir}/cfg"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/server.cfg"
 backupdir="${rootdir}/backups"
 
 # Logging

BIN=BIN
FistfulOfFrags/dependencies/libm.so.6


+ 9 - 2
FistfulOfFrags/fofserver

@@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="210516"
+version="160916"
 
 #### Variables ####
 
@@ -19,6 +19,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -55,6 +56,11 @@ githubbranch="master"
 # Steam
 appid="295230"
 
+# Steam App Branch Select
+# Allows to opt into the various Steam app branches. Default branch is "".
+# Example: "-beta beta"
+branch=""
+
 # Server Details
 servicename="fof-server"
 gamename="Fistful of Frags"
@@ -67,14 +73,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/fof"
 executabledir="${filesdir}"
 executable="./srcds_run"
 servercfg="${servicename}.cfg"
+servercfgdefault="server.cfg"
 servercfgdir="${systemdir}/cfg"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.cfg"
 backupdir="${rootdir}/backups"
 
 # Logging

BIN=BIN
GarrysMod/dependencies/libc.so.6


BIN=BIN
GarrysMod/dependencies/libm.so.6


BIN=BIN
GarrysMod/dependencies/libpthread.so.0


BIN=BIN
GarrysMod/dependencies/libstdc++.so.6


+ 9 - 2
GarrysMod/gmodserver

@@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="210516"
+version="160916"
 
 #### Variables ####
 
@@ -19,6 +19,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -76,6 +77,11 @@ githubbranch="master"
 # Steam
 appid="4020"
 
+# Steam App Branch Select
+# Allows to opt into the various Steam app branches. Default branch is "".
+# Example: "-beta dev"
+branch=""
+
 # Server Details
 servicename="gmod-server"
 gamename="Garry's Mod"
@@ -88,15 +94,16 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/garrysmod"
 addonsdir="${systemdir}/addons"
 executabledir="${filesdir}"
 executable="./srcds_run"
 servercfg="${servicename}.cfg"
+servercfgdefault="server.cfg"
 servercfgdir="${systemdir}/cfg"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.cfg"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 3 - 1
GoldenEyeSource/gesserver

@@ -19,6 +19,7 @@ version="300816"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -67,14 +68,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/gesource"
 executabledir="${filesdir}"
 executable="./srcds_run"
 servercfg="${servicename}.cfg"
+servercfgdefault="server.cfg"
 servercfgdir="${systemdir}/cfg"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.cfg"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 3 - 1
HalfLife2Deathmatch/hl2dmserver

@@ -19,6 +19,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -67,14 +68,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/hl2mp"
 executabledir="${filesdir}"
 executable="./srcds_run"
 servercfg="${servicename}.cfg"
+servercfgdefault="server.cfg"
 servercfgdir="${systemdir}/cfg"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.cfg"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 3 - 1
HalfLifeDeathmatch/hldmserver

@@ -19,6 +19,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -66,14 +67,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/valve"
 executabledir="${filesdir}"
 executable="./hlds_run"
 servercfg="${servicename}.cfg"
+servercfgdefault="server.cfg"
 servercfgdir="${systemdir}"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.cfg"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 3 - 1
HalfLifeDeathmatchSource/hldmsserver

@@ -19,6 +19,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -67,14 +68,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/hl1mp"
 executabledir="${filesdir}"
 executable="./srcds_run"
 servercfg="${servicename}.cfg"
+servercfgdefault="server.cfg"
 servercfgdir="${systemdir}/cfg"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.cfg"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 8 - 1
Hurtworld/hwserver

@@ -10,7 +10,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="210516"
+version="160916"
 
 #### Variables ####
 
@@ -20,6 +20,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -69,6 +70,11 @@ githubbranch="master"
 # Steam
 appid="405100"
 
+# Steam App Branch Select
+# Allows to opt into the various Steam app branches. Default branch is "".
+# Example: "-beta devtest"
+branch=""
+
 # Server Details
 servicename="hurtworld-server"
 gamename="Hurtworld"
@@ -81,6 +87,7 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}"
 executabledir="${filesdir}"

+ 10 - 3
Insurgency/insserver

@@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="210516"
+version="161001"
 
 #### Variables ####
 
@@ -19,6 +19,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -42,7 +43,7 @@ workshop="0"
 
 # https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server
 fn_parms(){
-parms="-game insurgency -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} -tickrate ${tickrate} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers} +sv_workshop_enabled ${workshop}"
+parms="-game insurgency -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} -tickrate ${tickrate} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers} +sv_workshop_enabled ${workshop} -norestart"
 }
 
 #### Advanced Variables ####
@@ -57,6 +58,11 @@ githubbranch="master"
 # Steam
 appid="237410"
 
+# Steam App Branch Select
+# Allows to opt into the various Steam app branches. Default branch is "".
+# Example: "-beta beta"
+branch=""
+
 # Server Details
 servicename="ins-server"
 gamename="Insurgency"
@@ -69,14 +75,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/insurgency"
 executabledir="${filesdir}"
 executable="./srcds_run"
 servercfg="${servicename}.cfg"
+servercfgdefault="server.cfg"
 servercfgdir="${systemdir}/cfg"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.cfg"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 1 - 0
JustCause2/cfg/config.lua

@@ -177,3 +177,4 @@ World =
     -- The default weather severity at world creation.
     -- Default value: 0
     WeatherSeverity             = 0
+}

+ 9 - 3
JustCause2/jc2server

@@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="210516"
+version="160916"
 
 #### Variables ####
 
@@ -19,6 +19,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -30,7 +31,6 @@ steamuser="anonymous"
 steampass=""
 
 # Start Variables
-ip="0.0.0.0"
 updateonstart="off"
 
 fn_parms(){
@@ -49,6 +49,11 @@ githubbranch="master"
 # Steam
 appid="261140"
 
+# Steam App Branch Select
+# Allows to opt into the various Steam app branches. Default branch is "".
+# Example: "-beta publicbeta"
+branch=""
+
 # Server Details
 servicename="jc2-server"
 gamename="Just Cause 2"
@@ -61,14 +66,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}"
 executabledir="${filesdir}"
 executable="./Jcmp-Server"
 servercfg="config.lua"
+servercfgdefault="config.lua"
 servercfgdir="${filesdir}"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/default_config.lua"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 9 - 2
KillingFloor/kfserver

@@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="210516"
+version="160916"
 
 #### Variables ####
 
@@ -19,6 +19,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -54,6 +55,11 @@ githubbranch="master"
 # Steam
 appid="215360"
 
+# Steam App Branch Select
+# Allows to opt into the various Steam app branches. Default branch is "".
+# Example: "-beta beta"
+branch=""
+
 # Server Details
 servicename="kf-server"
 gamename="Killing Floor"
@@ -66,14 +72,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/System"
 executabledir="${systemdir}"
 executable="./ucc-bin"
 servercfg="${servicename}.ini"
+servercfgdefault="Default.ini"
 servercfgdir="${systemdir}"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/Default.ini"
 compressedmapsdir="${rootdir}/Maps-Compressed"
 backupdir="${rootdir}/backups"
 

+ 1 - 1
LICENSE

@@ -1,6 +1,6 @@
 The MIT License (MIT)
 
-Copyright (c) 2015 Daniel Gibbs
+Copyright (c) 2016 Daniel Gibbs
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal

+ 9 - 2
Left4Dead/l4dserver

@@ -10,7 +10,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="210516"
+version="160916"
 
 #### Variables ####
 
@@ -20,6 +20,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -55,6 +56,11 @@ githubbranch="master"
 # Steam
 appid="222840"
 
+# Steam App Branch Select
+# Allows to opt into the various Steam app branches. Default branch is "".
+# Example: "-beta beta"
+branch=""
+
 # Server Details
 servicename="l4d-server"
 gamename="Left 4 Dead"
@@ -67,14 +73,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/left4dead"
 executabledir="${filesdir}"
 executable="./srcds_run"
 servercfg="${servicename}.cfg"
+servercfgdefault="server.cfg"
 servercfgdir="${systemdir}/cfg"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.cfg"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 9 - 2
Left4Dead2/l4d2server

@@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="210516"
+version="160916"
 
 #### Variables ####
 
@@ -19,6 +19,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -54,6 +55,11 @@ githubbranch="master"
 # Steam
 appid="222860"
 
+# Steam App Branch Select
+# Allows to opt into the various Steam app branches. Default branch is "".
+# Example: "-beta beta"
+branch=""
+
 # Server Details
 servicename="l4d2-server"
 gamename="Left 4 Dead 2"
@@ -66,14 +72,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/left4dead2"
 executabledir="${filesdir}"
 executable="./srcds_run"
 servercfg="${servicename}.cfg"
+servercfgdefault="server.cfg"
 servercfgdir="${systemdir}/cfg"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.cfg"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 2 - 0
Minecraft/mcserver

@@ -19,6 +19,7 @@ version="210816"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -58,6 +59,7 @@ systemdir="${filesdir}"
 executabledir="${filesdir}"
 executable="java -Xmx${javaram}M -jar minecraft_server.jar"
 servercfg="server.properties"
+servercfgdefault="server.properties"
 servercfgdir="${filesdir}"
 servercfgfullpath="${servercfgdir}/${servercfg}"
 servercfgdefault="${servercfgdir}/lgsm-default.ini"

+ 3 - 1
Mumble/mumbleserver

@@ -20,6 +20,7 @@ version="290716"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -42,7 +43,6 @@ githubuser="GameServerManagers"
 githubrepo="LinuxGSM"
 githubbranch="master"
 
-
 # Server Details
 gamename="Mumble"
 servicename="mumble-server"
@@ -54,11 +54,13 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}"
 executabledir="${filesdir}"
 executable="./murmur.x86"
 servercfg="murmur.ini"
+servercfgdefault="murmur.ini"
 servercfgdir="${filesdir}"
 servercfgfullpath="${servercfgdir}/${servercfg}"
 backupdir="${rootdir}/backups"

BIN=BIN
NS2Combat/dependencies/libc.so.6


BIN=BIN
NS2Combat/dependencies/libm.so.6


BIN=BIN
NS2Combat/dependencies/libstdc++.so.6


+ 8 - 1
NS2Combat/ns2cserver

@@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="220416"
+version="160916"
 
 #### Variables ####
 
@@ -19,6 +19,7 @@ version="220416"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -62,6 +63,11 @@ githubbranch="master"
 # Steam
 appid="313900"
 
+# Steam App Branch Select
+# Allows to opt into the various Steam app branches. Default branch is "".
+# Example: "-beta beta"
+branch=""
+
 # Server Details
 servicename="ns2c-server"
 gamename="NS2: Combat"
@@ -74,6 +80,7 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}"
 executabledir="${filesdir}/ia32"

BIN=BIN
NaturalSelection2/dependencies/libc.so.6


BIN=BIN
NaturalSelection2/dependencies/libm.so.6


BIN=BIN
NaturalSelection2/dependencies/libstdc++.so.6


+ 4 - 2
NaturalSelection2/ns2server

@@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="220416"
+version="210916"
 
 #### Variables ####
 
@@ -19,6 +19,7 @@ version="220416"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -47,7 +48,7 @@ password=""
 
 # http://wiki.unknownworlds.com/ns2/Dedicated_Server
 fn_parms(){
-parms="-name \"${servername}\" -port ${port} -webadmin -webdomain ${ip} -webuser ${webadminuser} -webpassword \"${webadminpass}\" -webport ${webadminport} -map ${defaultmap} -limit ${maxplayers} -config_path \"${servercfgdir}\" -modstorage \"${modstoragedir}\" -mods \"${mods}\""
+parms="-name \"${servername}\" -port ${port} -webadmin -webdomain ${ip} -webuser ${webadminuser} -webpassword \"${webadminpass}\" -webport ${webadminport} -map ${defaultmap} -limit ${maxplayers} -config_path \"${servercfgdir}\" -logdir \"${gamelogdir}\" -modstorage \"${modstoragedir}\" -mods \"${mods}\""
 }
 
 #### Advanced Variables ####
@@ -79,6 +80,7 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}"
 executabledir="${filesdir}"

BIN=BIN
NoMoreRoomInHell/dependencies/libm.so.6


+ 9 - 2
NoMoreRoomInHell/nmrihserver

@@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="130716"
+version="160916"
 
 #### Variables ####
 
@@ -19,6 +19,7 @@ version="130716"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -60,6 +61,11 @@ githubbranch="master"
 # Steam
 appid="317670"
 
+# Steam App Branch Select
+# Allows to opt into the various Steam app branches. Default branch is "".
+# Example: "-beta beta"
+branch=""
+
 # Server Details
 servicename="nmrih-server"
 gamename="No More Room in Hell"
@@ -72,14 +78,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/nmrih"
 executabledir="${filesdir}"
 executable="./srcds_run"
 servercfg="${servicename}.cfg"
+servercfgdefault="server.cfg"
 servercfgdir="${systemdir}/cfg"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.cfg"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 3 - 1
OpposingForce/opforserver

@@ -19,6 +19,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -67,14 +68,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/gearbox"
 executabledir="${filesdir}"
 executable="./hlds_run"
 servercfg="${servicename}.cfg"
+servercfgdefault="server.cfg"
 servercfgdir="${systemdir}"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-defaultcfg="${servercfgdir}/server.cfg"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 9 - 2
PiratesVikingandKnightsII/pvkiiserver

@@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="210516"
+version="160916"
 
 #### Variables ####
 
@@ -19,6 +19,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -55,6 +56,11 @@ githubbranch="master"
 # Steam
 appid="17575"
 
+# Steam App Branch Select
+# Allows to opt into the various Steam app branches. Default branch is "".
+# Example: "-beta beta"
+branch=""
+
 # Server Details
 servicename="pvkii-server"
 gamename="Pirates, Vikings, and Knights II"
@@ -67,14 +73,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/pvkii"
 executabledir="${filesdir}"
 executable="./srcds_run"
 servercfg="${servicename}.cfg"
+servercfgdefault="server.cfg"
 servercfgdir="${systemdir}/cfg"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.cfg"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 9 - 5
ProjectZomboid/pzserver

@@ -10,7 +10,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="290716"
+version="160916"
 
 #### Variables ####
 
@@ -20,6 +20,7 @@ version="290716"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -50,8 +51,10 @@ githubbranch="master"
 
 # Steam
 appid="380870"
-# Allows for opting into the various Steam branches that PZ has to offer
-# Example: -beta iwillbackupmysave -betapassword iaccepttheconsequences
+
+# Steam App Branch Select
+# Allows to opt into the various Steam app branches. Default branch is "".
+# Example: "-beta iwillbackupmysave -betapassword iaccepttheconsequences"
 branch=""
 
 # Server Details
@@ -66,14 +69,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}"
 executabledir="${filesdir}"
 executable="./start-server.sh"
-servercfg="servertest.ini"
+servercfg="server.ini"
+servercfgdefault="server.cfg"
 servercfgdir="${HOME}/Zomboid/Server"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.ini"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 11 - 4
QuakeLive/qlserver

@@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="060516"
+version="160916"
 
 #### Variables ####
 
@@ -19,6 +19,7 @@ version="060516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -43,7 +44,7 @@ updateonstart="off"
 # Install/Config Guide : https://steamcommunity.com/sharedfiles/filedetails/?id=542966946
 # Console Commands : http://www.regurge.at/ql/
 fn_parms(){
-	parms="+set net_strict 1 +set net_ip ${ip} +set net_port ${port} +set fs_homepath ${filesdir}/${port} +set zmq_rcon_enable 1 +set zmq_rcon_port ${rconport} +set zmq_rcon_password ${rconpassword} +set zmq_stats_enable 1 +set zmq_stats_password ${statspassword} +set zmq_stats_port ${statsport} +set sv_mapPoolFile ${mappool} +exec ${servercfg}"
+parms="+set net_strict 1 +set net_ip ${ip} +set net_port ${port} +set fs_homepath ${filesdir}/${port} +set zmq_rcon_enable 1 +set zmq_rcon_port ${rconport} +set zmq_rcon_password ${rconpassword} +set zmq_stats_enable 1 +set zmq_stats_password ${statspassword} +set zmq_stats_port ${statsport} +set sv_mapPoolFile ${mappool} +exec ${servercfg}"
 }
 
 #### Advanced Variables ####
@@ -58,10 +59,15 @@ githubbranch="master"
 # Steam
 appid="349090"
 
+# Steam App Branch Select
+# Allows to opt into the various Steam app branches. Default branch is "".
+# Example: "-beta beta"
+branch=""
+
 # Server Details
 servicename="ql-server"
 gamename="Quake Live"
-engine="idtech3"
+engine="idtech3_ql"
 
 # Directories
 rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))"
@@ -70,14 +76,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}"
 executabledir="${filesdir}"
 executable=$([ "${arch}" == 'x64' ] && echo "./run_server_x64.sh" || echo "./run_server_x86.sh")
 servercfg="${servicename}.cfg"
+servercfgdefault="server.cfg"
 servercfgdir="${filesdir}/baseq3"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.cfg"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 3 - 1
RedOrchestra/roserver

@@ -19,6 +19,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -62,14 +63,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/system"
 executabledir="${systemdir}"
 executable="./ucc-bin"
 servercfg="${servicename}.ini"
+servercfgdefault="default.ini"
 servercfgdir="${systemdir}"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/default.ini"
 compressedmapsdir="${rootdir}/Maps-Compressed"
 backupdir="${rootdir}/backups"
 

+ 3 - 1
Ricochet/ricochetserver

@@ -19,6 +19,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -67,14 +68,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/ricochet"
 executabledir="${filesdir}"
 executable="./hlds_run"
 servercfg="${servicename}.cfg"
+servercfgdefault="server.cfg"
 servercfgdir="${systemdir}"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.cfg"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 9 - 2
Rust/rustserver

@@ -10,7 +10,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="210516"
+version="160916"
 
 #### Variables ####
 
@@ -20,6 +20,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -72,6 +73,11 @@ githubbranch="master"
 # Steam
 appid="258550"
 
+# Steam App Branch Select
+# Allows to opt into the various Steam app branches. Default branch is "".
+# Example: "-beta prerelease"
+branch=""
+
 # Server Details
 servicename="rust-server"
 gamename="Rust"
@@ -84,15 +90,16 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}"
 executabledir="${filesdir}"
 executable="./RustDedicated"
 serveridentitydir="${systemdir}/server/${servicename}"
 servercfg="server.cfg"
+servercfgdefault="server.cfg"
 servercfgdir="${serveridentitydir}/cfg"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.cfg"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 9 - 2
SeriousSam3BFE/ss3sserver

@@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="210516"
+version="160916"
 
 #### Variables ####
 
@@ -19,6 +19,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -50,6 +51,11 @@ githubbranch="master"
 # Steam
 appid="41080"
 
+# Steam App Branch Select
+# Allows to opt into the various Steam app branches. Default branch is "".
+# Example: "-beta publicbeta"
+branch=""
+
 # Server Details
 servicename="ss3-server"
 gamename="Serious Sam 3: BFE"
@@ -62,14 +68,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/Bin"
 executable="./runSam3_DedicatedServer.sh"
 executabledir="${systemdir}"
 servercfg="${servicename}.ini"
+servercfgdefault="server.ini"
 servercfgdir="${filesdir}/Content/SeriousSam3/Config"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.ini"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 9 - 2
Starbound/sbserver

@@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="230716"
+version="160916"
 
 #### Variables ####
 
@@ -19,6 +19,7 @@ version="230716"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -49,6 +50,11 @@ githubbranch="master"
 # Steam
 appid="211820"
 
+# Steam App Branch Select
+# Allows to opt into the various Steam app branches. Default branch is "".
+# Example: "-beta beta"
+branch=""
+
 # Server Details
 servicename="sb-server"
 gamename="Starbound"
@@ -61,14 +67,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}"
 executabledir="${filesdir}/linux"
 executable="./starbound_server"
 servercfg="starbound_server.config"
+servercfgdefault="starbound_server.config"
 servercfgdir="${filesdir}/storage"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.config"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 9 - 2
SvenCoop/svencoopserver → SvenCoop/svenserver

@@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="210516"
+version="160916"
 
 #### Variables ####
 
@@ -19,6 +19,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -54,6 +55,11 @@ githubbranch="master"
 # Steam
 appid="276060"
 
+# Steam App Branch Select
+# Allows to opt into the various Steam app branches. Default branch is "".
+# Example: "-beta release_candidate_public"
+branch=""
+
 # Server Details
 servicename="svencoop-server"
 gamename="Sven Co-op"
@@ -66,14 +72,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/svencoop"
 executabledir="${filesdir}"
 executable="./svends_run"
 servercfg="${servicename}.cfg"
+servercfgdefault="server.cfg"
 servercfgdir="${systemdir}"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.cfg"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 9 - 2
TeamFortress2/tf2server

@@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="210516"
+version="160916"
 
 #### Variables ####
 
@@ -19,6 +19,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -60,6 +61,11 @@ githubbranch="master"
 # Steam
 appid="232250"
 
+# Steam App Branch Select
+# Allows to opt into the various Steam app branches. Default branch is "".
+# Example: "-beta beta"
+branch=""
+
 # Server Details
 servicename="tf2-server"
 gamename="Team Fortress 2"
@@ -72,14 +78,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/tf"
 executabledir="${filesdir}"
 executable="./srcds_run"
 servercfg="${servicename}.cfg"
+servercfgdefault="server.cfg"
 servercfgdir="${systemdir}/cfg"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.cfg"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 3 - 1
TeamFortressClassic/tfcserver

@@ -19,6 +19,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -67,14 +68,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/tfc"
 executabledir="${filesdir}"
 executable="./hlds_run"
 servercfg="${servicename}.cfg"
+servercfgdefault="server.cfg"
 servercfgdir="${systemdir}"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.cfg"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 3 - 1
TeamSpeak3/ts3server

@@ -19,6 +19,7 @@ version="290716"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -40,14 +41,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}"
 executabledir="${filesdir}"
 executable="./ts3server_startscript.sh"
 servercfg="${servicename}.ini"
+servercfgdefault="ts3server.ini"
 servercfgdir="${filesdir}"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.ini"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 3 - 1
Teeworlds/twserver

@@ -20,6 +20,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -62,14 +63,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}"
 executabledir="${filesdir}"
 executable="./teeworlds_srv"
 servercfg="${servicename}.cfg" # Teeworlds can also auto load any config if an autoexec.cfg file is present in the server dir
+servercfgdefault="server.cfg"
 servercfgdir="${filesdir}"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.cfg"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 3 - 1
Terraria/terrariaserver

@@ -20,6 +20,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -62,14 +63,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}"
 executabledir="${filesdir}"
 executable="./TerrariaServer"
 servercfg="${servicename}.txt"
+servercfgdefault="serverconfig.txt"
 servercfgdir="${filesdir}"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.txt"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 2 - 0
UnrealTournament/utserver

@@ -19,6 +19,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -59,6 +60,7 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/LinuxServer"
 executabledir="${systemdir}/Engine/Binaries/Linux"

+ 3 - 1
UnrealTournament2004/ut2k4server

@@ -19,6 +19,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -45,14 +46,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/System"
 executabledir="${systemdir}"
 executable="./ucc-bin"
 servercfg="${servicename}.ini"
+servercfgdefault="UT2004.ini"
 servercfgdir="${systemdir}"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/UT2004.ini"
 compressedmapsdir="${rootdir}/Maps-Compressed"
 backupdir="${rootdir}/backups"
 

+ 13 - 9
UnrealTournament3/ut3server

@@ -19,6 +19,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -45,6 +46,15 @@ fn_parms(){
 parms="server ${defaultmap}?Game=${game}?bIsDedicated=${isdedicated}?bIsLanMatch=${islanmatch}?bUsesStats=${usesstats}?bShouldAdvertise=${shouldadvertise}?PureServer=${pureserver}?bAllowJoinInProgress=${allowjoininprogress}?MaxPlayers=${maxplayers}?Mutator=${mutators} -port=${port} -queryport=${queryport} -multihome=${ip} -nohomedir -unattended -log=${gamelog}"
 }
 
+#### Advanced Variables ####
+
+# Github Branch Select
+# Allows for the use of different function files
+# from a different repo and/or branch.
+githubuser="GameServerManagers"
+githubrepo="LinuxGSM"
+githubbranch="master"
+
 # Server Details
 servicename="ut3-server"
 gamename="Unreal Tournament 3"
@@ -57,11 +67,13 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}"
 executabledir="${systemdir}/Binaries"
 executable="./ut3"
-servercfg="UTGame.ini"
+servercfg="${servicename}.ini"
+servercfgdefault="UTGame.ini"
 servercfgdir="${systemdir}/UTGame/Config"
 servercfgfullpath="${servercfgdir}/${servercfg}"
 backupdir="${rootdir}/backups"
@@ -82,13 +94,6 @@ gamelogdate="${gamelogdir}/${servicename}-game-$(date '+%d-%m-%Y-%H-%M-%S').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"
 
-# Github Branch Select
-# Allows for the use of different function files
-# from a different repo and/or branch.
-githubuser="GameServerManagers"
-githubrepo="LinuxGSM"
-githubbranch="master"
-
 ##### Script #####
 # Do not edit
 
@@ -152,4 +157,3 @@ core_functions.sh
 
 getopt=$1
 core_getopt.sh
-

+ 3 - 1
UnrealTournament99/ut99server

@@ -19,6 +19,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -54,14 +55,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/System"
 executabledir="${systemdir}"
 executable="./ucc-bin"
 servercfg="${servicename}.ini"
+servercfgdefault="Default.ini"
 servercfgdir="${systemdir}"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/Default.ini"
 compressedmapsdir="${rootdir}/Maps-Compressed"
 backupdir="${rootdir}/backups"
 

+ 5 - 3
WolfensteinEnemyTerritory/wetserver

@@ -19,6 +19,7 @@ version="210516"
 # Email
 emailalert="off"
 email="email@example.com"
+#emailfrom="email@example.com"
 
 # Pushbullet
 # https://www.pushbullet.com/#settings
@@ -28,7 +29,7 @@ pushbullettoken="accesstoken"
 # Start Variables
 
 fn_parms(){
-	parms="+set net_strict 1 +set fs_homepath ${filesdir} +exec ${servercfgfullpath}"
+	parms="+set net_strict 1 +set fs_homepath ${filesdir} +exec ${servercfg}"
 }
 
 #### Advanced Variables ####
@@ -42,7 +43,7 @@ githubbranch="master"
 
 # Server Details
 servicename="et-server"
-gamename="Enemy Territory"
+gamename="Wolfenstein: Enemy Territory"
 engine="idtech3"
 
 # Directories
@@ -52,14 +53,15 @@ lockselfname=".${servicename}.lock"
 lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}"
 executabledir="${systemdir}"
 executable="./etded"
 servercfg="${servicename}.cfg"
+servercfgdefault="server.cfg"
 servercfgdir="${systemdir}/etmain"
 servercfgfullpath="${servercfgdir}/${servercfg}"
-servercfgdefault="${servercfgdir}/lgsm-default.cfg"
 backupdir="${rootdir}/backups"
 
 # Logging

+ 5 - 1
lgsm/functions/alert_email.sh

@@ -230,7 +230,11 @@ fn_details_performance
 fn_details_disk
 fn_details_gameserver
 fn_alert_email_template_logs
-mail -s "${alertsubject}" "${email}" < "${emaillog}"
+if [ -n "${emailfrom}" ]; then
+	mail -s "${alertsubject}" -a "From: ${emailfrom}" "${email}" < "${emaillog}"
+else
+	mail -s "${alertsubject}" "${email}" < "${emaillog}"
+fi
 exitcode=$?
 if [ "${exitcode}" == "0" ]; then
 	fn_print_ok_nl "Sending alert: ${email}"

+ 1 - 1
lgsm/functions/alert_pushbullet.sh

@@ -11,7 +11,7 @@ local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 fn_print_dots "Sending Pushbullet alert"
 sleep 1
 
-pushbulletsend=$(curl --silent -u """${pushbullettoken}"":" -d type="note" -d body="${alertbody}" -d title="${alertsubject}" 'https://api.pushbullet.com/v2/pushes'|grep -o invalid_access_token|uniq)
+pushbulletsend=$(curl --silent -u """${pushbullettoken}"":" -d channel_tag="${channeltag}" -d type="note" -d body="${alertbody}" -d title="${alertsubject}" 'https://api.pushbullet.com/v2/pushes'|grep -o invalid_access_token|uniq)
 
 if [ "${pushbulletsend}" == "invalid_access_token" ]; then
 	fn_print_fail_nl "Sending Pushbullet alert: invalid_access_token"

+ 1 - 1
lgsm/functions/check.sh

@@ -25,7 +25,7 @@ do
 	fi
 done
 
-local allowed_commands_array=( command_backup.sh command_console.sh command_debug.sh command_details.sh command_unreal2_maps.sh command_ut99_maps.sh command_monitor.sh command_start.sh command_stop.sh update_check.sh command_validate.sh command_update_functions.sh command_email_test.sh )
+local allowed_commands_array=( command_backup.sh command_console.sh command_debug.sh command_details.sh command_unreal2_maps.sh command_ut99_maps.sh command_monitor.sh command_start.sh command_stop.sh command_update.sh command_validate.sh command_update_functions.sh command_email_test.sh )
 for allowed_command in "${allowed_commands_array[@]}"
 do
 	if [ "${allowed_command}" == "${function_selfname}" ]; then

+ 32 - 13
lgsm/functions/check_deps.sh

@@ -6,28 +6,37 @@
 
 local commandname="CHECK"
 
+
+
 fn_deps_detector(){
 	# Checks if dependency is missing
-	if [ -n "$(command -v dpkg-query)" ]; then
+	if [ "${tmuxcheck}" == "1" ]; then
+		# Added for users compiling tmux from source to bypass check.
+		depstatus=0
+		deptocheck="tmux"
+		unset tmuxcheck
+	elif [ "${javacheck}" == "1" ]; then
+		# Added for users using Oracle JRE to bypass check.
+		depstatus=0
+		deptocheck="${javaversion}"
+		unset javacheck
+	elif [ -n "$(command -v apt-get)" ]; then
 		dpkg-query -W -f='${Status}' ${deptocheck} 2>/dev/null | grep -q -P '^install ok installed$'
 		depstatus=$?
 	elif [ -n "$(command -v yum)" ]; then
 		yum -q list installed ${deptocheck} > /dev/null 2>&1
 		depstatus=$?
 	fi
+
 	if [ "${depstatus}" == "0" ]; then
+		# if dependency is found
 		missingdep=0
 		if [ "${function_selfname}" == "command_install.sh" ]; then
-			if [ "${tmuxcheck}" == "1" ]; then
-				# Added for users compiling tmux from source to bypass rpm check
-				echo -e "${green}tmux${default}"
-				unset tmuxcheck
-			fi
 			echo -e "${green}${deptocheck}${default}"
 			sleep 0.5
 		fi
 	else
-		# if missing dependency is found
+		# if dependency is not found
 		missingdep=1
 		if [ "${function_selfname}" == "command_install.sh" ]; then
 			echo -e "${red}${deptocheck}${default}"
@@ -141,9 +150,9 @@ if [ -n "$(command -v dpkg-query)" ]; then
 	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 [ "${gamename}" != "TeamSpeak 3" ]; then
 		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
+			tmuxcheck=1 # Added for users compiling tmux from source to bypass check.
 		else
 			array_deps_required+=( tmux )
 		fi
@@ -181,7 +190,12 @@ if [ -n "$(command -v dpkg-query)" ]; then
 		array_deps_required+=( libncurses5:i386 )
 	# Project Zomboid and Minecraft
 	elif [ "${engine}" ==  "projectzomboid" ]||[ "${engine}" == "lwjgl2" ]; then
-		array_deps_required+=( default-jdk )
+		javaversion=$(java -version 2>&1 | grep "version")
+		if [ -n "${javaversion}" ]; then
+			javacheck=1 # Added for users using Oracle JRE to bypass the check.
+		else
+			array_deps_required+=( default-jre )
+		fi
 	# GoldenEye: Source
 	elif [ "${gamename}" ==  "GoldenEye: Source" ]; then
 		array_deps_required+=( zlib1g:i386 )
@@ -213,9 +227,9 @@ elif [ -n "$(command -v yum)" ]; then
 	fi
 
 	# All servers except ts3 require tmux
-	if [ "${executable}" != "./ts3server_startscript.sh" ]; then
+	if [ "${gamename}" != "TeamSpeak 3" ]; then
 		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
+			tmuxcheck=1 # Added for users compiling tmux from source to bypass check.
 		else
 			array_deps_required+=( tmux )
 		fi
@@ -242,7 +256,12 @@ elif [ -n "$(command -v yum)" ]; then
 		array_deps_required+=( libcurl.i686 )
 	# Project Zomboid and Minecraft
 	elif [ "${engine}" ==  "projectzomboid" ]||[ "${engine}" == "lwjgl2" ]; then
-		array_deps_required+=( java-1.8.0-openjdk )
+		javaversion=$(java -version 2>&1 | grep "version")
+		if [ -n "${javaversion}" ]; then
+			javacheck=1 # Added for users using Oracle JRE to bypass the check.
+		else
+			array_deps_required+=( java-1.8.0-openjdk )
+		fi
 	# GoldenEye: Source
 	elif [ "${gamename}" ==  "GoldenEye: Source" ]; then
 		array_deps_required+=( zlib.i686 )

+ 9 - 3
lgsm/functions/check_ip.sh

@@ -16,7 +16,7 @@ if [ "${gamename}" != "TeamSpeak 3" ] && [ "${gamename}" != "Mumble" ]; then
 	fi
 	getip=$(${ipcommand} -o -4 addr|awk '{print $4}'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -v 127.0.0)
 	getipwc=$(${ipcommand} -o -4 addr|awk '{print $4}'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -vc 127.0.0)
-
+	info_config.sh
 	if [ "${ip}" == "0.0.0.0" ]||[ "${ip}" == "" ]; then
 		if [ "${getipwc}" -ge "2" ]; then
 			fn_print_dots "Check IP"
@@ -24,8 +24,14 @@ if [ "${gamename}" != "TeamSpeak 3" ] && [ "${gamename}" != "Mumble" ]; then
 			fn_print_fail "Check IP: Multiple active network interfaces found."
 			sleep 1
 			echo -en "\n"
-			fn_print_information "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"
+			if [ "${ipsetinconfig}" == "1" ]; then
+				fn_print_information "Specify the IP you want to use within the server config file ${servercfg}.\n"
+				echo -en "${servercfgfullpath}\n"
+				echo -en "Set ${ipinconfigvar} to one of the following:\n"
+			else
+				fn_print_information "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"
+			fi
 			echo -en "${getip}\n"
 			echo -en ""
 			echo -en "https://gameservermanagers.com/network-interfaces\n"

+ 2 - 2
lgsm/functions/check_permissions.sh

@@ -43,8 +43,8 @@ fn_check_ownership(){
 
 		} | column -s $'\t' -t | tee -a "${scriptlog}"
 		echo ""
-		fn_print_information_nl "For more information, please see https://github.com/GameServerManagers/LinuxGSM/wiki/FAQ#-fail--starting-game-server-permissions-issues-found"
-		fn_script_log "For more information, please see https://github.com/GameServerManagers/LinuxGSM/wiki/FAQ#-fail--starting-game-server-permissions-issues-found"
+		fn_print_information_nl "For more information, please see https://github.com/GameServerManagers/LinuxGSM/wiki/FAQ#-fail--starting-game-server-ownership-issues-found"
+		fn_script_log "For more information, please see https://github.com/GameServerManagers/LinuxGSM/wiki/FAQ#-fail--starting-game-server-ownership-issues-found"
 		core_exit.sh
 	fi
 }

+ 2 - 2
lgsm/functions/check_steamcmd.sh

@@ -10,8 +10,8 @@ fn_install_steamcmd(){
 	if [ ! -d "${steamcmddir}" ]; then
 		mkdir -v "${steamcmddir}"
 	fi
-	fn_fetch_file "http://media.steampowered.com/client/steamcmd_linux.tar.gz" "${lgsmdir}/tmp" "steamcmd_linux.tar.gz"
-	fn_dl_extract "${lgsmdir}/tmp" "steamcmd_linux.tar.gz" "${steamcmddir}"
+	fn_fetch_file "http://media.steampowered.com/client/steamcmd_linux.tar.gz" "${tmpdir}" "steamcmd_linux.tar.gz"
+	fn_dl_extract "${tmpdir}" "steamcmd_linux.tar.gz" "${steamcmddir}"
 	chmod +x "${steamcmddir}/steamcmd.sh"
 }
 

+ 7 - 1
lgsm/functions/command_debug.sh

@@ -22,6 +22,7 @@ fn_lockfile_trap(){
 check.sh
 fix.sh
 info_distro.sh
+info_config.sh
 # NOTE: Check if works with server without parms. Could be intergrated in to info_parms.sh
 fn_parms
 fn_print_header
@@ -94,10 +95,15 @@ trap fn_lockfile_trap INT
 cd "${executabledir}"
 if [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
 	${executable} ${parms} -debug
+elif [ "${engine}" == "realvirtuality" ]; then
+	# Arma3 requires semicolons in the module list, which need to
+	# be escaped for regular (tmux) loading, but need to be
+	# stripped when loading straight from the console.
+	${executable} ${parms//\\;/;}
 else
 	${executable} ${parms}
 fi
 
 # remove trap.
 trap - INT
-core_exit.sh
+core_exit.sh

+ 106 - 64
lgsm/functions/command_details.sh

@@ -290,7 +290,7 @@ fn_details_ports(){
 
 	parmslocation="${red}UNKNOWN${default}"
 	# engines that require editing in the config file
-	local ports_edit_array=( "avalanche" "dontstarve" "idtech3" "lwjgl2" "projectzomboid" "realvirtuality" "seriousengine35" "teeworlds" "terraria" "unreal" "unreal2" "TeamSpeak 3" "Mumble" "7 Days To Die" )
+	local ports_edit_array=( "avalanche" "dontstarve" "idtech3" "lwjgl2" "projectzomboid" "idtech3_ql" "refractor" "realvirtuality" "seriousengine35" "teeworlds" "terraria" "unreal" "unreal2" "unreal3" "TeamSpeak 3" "Mumble" "7 Days To Die" )
 	for port_edit in "${ports_edit_array[@]}"
 	do
 		if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]; then
@@ -374,7 +374,17 @@ fn_details_realvirtuality(){
 	} | column -s $'\t' -t
 }
 
-fn_details_idtech3(){
+fn_details_refractor(){
+	echo -e "netstat -atunp | grep bf1942_lnxd"
+	echo -e ""
+	{
+		echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
+		echo -e "> Game/Query\tINBOUND\t${port}\tudp"
+		echo -e "> Steam: Query\tINBOUND\t${queryport}\tudp"
+	} | column -s $'\t' -t
+}
+
+fn_details_quakelive(){
 	echo -e "netstat -atunp | grep qzeroded"
 	echo -e ""
 	if [ -z "${port}" ]||[ -z "${rconport}" ]||[ -z "${statsport}" ]; then
@@ -389,6 +399,15 @@ fn_details_idtech3(){
 	} | column -s $'\t' -t
 }
 
+fn_details_wolfensteinenemyterritory(){
+	echo -e "netstat -atunp | grep etded"
+	echo -e ""
+	{
+		echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
+		echo -e "> Game/Query\tINBOUND\t${port}\tudp"
+	} | column -s $'\t' -t
+}
+
 
 fn_details_seriousengine35(){
 	echo -e "netstat -atunp | grep Sam3_Dedicate"
@@ -568,6 +587,15 @@ fn_details_unreal(){
 	} | column -s $'\t' -t
 }
 
+fn_details_ut3(){
+	echo -e "netstat -atunp | grep ut3-bin"
+	echo -e ""
+	{
+		echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
+		echo -e "> Game/Query\tINBOUND\t${port}\ttcp/udp"
+	} | column -s $'\t' -t
+}
+
 fn_details_ark(){
 	echo -e "netstat -atunp | grep ShooterGame"
 	echo -e ""
@@ -580,66 +608,80 @@ fn_details_ark(){
 
 
 # Run checks and gathers details to display.
-check.sh
-info_config.sh
-info_distro.sh
-info_glibc.sh
-info_parms.sh
-fn_details_os
-fn_details_performance
-fn_details_disk
-fn_details_gameserver
-fn_details_script
-fn_details_backup
-# Some game servers do not have parms.
-if [ "${gamename}" != "TeamSpeak 3" ]&&[ "${engine}" != "avalanche" ]&&[ "${engine}" != "dontstarve" ]&&[ "${engine}" != "projectzomboid" ]; then
-	fn_parms
-	fn_details_commandlineparms
-fi
-fn_details_ports
-
-# Display details depending on game or engine.
-if [ "${engine}" == "avalanche" ]; then
-	fn_details_avalanche
-elif [ "${engine}" == "dontstarve" ]; then
-	fn_details_dontstarve
-elif [ "${engine}" == "lwjgl2" ]; then
-	fn_details_minecraft
-elif [ "${engine}" == "projectzomboid" ]; then
-	fn_details_projectzomboid
-elif [ "${engine}" == "idtech3" ]; then
-	fn_details_idtech3
-elif [ "${engine}" == "realvirtuality" ]; then
-	fn_details_realvirtuality
-elif [ "${engine}" == "seriousengine35" ]; then
-	fn_details_seriousengine35
-elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
-	fn_details_source
-elif [ "${engine}" == "spark" ]; then
-	fn_details_spark
-elif [ "${engine}" == "starbound" ]; then
-	fn_details_starbound
-elif [ "${engine}" == "teeworlds" ]; then
-	fn_details_teeworlds
-elif [ "${engine}" == "terraria" ]; then
-	fn_details_terraria
-elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then
-	fn_details_unreal
-elif [ "${gamename}" == "ARK: Survivial Evolved" ]; then
-	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
-	fn_details_teamspeak3
-elif [ "${gamename}" == "Mumble" ]; then
-	fn_details_mumble
-elif [ "${gamename}" == "Rust" ]; then
-	fn_details_rust
-else
-	fn_print_error_nl "Unable to detect server engine."
-fi
 
-fn_details_statusbottom
-core_exit.sh
+fn_display_details() {
+	check.sh
+	info_config.sh
+	info_distro.sh
+	info_glibc.sh
+	info_parms.sh
+	fn_details_os
+	fn_details_performance
+	fn_details_disk
+	fn_details_gameserver
+	fn_details_script
+	fn_details_backup
+	# Some game servers do not have parms.
+	if [ "${gamename}" != "TeamSpeak 3" ]&&[ "${engine}" != "avalanche" ]&&[ "${engine}" != "dontstarve" ]&&[ "${engine}" != "projectzomboid" ]; then
+		fn_parms
+		fn_details_commandlineparms
+	fi
+	fn_details_ports
+
+	# Display details depending on game or engine.
+	if [ "${engine}" == "avalanche" ]; then
+		fn_details_avalanche
+	elif [ "${engine}" == "refractor" ]; then
+		fn_details_refractor
+	elif [ "${engine}" == "dontstarve" ]; then
+		fn_details_dontstarve
+	elif [ "${engine}" == "lwjgl2" ]; then
+		fn_details_minecraft
+	elif [ "${engine}" == "projectzomboid" ]; then
+		fn_details_projectzomboid
+	elif [ "${engine}" == "realvirtuality" ]; then
+		fn_details_realvirtuality
+	elif [ "${engine}" == "seriousengine35" ]; then
+		fn_details_seriousengine35
+	elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
+		fn_details_source
+	elif [ "${engine}" == "spark" ]; then
+		fn_details_spark
+	elif [ "${engine}" == "starbound" ]; then
+		fn_details_starbound
+	elif [ "${engine}" == "teeworlds" ]; then
+		fn_details_teeworlds
+	elif [ "${engine}" == "terraria" ]; then
+		fn_details_terraria
+	elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then
+		fn_details_unreal
+	elif [ "${engine}" == "unreal3" ]; then
+		fn_details_ut3
+	elif [ "${gamename}" == "7 Days To Die" ]; then
+		fn_details_sdtd
+	elif [ "${gamename}" == "ARK: Survivial Evolved" ]; then
+		fn_details_ark
+	elif [ "${gamename}" == "Hurtworld" ]; then
+		fn_details_hurtworld
+	elif [ "${gamename}" == "Quake Live" ]; then
+		fn_details_quakelive
+	elif [ "${gamename}" == "TeamSpeak 3" ]; then
+		fn_details_teamspeak3
+	elif [ "${gamename}" == "Mumble" ]; then
+		fn_details_mumble
+	elif [ "${gamename}" == "Rust" ]; then
+		fn_details_rust
+	elif [ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then
+		fn_details_wolfensteinenemyterritory
+	else
+		fn_print_error_nl "Unable to detect server engine."
+	fi
+
+	fn_details_statusbottom
+}
+
+if [ -z "${postdetails}" ] ;
+then
+  fn_display_details
+  core_exit.sh
+fi

+ 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' > "${lgsmdir}/tmp/.depdetect_readelf"
+${readelf} -d ${executable} |grep NEEDED|awk '{ print $5 }'|sed 's/\[//g'|sed 's/\]//g' > "${tmpdir}/.depdetect_readelf"
 
 
-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"
+echo "yum install " > "${tmpdir}/.depdetect_centos_list_uniq"
+echo "apt-get install " > "${tmpdir}/.depdetect_ubuntu_list_uniq"
+echo "apt-get install " > "${tmpdir}/.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" >> "${lgsmdir}/tmp/.depdetect_centos_list"
-		echo "lib32gcc1" >> "${lgsmdir}/tmp/.depdetect_ubuntu_list"
-		echo "lib32gcc1" >> "${lgsmdir}/tmp/.depdetect_debian_list"
+		echo "glibc.i686" >> "${tmpdir}/.depdetect_centos_list"
+		echo "lib32gcc1" >> "${tmpdir}/.depdetect_ubuntu_list"
+		echo "lib32gcc1" >> "${tmpdir}/.depdetect_debian_list"
 
 	elif [ "${lib}" == "libstdc++.so.6" ]; then
-		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"
+		echo "libstdc++.i686" >> "${tmpdir}/.depdetect_centos_list"
+		echo "libstdc++6:i386" >> "${tmpdir}/.depdetect_ubuntu_list"
+		echo "libstdc++6:i386" >> "${tmpdir}/.depdetect_debian_list"
 
 	elif [ "${lib}" == "libstdc++.so.5" ]; then
-		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"
+		echo "compat-libstdc++-33.i686" >> "${tmpdir}/.depdetect_centos_list"
+		echo "libstdc++5:i386" >> "${tmpdir}/.depdetect_ubuntu_list"
+		echo "libstdc++5:i386" >> "${tmpdir}/.depdetect_debian_list"
 
 	elif [ "${lib}" == "libspeex.so.1" ]||[ "${lib}" == "libspeexdsp.so.1" ]; then
-		echo "speex.i686" >> "${lgsmdir}/tmp/.depdetect_centos_list"
-		echo "speex:i386" >> "${lgsmdir}/tmp/.depdetect_ubuntu_list"
-		echo "speex:i386" >> "${lgsmdir}/tmp/.depdetect_debian_list"
+		echo "speex.i686" >> "${tmpdir}/.depdetect_centos_list"
+		echo "speex:i386" >> "${tmpdir}/.depdetect_ubuntu_list"
+		echo "speex:i386" >> "${tmpdir}/.depdetect_debian_list"
 
 	elif [ "${lib}" == "./libSDL-1.2.so.0" ]||[ "${lib}" == "libSDL-1.2.so.0" ]; then
-		echo "SDL.i686" >> "${lgsmdir}/tmp/.depdetect_centos_list"
-		echo "libsdl1.2debian" >> "${lgsmdir}/tmp/.depdetect_ubuntu_list"
-		echo "libsdl1.2debian" >> "${lgsmdir}/tmp/.depdetect_debian_list"
+		echo "SDL.i686" >> "${tmpdir}/.depdetect_centos_list"
+		echo "libsdl1.2debian" >> "${tmpdir}/.depdetect_ubuntu_list"
+		echo "libsdl1.2debian" >> "${tmpdir}/.depdetect_debian_list"
 
 	elif [ "${lib}" == "libtbb.so.2" ]; then
-		echo "tbb.i686" >> "${lgsmdir}/tmp/.depdetect_centos_list"
-		echo "libtbb2" >> "${lgsmdir}/tmp/.depdetect_ubuntu_list"
-		echo "libtbb2" >> "${lgsmdir}/tmp/.depdetect_debian_list"
+		echo "tbb.i686" >> "${tmpdir}/.depdetect_centos_list"
+		echo "libtbb2" >> "${tmpdir}/.depdetect_ubuntu_list"
+		echo "libtbb2" >> "${tmpdir}/.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}" >> "${lgsmdir}/tmp/.depdetect_unknown"
+		echo "${lib}" >> "${tmpdir}/.depdetect_unknown"
 	fi
-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"
+done < "${tmpdir}/.depdetect_readelf"
+sort "${tmpdir}/.depdetect_centos_list" | uniq >> "${tmpdir}/.depdetect_centos_list_uniq"
+sort "${tmpdir}/.depdetect_ubuntu_list" | uniq >> "${tmpdir}/.depdetect_ubuntu_list_uniq"
+sort "${tmpdir}/.depdetect_debian_list" | uniq >> "${tmpdir}/.depdetect_debian_list_uniq"
 if [ "${unknownlib}" == "1" ]; then
-	sort "${lgsmdir}/tmp/.depdetect_unknown" | uniq >> "${lgsmdir}/tmp/.depdetect_unknown_uniq"
+	sort "${tmpdir}/.depdetect_unknown" | uniq >> "${tmpdir}/.depdetect_unknown_uniq"
 fi
 
-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"
+awk -vORS=' ' '{ print $1, $2 }' "${tmpdir}/.depdetect_centos_list_uniq" > "${tmpdir}/.depdetect_centos_line"
+awk -vORS=' ' '{ print $1, $2 }' "${tmpdir}/.depdetect_ubuntu_list_uniq" > "${tmpdir}/.depdetect_ubuntu_line"
+awk -vORS=' ' '{ print $1, $2 }' "${tmpdir}/.depdetect_debian_list_uniq" > "${tmpdir}/.depdetect_debian_line"
 
 echo ""
 echo "Required Dependencies"
@@ -106,46 +106,46 @@ echo "${executable}"
 echo ""
 echo "CentOS"
 echo "================================="
-cat "${lgsmdir}/tmp/.depdetect_centos_line"
+cat "${tmpdir}/.depdetect_centos_line"
 echo ""
 echo ""
 echo "Ubuntu"
 echo "================================="
-cat "${lgsmdir}/tmp/.depdetect_ubuntu_line"
+cat "${tmpdir}/.depdetect_ubuntu_line"
 echo ""
 echo ""
 echo "Debian"
 echo "================================="
-cat "${lgsmdir}/tmp/.depdetect_debian_line"
+cat "${tmpdir}/.depdetect_debian_line"
 echo ""
 if [ "${unknownlib}" == "1" ]; then
 	echo ""
 	echo "Unknown shared Library"
 	echo "================================="
-	cat "${lgsmdir}/tmp/.depdetect_unknown"
+	cat "${tmpdir}/.depdetect_unknown"
 fi
 echo ""
 echo "Required Librarys"
 echo "================================="
-sort "${lgsmdir}/tmp/.depdetect_readelf" |uniq
+sort "${tmpdir}/.depdetect_readelf" |uniq
 echo ""
 echo "ldd"
 echo "================================="
 ldd ${executable}
 echo -en "\n"
-rm -f "${lgsmdir}/tmp/.depdetect_centos_line"
-rm -f "${lgsmdir}/tmp/.depdetect_centos_list"
-rm -f "${lgsmdir}/tmp/.depdetect_centos_list_uniq"
+rm -f "${tmpdir}/.depdetect_centos_line"
+rm -f "${tmpdir}/.depdetect_centos_list"
+rm -f "${tmpdir}/.depdetect_centos_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 "${tmpdir}/.depdetect_debian_line"
+rm -f "${tmpdir}/.depdetect_debian_list"
+rm -f "${tmpdir}/.depdetect_debian_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 "${tmpdir}/.depdetect_ubuntu_line"
+rm -f "${tmpdir}/.depdetect_ubuntu_list"
+rm -f "${tmpdir}/.depdetect_ubuntu_list_uniq"
 
-rm -f "${lgsmdir}/tmp/.depdetect_readelf"
+rm -f "${tmpdir}/.depdetect_readelf"
 
-rm -f "${lgsmdir}/tmp/.depdetect_unknown"
-rm -f "${lgsmdir}/tmp/.depdetect_unknown_uniq"
+rm -f "${tmpdir}/.depdetect_unknown"
+rm -f "${tmpdir}/.depdetect_unknown_uniq"

+ 13 - 4
lgsm/functions/command_dev_detect_glibc.sh

@@ -9,6 +9,12 @@ echo "================================="
 echo "GLIBC Requirements Checker"
 echo "================================="
 
+if [ -z "$(command -v objdump)" ]; then
+	fn_print_failure_nl "objdump is missing"
+	fn_script_log_fatal "objdump is missing"
+	core_exit.sh
+fi
+
 if [ -z "${filesdir}" ]; then
 	dir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))"
 fi
@@ -22,10 +28,13 @@ elif [ -f "${filesdir}" ]; then
 fi
 echo ""
 
+files=$(find ${filesdir} | wc -l)
 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"
+	objdump -T $line 2>/dev/null|grep -oP "GLIBC[^ ]+" >>"${tmpdir}/detect_glibc.tmp"
+	echo -n "$i / $files" $'\r'
+	((i++))
 done
-
-cat "${lgsmdir}/tmp/detect_glibc.tmp"|sort|uniq|sort -r --version-sort
-rm "${lgsmdir}/tmp/detect_glibc.tmp"
+echo ""
+cat "${tmpdir}/detect_glibc.tmp"|sort|uniq|sort -r --version-sort
+#rm "${tmpdir}/detect_glibc.tmp"

+ 53 - 0
lgsm/functions/command_dev_detect_ldd.sh

@@ -0,0 +1,53 @@
+#!/bin/bash
+# command_dev_detect_ldd.sh function
+# Author: Daniel Gibbs
+# Website: https://gameservermanagers.com
+# Description: Automatically detects required deps using ldd.
+# Can check a file or directory recursively.
+
+echo "================================="
+echo "Shared Object dependencies 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 ""
+
+files=$(find ${filesdir} | wc -l)
+find ${filesdir} -type f -print0 |
+while IFS= read -r -d $'\0' line; do
+	#ldd -v $line 2>/dev/null|grep "=>" >>"${tmpdir}/detect_ldd.tmp"
+	if [ -n "$(ldd $line 2>/dev/null |grep -v "not a dynamic executable")" ]; then
+		echo "$line" >> "${tmpdir}/detect_ldd.tmp"
+		ldd $line 2>/dev/null |grep -v "not a dynamic executable" >> "${tmpdir}/detect_ldd.tmp"
+
+		if [ -n "$(ldd $line 2>/dev/null |grep -v "not a dynamic executable"|grep "not found")" ]; then
+			echo "$line" >> "${tmpdir}/detect_ldd_not_found.tmp"
+			ldd $line 2>/dev/null |grep -v "not a dynamic executable"|grep "not found" >> "${tmpdir}/detect_ldd_not_found.tmp"
+		fi
+	fi
+	echo -n "$i / $files" $'\r'
+	((i++))
+done
+echo ""
+echo ""
+echo "All"
+echo "================================="
+cat "${tmpdir}/detect_ldd.tmp"
+
+echo ""
+echo "Not Found"
+echo "================================="
+cat "${tmpdir}/detect_ldd_not_found.tmp"
+
+rm "${tmpdir}/detect_ldd.tmp"
+rm "${tmpdir}/detect_ldd_not_found.tmp"

+ 1 - 0
lgsm/functions/command_fastdl.sh

@@ -160,6 +160,7 @@ fn_gmod_fastdl(){
 	fn_script_log "Copying map files"
 	sleep 0.5
 	find . -name '*.bsp' | cpio --quiet -updm "${fastdldir}"
+	find . -name '*.ain' | cpio --quiet -updm "${fastdldir}"
 	fn_print_ok "Map files copied"
 	sleep 0.5
 	echo -en "\n"

+ 1 - 1
lgsm/functions/command_install.sh

@@ -18,7 +18,7 @@ check_deps.sh
 if [ "${gamename}" == "Unreal Tournament 2004" ]; then
 	install_server_files.sh
 	install_ut2k4_key.sh
-elif [ "${gamename}" == "Quake 3: Team Arena" ]||[ "${gamename}" == "Unreal Tournament 3" ]||[ "${gamename}" == "Battlefield: 1942" ]||[ "${gamename}" == "Enemy Territory" ]||[ "${gamename}" == "Unreal Tournament 99" ]||[ "${gamename}" == "Unreal Tournament" ]||[ "${gamename}" == "TeamSpeak 3" ]||[ "${gamename}" == "Minecraft" ]||[ "${gamename}" == "Mumble" ]; then
+elif [ "${gamename}" == "Battlefield: 1942" ]||[ "${gamename}" == "Minecraft" ]||[ "${gamename}" == "Quake 3: Team Arena" ]||[ "${gamename}" == "Unreal Tournament 99" ]||[ "${gamename}" == "Unreal Tournament 3" ]||[ "${gamename}" == "Unreal Tournament" ]||[ "${gamename}" == "TeamSpeak 3" ]||[ "${gamename}" == "Mumble" ]||[ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then
 	installer=1
 	install_server_files.sh
 elif [ -n "${appid}" ]; then

+ 1 - 1
lgsm/functions/command_monitor.sh

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

+ 146 - 0
lgsm/functions/command_postdetails.sh

@@ -0,0 +1,146 @@
+#!/bin/bash
+# LGSM command_postdetails.sh function
+# Author: CedarLUG
+# Contributor: CedarLUG
+# Website: https://gameservermanagers.com
+# Description: Strips sensitive information out of Details output
+
+local commandname="postdetails"
+local commandaction="Postdetails"
+local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
+
+# postdetails variable affects the output of command_details.sh.  Setting
+# it here silences the output from sourcing command_details.sh.
+postdetails=yes
+
+# Set posttarget to the appropriately-defined post destination.
+
+# The options for posttarget are:
+# The default destination - hastebin
+# posttarget="http://hastebin.com"
+#
+# Secondary destination - pastebin
+# posttarget="http://pastebin.com
+#
+# Third option - leave on the filesystem
+# posttarget=
+#
+# All of these options can be specified/overridden from the top-level
+# invocation, as in:
+#  rustserver@gamerig:~$ posttarget="http://pastebin.com" ./rustserver pd
+# to post to pastebin, or
+#  rustserver@gamerig:~$ posttarget= ./rustserver pd
+# to leave the output on the filesystem.
+posttarget=${posttarget="http://hastebin.com"}
+
+# For pastebin, you can set the expiration period.
+# use 1 week as the default, other options are '24h' for a day, etc.
+# This, too, may be overridden from the command line at the top-level
+postexpire="${postexpire="1W"}"
+
+# This file sources the command_details.sh file to leverage all
+# of the already-defined functions.  To keep the command_details.sh
+# from actually producing output, the main executable statements have
+# been wrapped in the equivalent of an ifdef clause, that looks
+# for the variable "postdetails" to be defined. -CedarLUG
+
+# source all of the functions defined in the details command
+command_details.sh
+
+# redefine as command_details.sh changes them
+local commandname="postdetails"
+local commandaction="Postdetails"
+local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
+
+fn_bad_tmpfile() {
+	echo "There was a problem creating a temporary file ${tmpfile}."
+	core_exit.sh
+}
+
+# Rather than a one-pass sed parser, default to using a temporary directory
+tmpfile="${tmpdir}/postdetails-$(date +"%Y-%d-%m_%H-%M-%S").tmp"
+
+touch "${tmpfile}" || fn_bad_tmpfile
+
+# fn_display_details is found in the command_details.sh file (which
+# was sourced above).  The output is parsed for passwords and other
+# confidential information. -CedarLUG
+
+# The numerous sed lines could certainly be condensed quite a bit,
+# but they are separated out to provide examples for how to add
+# additional criteria in a straight-forward manner.
+# (This was originally a sed one-liner.) -CedarLUG
+
+fn_display_details | sed -e 's/password="[^"]*/password="--stripped--/' |
+									sed -e 's/password "[^"]*/password "--stripped--/' |
+									sed -e 's/password: .*/password: --stripped--/' |
+									sed -e 's/gslt="[^"]*/gslt="--stripped--/' |
+									sed -e 's/gslt "[^"]*/gslt "--stripped--/' |
+									sed -e 's/pushbullettoken="[^"]*/pushbullettoken="--stripped--/' |
+									sed -e 's/pushbullettoken "[^"]*/pushbullettoken "--stripped--/' |
+									sed -e 's/authkey="[^"]*/authkey="--stripped--/' |
+									sed -e 's/authkey "[^"]*/authkey "--stripped--/' |
+									sed -e 's/authkey [A-Za-z0-9]\+/authkey --stripped--/' |
+									sed -e 's/rcts_strAdminPassword="[^"]*/rcts_strAdminPassword="--stripped--/' |
+									sed -e 's/rcts_strAdminPassword "[^"]*/rcts_strAdminPassword "--stripped--/' |
+									sed -e 's/sv_setsteamaccount [A-Za-z0-9]\+/sv_setsteamaccount --stripped--/' |
+									sed -e 's/sv_password="[^"]*/sv_password="--stripped--/' |
+									sed -e 's/sv_password "[^"]*/sv_password "--stripped--/' |
+									sed -e 's/zmq_stats_password="[^"]*/zmq_stats_password="--stripped--/' |
+									sed -e 's/zmq_stats_password "[^"]*/zmq_stats_password "--stripped--/' |
+									sed -e 's/zmq_rcon_password="[^"]*/zmq_rcon_password="--stripped--/' |
+									sed -e 's/zmq_rcon_password "[^"]*/zmq_rcon_password "--stripped--/' |
+									sed -e 's/pass="[^"]*/pass="--stripped--/' |
+									sed -e 's/pass "[^"]*/pass "--stripped--/' |
+									sed -e 's/rconServerPassword="[^"]*/rconServerPassword="--stripped--/' |
+									sed -e 's/rconServerPassword "[^"]*/rconServerPassword "--stripped--/' > "${tmpfile}"
+
+# strip off all console escape codes (colorization)
+sed -i -r "s/[\x1B,\x0B]\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" "${tmpfile}"
+
+# If the gameserver uses anonymous steam credentials, leave them displayed
+# in the output.  Otherwise, strip these out as well.
+if ! grep -q "^steampass[= ]\"\"" "${tmpfile}" ; then
+	sed -i -e 's/steampass[= ]"[^"]*/steampass "--stripped--/' "${tmpfile}"
+fi
+if ! grep -q "^steamuser[= ]\"anonymous\"" "${tmpfile}" ; then
+	sed -i -e 's/steamuser[= ]"[^"]*/steamuser "--stripped--/' "${tmpfile}"
+fi
+
+
+if [ "${posttarget}" == "http://pastebin.com" ] ; then
+	fn_print_dots "Posting details to pastbin.com for ${postexpire}"
+	sleep 1
+	# grab the return from 'value' from an initial visit to pastebin.
+	csrftoken=$(curl -s "${posttarget}" |
+					sed -n 's/^.*input type="hidden" name="csrf_token_post" value="\(.*\)".*$/\1/p')
+	#
+	# Use the csrftoken to then post the content.
+	#
+	link=$(curl -s "${posttarget}/post.php" -D - -F "submit_hidden=submit_hidden" \
+				-F "post_key=${csrftoken}" -F "paste_expire_date=${postexpire}" \
+				-F "paste_name=${gamename} Debug Info" \
+				-F "paste_format=8" -F "paste_private=0" \
+				-F "paste_type=bash" -F "paste_code=<${tmpfile}" |
+				awk '/^location: / { print $2 }' | sed "s/\n//g")
+
+	 # Output the resulting link.
+	fn_print_ok_nl "Posting details to pastbin.com for ${postexpire}"
+	echo "  * url: ${posttarget}${link}"
+elif [ "${posttarget}" == "http://hastebin.com" ] ; then
+	fn_print_dots "Posting details to hastebin.com for ${postexpire}"
+	sleep 1
+	# hastebin is a bit simpler.  If successful, the returned result
+	# should look like: {"something":"key"}, putting the reference that
+	# we need in "key".  TODO - error handling. -CedarLUG
+	link=$(curl -s -d "$(<${tmpfile})" "${posttarget}/documents" | cut -d\" -f4)
+	fn_print_ok_nl "Posting details to hastebin.com for ${postexpire}"
+	echo "  * url: ${posttarget}/${link}"
+else
+	 fn_print_warn_nl Review the output in "${tmpfile}"
+	 core_exit.sh
+fi
+
+# cleanup
+rm "${tmpfile}" || /bin/true
+core_exit.sh

+ 1 - 0
lgsm/functions/command_stop.sh

@@ -209,6 +209,7 @@ fn_stop_ark(){
 								rev | cut -d\/ -f1)
 						#
 						# check for a valid pid
+						pid=${pid//[!0-9]/}
 						let pid+=0 # turns an empty string into a valid number, '0',
 						# and a valid numeric pid remains unchanged.
 						if [[ ${pid} -gt 1 && $pid -le $(cat /proc/sys/kernel/pid_max) ]] ; then

+ 25 - 9
lgsm/functions/core_functions.sh

@@ -12,13 +12,15 @@ elif [ "${gamename}" == "Counter Strike: Global Offensive" ]; then
 	gamename="Counter-Strike: Global Offensive"
 elif [ "${gamename}" == "Counter Strike: Source" ]; then
 	gamename="Counter-Strike: Source"
+elif [ "${gamename}" == "Quake Live" ]; then
+	engine="idtech3_ql"
 fi
 
 if [ "${emailnotification}" == "on" ]; then
     emailalert="on"
 fi
 
-# Code/functions for legacy servers
+## Code/functions for legacy servers
 fn_functions(){
 functionfile="${FUNCNAME}"
 fn_fetch_function
@@ -29,13 +31,15 @@ functionfile="${FUNCNAME}"
 fn_fetch_function
 }
 
-# fn_fetch_core_dl also placed here to allow legacy servers to still download core functions
-if [ -z "${lgsmdir}" ]||[ -z "${functionsdir}" ]||[ -z "${libdir}" ]; then
+## In case older versions are missing these vars
+if [ -z "${lgsmdir}" ]||[ -z "${functionsdir}" ]||[ -z "${libdir}" ]||[ -z "${tmpdir}" ]; then
 	lgsmdir="${rootdir}/lgsm"
 	functionsdir="${lgsmdir}/functions"
 	libdir="${lgsmdir}/lib"
+	tmpdir="${lgsmdir}/tmp"
 fi
 
+## fn_fetch_core_dl placed here to allow legacy servers to still download core functions
 fn_fetch_core_dl(){
 github_file_url_dir="lgsm/functions"
 github_file_url_name="${functionfile}"
@@ -78,6 +82,10 @@ fi
 source "${filedir}/${filename}"
 }
 
+# Creates tmp dir if missing
+if [ ! -d "${tmpdir}" ]; then
+	mkdir -p "${tmpdir}"
+fi
 
 # Core
 
@@ -121,12 +129,15 @@ fn_fetch_function
 }
 
 command_postdetails.sh(){
-functionfile="${FUNCNAME}"
-tempffname=$functionfile
-fn_fetch_function
-functionfile="command_details.sh"
-fn_fetch_function
-functionfile=$tempffname
+    functionfile="${FUNCNAME}"
+    tempffname="${functionfile}"
+    # First, grab the command_postdetails.sh file
+    fn_fetch_function
+    # But then next, command_details.sh needs to also be pulled
+    # because command_postdetails.sh sources its functions -CedarLUG
+    functionfile="command_details.sh"
+    fn_fetch_function
+    functionfile="${tempffname}"
 }
 
 command_details.sh(){
@@ -283,6 +294,11 @@ functionfile="${FUNCNAME}"
 fn_fetch_function
 }
 
+command_dev_detect_ldd.sh(){
+functionfile="${FUNCNAME}"
+fn_fetch_function
+}
+
 # Fix
 
 fix.sh(){

+ 102 - 5
lgsm/functions/core_getopt.sh

@@ -29,6 +29,8 @@ case "${getopt}" in
 		command_test_alert.sh;;
 	dt|details)
 		command_details.sh;;
+	pd|postdetails)
+		command_postdetails.sh;;
 	b|backup)
 		command_backup.sh;;
 	c|console)
@@ -45,6 +47,8 @@ case "${getopt}" in
 		command_dev_detect_deps.sh;;
 	dg|detect-glibc)
 		command_dev_detect_glibc.sh;;
+	dl|detect-ldd)
+		command_dev_detect_ldd.sh;;
 	*)
 	if [ -n "${getopt}" ]; then
 		echo -e "${red}Unknown command${default}: $0 ${getopt}"
@@ -66,6 +70,7 @@ case "${getopt}" in
 		echo -e "${blue}monitor\t${default}m  |Checks that the server is running."
 		echo -e "${blue}test-alert\t${default}ta |Sends test alert."
 		echo -e "${blue}details\t${default}dt |Displays useful information about the server."
+		echo -e "${blue}postdetails\t${default}pd |Post stripped details to pastebin (for support)"
 		echo -e "${blue}backup\t${default}b  |Create archive of the server."
 		echo -e "${blue}console\t${default}c  |Console allows you to access the live view of a server."
 		echo -e "${blue}debug\t${default}d  |See the output of the server directly to your terminal."
@@ -75,6 +80,71 @@ case "${getopt}" in
 	esac
 }
 
+fn_getopt_generic_no_update(){
+case "${getopt}" in
+	st|start)
+		command_start.sh;;
+	sp|stop)
+		command_stop.sh;;
+	r|restart)
+		command_restart.sh;;
+	uf|update-functions)
+		command_update_functions.sh;;
+	m|monitor)
+		command_monitor.sh;;
+	ta|test-alert)
+		command_test_alert.sh;;
+	dt|details)
+		command_details.sh;;
+	pd|postdetails)
+		command_postdetails.sh;;
+	b|backup)
+		command_backup.sh;;
+	c|console)
+		command_console.sh;;
+	d|debug)
+		command_debug.sh;;
+	dev|dev-debug)
+		command_dev_debug.sh;;
+	i|install)
+		command_install.sh;;
+	ai|auto-install)
+		fn_autoinstall;;
+	dd|detect-deps)
+		command_dev_detect_deps.sh;;
+	dg|detect-glibc)
+		command_dev_detect_glibc.sh;;
+	dl|detect-ldd)
+		command_dev_detect_ldd.sh;;
+	*)
+	if [ -n "${getopt}" ]; then
+		echo -e "${red}Unknown command${default}: $0 ${getopt}"
+		exitcode=2
+	fi
+	echo "Usage: $0 [option]"
+	echo "${gamename} - Linux Game Server Manager - Version ${version}"
+	echo "https://gameservermanagers.com/${selfname}"
+	echo -e ""
+	echo -e "${lightyellow}Commands${default}"
+	{
+		echo -e "${blue}start\t${default}st |Start the server."
+		echo -e "${blue}stop\t${default}sp |Stop the server."
+		echo -e "${blue}restart\t${default}r  |Restart the server."
+		echo -e "${blue}update-functions\t${default}uf |Removes all functions so latest can be downloaded."
+		echo -e "${blue}monitor\t${default}m  |Checks that the server is running."
+		echo -e "${blue}test-alert\t${default}ta |Sends test alert."
+		echo -e "${blue}details\t${default}dt |Displays useful infomation about the server."
+		echo -e "${blue}postdetails\t${default}pd |Post stripped details to pastebin (for support)"
+		echo -e "${blue}backup\t${default}b  |Create archive of the server."
+		echo -e "${blue}console\t${default}c  |Console allows you to access the live view of a server."
+		echo -e "${blue}debug\t${default}d  |See the output of the server directly to your terminal."
+		echo -e "${blue}install\t${default}i  |Install the server."
+		echo -e "${blue}auto-install\t${default}ai |Install the server, without prompts."
+	} | column -s $'\t' -t
+	esac
+}
+
+
 fn_getopt_teamspeak3(){
 case "${getopt}" in
 	st|start)
@@ -93,6 +163,8 @@ case "${getopt}" in
 		command_test_alert.sh;;
 	dt|details)
 		command_details.sh;;
+	pd|postdetails)
+		command_postdetails.sh;;
 	b|backup)
 		command_backup.sh;;
 	pw|change-password)
@@ -107,6 +179,8 @@ case "${getopt}" in
 		command_dev_detect_deps.sh;;
 	dg|detect-glibc)
 		command_dev_detect_glibc.sh;;
+	dl|detect-ldd)
+		command_dev_detect_ldd.sh;;
 	*)
 	if [ -n "${getopt}" ]; then
 		echo -e "${red}Unknown command${default}: $0 ${getopt}"
@@ -121,11 +195,12 @@ case "${getopt}" in
 		echo -e "${blue}start\t${default}st |Start the server."
 		echo -e "${blue}stop\t${default}sp |Stop the server."
 		echo -e "${blue}restart\t${default}r  |Restart the server."
-		echo -e "${blue}update\t${default}u  |Checks and applies updates from SteamCMD."
+		echo -e "${blue}update\t${default}u  |Checks and applies updates from teamspeak.com."
 		echo -e "${blue}update-functions\t${default}uf |Removes all functions so latest can be downloaded."
 		echo -e "${blue}monitor\t${default}m  |Checks that the server is running."
 		echo -e "${blue}test-alert\t${default}ta |Sends test alert."
 		echo -e "${blue}details\t${default}dt |Displays useful information about the server."
+		echo -e "${blue}postdetails\t${default}pd |Post stripped details to pastebin (for support)"
 		echo -e "${blue}change-password\t${default}pw |Changes TS3 serveradmin password."
 		echo -e "${blue}backup\t${default}b  |Create archive of the server."
 		echo -e "${blue}install\t${default}i  |Install the server."
@@ -152,6 +227,8 @@ case "${getopt}" in
 		command_test_alert.sh;;
 	dt|details)
 		command_details.sh;;
+	pd|postdetails)
+		command_postdetails.sh;;
 	b|backup)
 		command_backup.sh;;
 	c|console)
@@ -168,6 +245,8 @@ case "${getopt}" in
 		command_dev_detect_deps.sh;;
 	dg|detect-glibc)
 		command_dev_detect_glibc.sh;;
+	dl|detect-ldd)
+		command_dev_detect_ldd.sh;;
 	*)
 	if [ -n "${getopt}" ]; then
 		echo -e "${red}Unknown command${default}: $0 ${getopt}"
@@ -187,6 +266,7 @@ case "${getopt}" in
 		echo -e "${blue}monitor\t${default}m  |Checks that the server is running."
 		echo -e "${blue}test-alert\t${default}ta |Sends test alert."
 		echo -e "${blue}details\t${default}dt |Displays useful infomation about the server."
+		echo -e "${blue}postdetails\t${default}pd |Post stripped details to pastebin (for support)"
 		echo -e "${blue}backup\t${default}b  |Create archive of the server."
 		echo -e "${blue}console\t${default}c  |Console allows you to access the live view of a server."
 		echo -e "${blue}debug\t${default}d  |See the output of the server directly to your terminal."
@@ -214,6 +294,8 @@ case "${getopt}" in
 		command_test_alert.sh;;
 	dt|details)
 		command_details.sh;;
+	pd|postdetails)
+		command_postdetails.sh;;
 	b|backup)
 		command_backup.sh;;
 	dev|dev-debug)
@@ -224,6 +306,8 @@ case "${getopt}" in
 		command_dev_detect_deps.sh;;
 	dg|detect-glibc)
 		command_dev_detect_glibc.sh;;
+	dl|detect-ldd)
+		command_dev_detect_ldd.sh;;
 	*)
 	if [ -n "${getopt}" ]; then
 		echo -e "${red}Unknown command${default}: $0 ${getopt}"
@@ -238,11 +322,12 @@ case "${getopt}" in
 		echo -e "${blue}start\t${default}st |Start the server."
 		echo -e "${blue}stop\t${default}sp |Stop the server."
 		echo -e "${blue}restart\t${default}r  |Restart the server."
-		echo -e "${blue}update\t${default}u  |Checks and applies updates from SteamCMD."
+		echo -e "${blue}update\t${default}u  |Checks and applies updates from GitHub."
 		echo -e "${blue}update-functions\t${default}uf |Removes all functions so latest can be downloaded."
 		echo -e "${blue}monitor\t${default}m  |Checks that the server is running."
 		echo -e "${blue}test-alert\t${default}ta |Sends test alert."
 		echo -e "${blue}details\t${default}dt |Displays useful information about the server."
+		echo -e "${blue}postdetails\t${default}pd |Post stripped details to pastebin (for support)"
 		echo -e "${blue}backup\t${default}b  |Create archive of the server."
 		echo -e "${blue}install\t${default}i  |Install the server."
 	} | column -s $'\t' -t
@@ -261,7 +346,7 @@ case "${getopt}" in
 		command_update.sh;;
 	fu|force-update|update-restart)
 		forceupdate=1;
-		update_check.sh;;
+		command_update.sh;;
 	uf|update-functions)
 		command_update_functions.sh;;
 	v|validate)
@@ -272,6 +357,8 @@ case "${getopt}" in
 		command_test_alert.sh;;
 	dt|details)
 		command_details.sh;;
+	pd|postdetails)
+		command_postdetails.sh;;
 	b|backup)
 		command_backup.sh;;
 	c|console)
@@ -288,6 +375,8 @@ case "${getopt}" in
 		command_dev_detect_deps.sh;;
 	dg|detect-glibc)
 		command_dev_detect_glibc.sh;;
+	dl|detect-ldd)
+		command_dev_detect_ldd.sh;;
 	fd|fastdl)
 		command_fastdl.sh;;
 	*)
@@ -355,6 +444,8 @@ case "${getopt}" in
 		command_dev_detect_deps.sh;;
 	dg|detect-glibc)
 		command_dev_detect_glibc.sh;;
+	dl|detect-ldd)
+		command_dev_detect_ldd.sh;;
 	*)
 	if [ -n "${getopt}" ]; then
 		echo -e "${red}Unknown command${default}: $0 ${getopt}"
@@ -396,7 +487,7 @@ case "${getopt}" in
 		command_update.sh;;
 	fu|force-update|update-restart)
 		forceupdate=1;
-		update_check.sh;;
+		command_update.sh;;
 	uf|update-functions)
 		command_update_functions.sh;;
 	v|validate)
@@ -423,6 +514,8 @@ case "${getopt}" in
 		command_dev_detect_deps.sh;;
 	dg|detect-glibc)
 		command_dev_detect_glibc.sh;;
+	dl|detect-ldd)
+		command_dev_detect_ldd.sh;;
 	mc|map-compressor)
 		compress_unreal2_maps.sh;;
 	*)
@@ -493,6 +586,8 @@ case "${getopt}" in
 		command_dev_detect_deps.sh;;
 	dg|detect-glibc)
 		command_dev_detect_glibc.sh;;
+	dl|detect-ldd)
+		command_dev_detect_ldd.sh;;
 	*)
 	if [ -n "${getopt}" ]; then
 		echo -e "${red}Unknown command${default}: $0 ${getopt}"
@@ -524,6 +619,8 @@ case "${getopt}" in
 
 if [ "${gamename}" == "Mumble" ]; then
 	fn_getopt_mumble
+elif [ "${gamename}" == "Battlefield: 1942" ]|| [ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then
+	fn_getopt_generic_no_update
 elif [ "${engine}" == "lwjgl2" ]; then
 	fn_getopt_minecraft
 elif [ "${gamename}" == "TeamSpeak 3" ]; then
@@ -541,4 +638,4 @@ elif [ "${engine}" == "unreal" ]; then
 else
 	fn_getopt_generic
 fi
-core_exit.sh
+core_exit.sh

+ 0 - 6
lgsm/functions/fix.sh

@@ -68,12 +68,6 @@ if [ "${function_selfname}" == "command_install.sh" ]; then
 		echo "================================="
 		sleep 1
 		fix_ut2k4.sh
-	elif [ "${gamename}" == "Unreal Tournament 99" ]; then
-		echo ""
-		echo "Applying ${gamename} Server Fixes"
-		echo "================================="
-		sleep 1
-		fix_ut99.sh
 	elif [ "${gamename}" == "Unreal Tournament" ]; then
 		echo ""
 		echo "Applying ${gamename} Server Fixes"

+ 3 - 3
lgsm/functions/fix_glibc.sh

@@ -16,7 +16,7 @@ do
 	fi
 done
 
-local libm_servers_array=( "Codename CURE" "Day of Infamy" "Double Action: Boogaloo" "Empires Mod" "Fistful of Frags" "Garry's Mod" "GoldenEye: Source" "Insurgency" "Natural Selection 2" "NS2: Combat" "No More Room in Hell" )
+local libm_servers_array=( "Black Mesa: Deathmatch" "Codename CURE" "Day of Infamy" "Double Action: Boogaloo" "Empires Mod" "Fistful of Frags" "Garry's Mod" "GoldenEye: Source" "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,7 +24,7 @@ do
 	fi
 done
 
-local libc_servers_array=( "Garry's Mod" "GoldenEye: Source" )
+local libc_servers_array=( "Black Mesa: Deathmatch" "Blade Symphony" "Garry's Mod" "GoldenEye: Source" )
 for libc_server in "${libc_servers_array[@]}"
 do
 	if [ "${gamename}" == "${libc_server}" ]; then
@@ -32,7 +32,7 @@ do
 	fi
 done
 
-local libpthread_servers_array=( "Garry's Mod" )
+local libpthread_servers_array=( "Black Mesa: Deathmatch" "Blade Symphony" "Garry's Mod" )
 for libpthread_server in "${libpthread_servers_array[@]}"
 do
 	if [ "${gamename}" == "${libpthread_server}" ]; then

+ 0 - 30
lgsm/functions/fix_ut99.sh

@@ -1,30 +0,0 @@
-#!/bin/bash
-# LGSM fix_ut99.sh function
-# Author: Daniel Gibbs
-# Website: https://gameservermanagers.com
-# Description: Resolves various issues with Unreal Tournament 99.
-
-local commandname="FIX"
-local commandaction="Fix"
-local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
-
-echo "${servercfgfullpath}"
-echo "enabling UdpServerUplink."
-{
-echo "[IpServer.UdpServerUplink]"
-echo "DoUplink=True"
-echo "UpdateMinutes=1"
-echo "MasterServerAddress=unreal.epicgames.com"
-echo "MasterServerPort=27900"
-echo "Region=0"
-}| tee -a "${servercfgfullpath}" > /dev/null 2>&1
-sleep 1
-echo "removing dead gamespy.com master server."
-sed -i '/master0.gamespy.com/d' "${servercfgfullpath}"
-sleep 1
-echo "removing dead mplayer.com master server."
-sed -i '/master.mplayer.com/d' "${servercfgfullpath}"
-sleep 1
-echo "inserting qtracker.com master server."
-sed -i '65i\ServerActors=IpServer.UdpServerUplink MasterServerAddress=master.qtracker.com MasterServerPort=27900' "${servercfgfullpath}"
-echo ""

+ 113 - 107
lgsm/functions/gsquery.py

@@ -9,117 +9,123 @@ import optparse
 import socket
 import sys
 
+
 class GameServer:
-	def __init__( self, options, arguments ):
-		self.option = options
-		self.argument = arguments
-		#
-		self.server_response_timeout = 5
-		self.default_buffer_length = 1024
-		#
-		if self.option.engine == 'source':
-			self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0'
-		elif self.option.engine == 'goldsource':
-			self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0'
-		elif self.option.engine == 'spark':
-			self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0'
-		elif self.option.engine == 'realvirtuality':
-			self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0'
-		elif self.option.engine == 'unity3d':
-			self.query_prompt_string = '\xFF\xFF\xFF\xFFTSource Engine Query\0'
-		elif self.option.engine == 'idtech3':
-			self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0'			
-		elif self.option.engine == 'unreal':
-			self.query_prompt_string = b'\x5C\x69\x6E\x66\x6F\x5C'
-		elif self.option.engine == 'unreal2':
-			self.query_prompt_string = b'\x79\x00\x00\x00\x00'
-		elif self.option.engine == 'avalanche':
-			self.query_prompt_string = b'\xFE\xFD\x09\x10\x20\x30\x40'
-		self.connected = False
-		self.response = None
-		self.sanity_checks()
+    def __init__(self, options, arguments):
+        self.option = options
+        self.argument = arguments
+        #
+        self.server_response_timeout = 5
+        self.default_buffer_length = 1024
+        #
+        if self.option.engine == 'avalanche':
+            self.query_prompt_string = b'\xFE\xFD\x09\x10\x20\x30\x40'
+        elif self.option.engine == 'goldsource':
+            self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0'
+        elif self.option.engine == 'idtech3':
+            self.query_prompt_string = b'\xff\xff\xff\xffgetstatus'
+        elif self.option.engine == 'quakelive':
+            self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0'
+        elif self.option.engine == 'realvirtuality':
+            self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0'
+        elif self.option.engine == 'refractor':
+            self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0'
+        elif self.option.engine == 'source':
+            self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0'
+        elif self.option.engine == 'spark':
+            self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0'
+        elif self.option.engine == 'unity3d':
+            self.query_prompt_string = '\xFF\xFF\xFF\xFFTSource Engine Query\0'
+        elif self.option.engine == 'unreal':
+            self.query_prompt_string = b'\x5C\x69\x6E\x66\x6F\x5C'
+        elif self.option.engine == 'unreal2':
+            self.query_prompt_string = b'\x79\x00\x00\x00\x00'
+        self.connected = False
+        self.response = None
+        self.sanity_checks()
+
+    def fatal_error(self, error_message, error_code=1):
+        sys.stderr.write('ERROR: ' + str(error_message) + '\n')
+        sys.exit(error_code)
 
-	def fatal_error( self, error_message, error_code=1 ):
-		sys.stderr.write( 'ERROR: ' + str(error_message) + '\n' )
-		sys.exit( error_code )
+    def exit_success(self, success_message=''):
+        sys.stdout.write('OK: ' + str(success_message) + '\n')
+        sys.exit(0)
 
-	def exit_success( self, success_message='' ):
-		sys.stdout.write( 'OK: ' + str(success_message) + '\n' )
-		sys.exit( 0 )
+    def responding(self):
+        # Connect.
+        connection = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
+        connection.settimeout(self.server_response_timeout)
+        try:
+            self.connected = connection.connect((self.option.address, int(self.option.port)))
+        except socket.timeout:
+            self.fatal_error('Request timed out', 1)
+        except:
+            self.fatal_error('Unable to connect', 1)
+        # Send.
+        connection.send(self.query_prompt_string)
+        # Receive.
+        try:
+            self.response = connection.recv(self.default_buffer_length)
+        except socket.error:
+            self.fatal_error('Unable to receive', 2)
+        connection.close()
+        # Response.
+        if self.response is None:
+            self.fatal_error('No response', 3)
+        if len(self.response) < 10:
+            sys.exit('Short response.', 3)
+        else:
+            self.exit_success(str(self.response))
 
-	def responding( self ):
-		# Connect.
-		connection = socket.socket( socket.AF_INET, socket.SOCK_DGRAM )
-		connection.settimeout( self.server_response_timeout )
-		try:
-			self.connected = connection.connect( ( self.option.address, int(self.option.port) ) )
-		except socket.timeout:
-			self.fatal_error( 'Request timed out', 1 )
-		except:
-			self.fatal_error( 'Unable to connect', 1 )
-		# Send.
-		connection.send( self.query_prompt_string )
-		# Receive.
-		try:
-			self.response = connection.recv( self.default_buffer_length )
-		except socket.error:
-			self.fatal_error( 'Unable to receive', 2 )
-		connection.close()
-		# Response.
-		if self.response == None:
-			self.fatal_error( 'No response', 3 )
-		if len( self.response ) < 10 :
-			sys.exit( 'Short response.', 3 )
-		else:
-			self.exit_success( str( self.response ) )
+    def sanity_checks(self):
+        if not self.option.address:
+            self.fatal_error('No IPv4 address supplied.', 4)
+        if not self.option.port:
+            self.fatal_error('No port supplied.', 4)
 
-	def sanity_checks( self ):
-		if not self.option.address:
-			self.fatal_error( 'No IPv4 address supplied.', 4 )
-		if not self.option.port:
-			self.fatal_error( 'No port supplied.', 4 )
 
 if __name__ == '__main__':
-	parser = optparse.OptionParser(
-		usage = 'usage: python %prog [options]',
-		version = '%prog 0.0.1'
-	)
-	parser.add_option(
-		'-a', '--address',
-		action = 'store',
-		dest = 'address',
-		default = False,
-		help = 'The IPv4 address of the server.'
-	)
-	parser.add_option(
-		'-p', '--port',
-		action = 'store',
-		dest = 'port',
-		default = False,
-		help = 'The IPv4 port of the server.'
-	)
-	parser.add_option(
-		'-e', '--engine',
-		action = 'store',
-		dest = 'engine',
-		default = False,
-		help = 'Engine type: avalanche, goldsource, idtech3, realvirtuality, spark, source, unity3d, unreal, unreal2.'
-	)
-	parser.add_option(
-		'-v', '--verbose',
-		action = 'store_true',
-		dest = 'verbose',
-		default = False,
-		help = 'Display verbose output.'
-	)
-	parser.add_option(
-		'-d', '--debug',
-		action = 'store_true',
-		dest = 'debug',
-		default = False,
-		help = 'Display debugging output.'
-	)
-	options, arguments = parser.parse_args()
-	#
-	server = GameServer( options, arguments )
-	server.responding()
+    parser = optparse.OptionParser(
+        usage='usage: python %prog [options]',
+        version='%prog 0.0.1'
+    )
+    parser.add_option(
+        '-a', '--address',
+        action='store',
+        dest='address',
+        default=False,
+        help='The IPv4 address of the server.'
+    )
+    parser.add_option(
+        '-p', '--port',
+        action='store',
+        dest='port',
+        default=False,
+        help='The IPv4 port of the server.'
+    )
+    parser.add_option(
+        '-e', '--engine',
+        action='store',
+        dest='engine',
+        default=False,
+        help='Engine type: avalanche, goldsource, idtech3, realvirtuality, quakelive, refractor, spark, source, unity3d, unreal, unreal2.'
+    )
+    parser.add_option(
+        '-v', '--verbose',
+        action='store_true',
+        dest='verbose',
+        default=False,
+        help='Display verbose output.'
+    )
+    parser.add_option(
+        '-d', '--debug',
+        action='store_true',
+        dest='debug',
+        default=False,
+        help='Display debugging output.'
+    )
+    options, arguments = parser.parse_args()
+    #
+    server = GameServer(options, arguments)
+    server.responding()

+ 150 - 89
lgsm/functions/info_config.sh

@@ -14,9 +14,6 @@ local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 # grep -v "foo" filter out lines that contain foo
 # cut -f1 -d "/" remove everything after /
 
-unavailable="${red}UNAVAILABLE${default}"
-zero="${red}0${default}"
-
 fn_info_config_avalanche(){
 	if [ ! -f "${servercfgfullpath}" ]; then
 		servername="${unavailable}"
@@ -24,10 +21,11 @@ fn_info_config_avalanche(){
 		slots="${zero}"
 		port="${zero}"
 	else
-		servername=$(grep "Name" "${servercfgfullpath}" | sed 's/Name//g' | tr -d '=", \n')
-		serverpassword=$(grep "Password" "${servercfgfullpath}" | sed 's/Password//g' | tr -d '=", \n')
-		slots=$(grep "MaxPlayers" "${servercfgfullpath}" | tr -cd '[:digit:]')
-		port=$(grep "BindPort" "${servercfgfullpath}" | tr -cd '[:digit:]')
+
+		servername=$(grep "Name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/Name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		serverpassword=$(grep "Password" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		slots=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]')
+		port=$(grep "BindPort" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]')
 
 		# Not Set
 		servername=${servername:-"NOT SET"}
@@ -35,14 +33,40 @@ fn_info_config_avalanche(){
 		slots=${slots:-"0"}
 		port=${port:-"0"}
 
-		# check if the ip exists in the config file. Failing this will fall back to the default.
-		ipconfigcheck=$(grep "BindIP" "${servercfgfullpath}" | sed 's/BindIP//g' | tr -d '=", \n')
-		if [ -n "${ipconfigcheck}" ]; then
-			ip="${ipconfigcheck}"
-		fi
+		ip=$(grep "BindIP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/BindIP//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		ipsetinconfig=1
+		ipinconfigvar="BindIP"
+	fi
+}
+
+fn_info_config_bf1942(){
+	if [ ! -f "${servercfgfullpath}" ]; then
+		servername="${unavailable}"
+		serverpassword="${unavailable}"
+		slots="${zero}"
+		port="${zero}"
+		queryport="${zero}"
+	else
+
+		servername=$(grep "game.serverName " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverName //g' | tr -d '=\";,:' | xargs)
+		serverpassword=$(grep "game.serverPassword" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/game.serverPassword//g' | tr -d '=\";,:' | xargs)
+		slots=$(grep "game.serverMaxPlayers" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]')
+		port=$(grep "game.serverPort" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]')
+		queryport="22000"
+
+		# Not Set
+		servername=${servername:-"NOT SET"}
+		serverpassword=${serverpassword:-"NOT SET"}
+		slots=${slots:-"0"}
+		port=${port:-"0"}
+
+		ip=$(grep "game.serverIP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverIP//g' | tr -d '=\";,:' | xargs)
+		ipsetinconfig=1
+		ipinconfigvar="game.serverIP"
 	fi
 }
 
+
 fn_info_config_dontstarve(){
 	if [ ! -f "${servercfgfullpath}" ]; then
 		servername="${unavailable}"
@@ -52,10 +76,10 @@ fn_info_config_dontstarve(){
 		tickrate="${zero}"
 		port="${zero}"
 	else
-		servername=$(grep "default_server_name = " "${servercfgfullpath}" | sed 's/default_server_name = //g')
-		serverpassword=$(grep "server_password = " "${servercfgfullpath}" | grep -v "#" | sed 's/server_password = //g')
+		servername=$(grep "default_server_name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/default_server_name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		serverpassword=$(grep "server_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/server_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
 		slots=$(grep "max_players" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
-		gamemode=$(grep "game_mode = " "${servercfgfullpath}" | grep -v "#" | sed 's/game_mode = //g')
+		gamemode=$(grep "game_mode" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/game_mode//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
 		tickrate=$(grep "tick_rate" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
 		port=$(grep "server_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
 
@@ -76,21 +100,17 @@ fn_info_config_minecraft(){
 		rconport="${zero}"
 		slots="${zero}"
 		port="${zero}"
-		gamemode="${zero}"
+		gamemode="${unavailable}"
 		gameworld="${unavailable}"
 	else
-		# check if the ip exists in the config file. Failing this will fall back to the default.
-		ipconfigcheck=$(grep "server-ip=" "${servercfgfullpath}" | sed 's/server-ip=//g')
-		if [ -n "${ipconfigcheck}" ]; then
-			ip="${ipconfigcheck}"
-		fi
-		servername=$(grep "motd=" "${servercfgfullpath}" | sed 's/motd=//g' | tr -d '=\";' | sed 's/\\n.*//g')
-		rconpassword=$(grep "rcon.password=" "${servercfgfullpath}" | sed 's/rcon.password=//g' | tr -d '=\"; ')
-		rconport=$(grep "rcon.port=" "${servercfgfullpath}" | tr -cd '[:digit:]')
-		slots=$(grep "max-players=" "${servercfgfullpath}" | tr -cd '[:digit:]')
-		port=$(grep "server-port=" "${servercfgfullpath}" | tr -cd '[:digit:]')
-		gamemode=$(grep "gamemode=" "${servercfgfullpath}" | tr -cd '[:digit:]')
-		gameworld=$(grep "level-name=" "${servercfgfullpath}" | sed 's/level-name=//g' | tr -d '=\"; ')
+
+		servername=$(grep "motd" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/motd//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		rconpassword=$(grep "rcon.password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/rcon.password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		rconport=$(grep "rcon.port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
+		slots=$(grep "max-players" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
+		port=$(grep "server-port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
+		gamemode=$(grep "gamemode" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
+		gameworld=$(grep "level-name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/level-name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
 
 		# Not Set
 		servername=${servername:-"NOT SET"}
@@ -100,6 +120,10 @@ fn_info_config_minecraft(){
 		port=${port:-"NOT SET"}
 		gamemode=${gamemode:-"NOT SET"}
 		gameworld=${gameworld:-"NOT SET"}
+
+		ip=$(grep "server-ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/server-ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		ipsetinconfig=1
+		ipinconfigvar="server-ip"
 	fi
 }
 
@@ -112,12 +136,12 @@ fn_info_config_projectzomboid(){
 		port="${zero}"
 		gameworld="${unavailable}"
 	else
-		servername=$(grep "PublicName=" "${servercfgfullpath}" | sed 's/PublicName=//g' | tr -d '=\";\n')
-		serverpassword=$(grep "^Password=$" "${servercfgfullpath}" | sed 's/Password=//g' | tr -d '=\"; ')
-		rconpassword=$(grep "RCONPassword=" "${servercfgfullpath}" | sed 's/RCONPassword=//g' | tr -d '=\"; ')
-		slots=$(grep "MaxPlayers=" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
-		port=$(grep "DefaultPort=" "${servercfgfullpath}" | tr -cd '[:digit:]')
-		gameworld=$(grep "Map=" "${servercfgfullpath}" | sed 's/Map=//g' | tr -d '\n')
+		servername=$(grep "PublicName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/PublicName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		serverpassword=$(grep "Password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' | grep "^Password" | sed  -e '/^#/d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		rconpassword=$(grep "RCONPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/RCONPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		slots=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
+		port=$(grep "DefaultPort" "${servercfgfullpath}" | tr -cd '[:digit:]')
+		gameworld=$(grep "Map" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' | grep "^Map" | sed -e '/^#/d' -e 's/Map//g' | tr -d '=\";' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
 
 		# Not Set
 		servername=${servername:-"NOT SET"}
@@ -129,20 +153,55 @@ fn_info_config_projectzomboid(){
 	fi
 }
 
-fn_info_config_idtech3(){
+fn_info_config_quakelive(){
 	if [ ! -f "${servercfgfullpath}" ]; then
+		rconpassword="${unavailable}"
+		servername="${unavailable}"
+		serverpassword="${unavailable}"
+		slots="${zero}"
+	else
+		rconpassword=$(grep "zmq_rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set zmq_rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		serverpassword=$(grep "g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		slots=$(grep "sv_maxClients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
+
+		# Not Set
+		rconpassword=${rconpassword:-"NOT SET"}
+		servername=${servername:-"NOT SET"}
+		serverpassword=${serverpassword:-"NOT SET"}
+		slots=${slots:-"0"}
+
+		ip=$(grep "set net_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set net_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		ipsetinconfig=1
+		ipinconfigvar="set net_ip"
+	fi
+}
+
+fn_info_config_wolfensteinenemyterritory(){
+	if [ ! -f "${servercfgfullpath}" ]; then
+		rconpassword="${unavailable}"
 		servername="${unavailable}"
 		serverpassword="${unavailable}"
 		slots="${zero}"
+		port="${zero}"
 	else
-		servername=$(grep "set sv_hostname " "${servercfgfullpath}" | sed 's/set sv_hostname //g' | tr -d '=\"; ')
-		serverpassword=$(grep "set g_password" "${servercfgfullpath}" | sed 's/set g_password//g' | tr -d '=\"; '| cut -f1 -d "/")
-		slots=$(grep "set sv_maxClients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
+		port=$(grep "set net_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]')
+		rconpassword=$(grep "set zmq_rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set zmq_rcon_password //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//g' -e '/^\//d' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		servername=$(grep "set sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		serverpassword=$(grep "set g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		slots=$(grep "set sv_maxclients" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]')
+
 
 		# Not Set
+		rconpassword=${rconpassword:-"NOT SET"}
 		servername=${servername:-"NOT SET"}
 		serverpassword=${serverpassword:-"NOT SET"}
 		slots=${slots:-"0"}
+		port=${port:-"27960"}
+
+		ip=$(grep "set net_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set net_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		ipsetinconfig=1
+		ipinconfigvar="set net_ip"
 	fi
 }
 
@@ -153,10 +212,10 @@ fn_info_config_realvirtuality(){
 		serverpassword="${unavailable}"
 		slots="${zero}"
 	else
-		servername=$(grep "hostname" "${servercfgfullpath}" | grep -v "//" | awk -F '"' '{print $2}')
-		adminpassword=$(grep "passwordAdmin" "${servercfgfullpath}" | grep -v "//" | sed 's/\passwordAdmin//g' | tr -d '=\"; ')
-		serverpassword=$(grep "password =" "${servercfgfullpath}" | grep -v "//" | sed 's/\password//g' | tr -d '=\"; ')
-		slots=$(grep "maxPlayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
+		servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		adminpassword=$(grep "passwordAdmin" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/passwordAdmin//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		serverpassword=$(grep "password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		slots=$(grep "maxPlayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]')
 
 		# Not Set
 		servername=${servername:-"NOT SET"}
@@ -174,11 +233,11 @@ fn_info_config_seriousengine35(){
 		slots="${zero}"
 		port="${zero}"
 	else
-		servername=$(grep "prj_strMultiplayerSessionName" "${servercfgfullpath}" | sed 's/prj_strMultiplayerSessionName = //g' | tr -d '=\"; ')
-		rconpassword=$(grep "rcts_strAdminPassword" "${servercfgfullpath}" | sed 's/rcts_strAdminPassword = //g' | tr -d '=\"; ')
-		gamemode=$(grep "gam_idGameMode" "${servercfgfullpath}" | grep -v "#" | sed 's/gam_idGameMode//g' | tr -d '=\"; ')
-		slots=$(grep "gam_ctMaxPlayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
-		port=$(grep "prj_uwPort" "${servercfgfullpath}" | tr -d '\r' | tr -cd '[:digit:]')
+		servername=$(grep "prj_strMultiplayerSessionName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/prj_strMultiplayerSessionName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		rconpassword=$(grep "rcts_strAdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/rcts_strAdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		gamemode=$(grep "gam_idGameMode" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/gam_idGameMode//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		slots=$(grep "gam_ctMaxPlayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]')
+		port=$(grep "prj_uwPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]')
 
 		# Not Set
 		servername=${servername:-"NOT SET"}
@@ -195,9 +254,9 @@ fn_info_config_source(){
 		serverpassword="${unavailable}"
 		rconpassword="${unavailable}"
 	else
-		servername=$(grep "hostname" "${servercfgfullpath}" | sed 's/hostname //g' | sed 's/"//g'| cut -f1 -d "/")
-		serverpassword=$(grep "sv_password" "${servercfgfullpath}" | sed 's/sv_password //g' | sed 's/"//g'| cut -f1 -d "/")
-		rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed 's/rcon_password //g' | sed 's/"//g'| cut -f1 -d "/")
+		servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		serverpassword=$(grep "sv_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/sv_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
 
 		# Not Set
 		servername=${servername:-"NOT SET"}
@@ -215,8 +274,8 @@ fn_info_config_starbound(){
 		rconport="21026"
 		slots="8"
 	else
-		servername=$(grep "serverName" "${servercfgfullpath}" | sed 's/"serverName" \: //g' | grep -oP '"\K[^"]+(?=["])')
-		rconpassword=$(grep "rconServerPassword" "${servercfgfullpath}" | sed 's/"rconServerPassword" \: //g' | grep -oP '"\K[^"]+(?=["])')
+		servername=$(grep "serverName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e 's/serverName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		rconpassword=$(grep "rconServerPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e 's/rconServerPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
 		port=$(grep "gameServerPort" "${servercfgfullpath}" | tr -cd '[:digit:]')
 		queryport=$(grep "queryServerPort" "${servercfgfullpath}" | tr -cd '[:digit:]')
 		rconport=$(grep "rconServerPort" "${servercfgfullpath}" | tr -cd '[:digit:]')
@@ -239,20 +298,19 @@ fn_info_config_teamspeak3(){
 		queryport="10011"
 		fileport="30033"
 	else
-		# check if the ip exists in the config file. Failing this will fall back to the default.
-		ipconfigcheck=$(grep "voice_ip=" "${servercfgfullpath}" | sed 's/voice_ip=//g')
-		if [ -n "${ipconfigcheck}" ]; then
-			ip="${ipconfigcheck}"
-		fi
-		dbplugin=$(grep "dbplugin=" "${servercfgfullpath}" | sed 's/dbplugin=//g')
-		port=$(grep "default_voice_port=" "${servercfgfullpath}" | tr -cd '[:digit:]')
-		queryport=$(grep "query_port=" "${servercfgfullpath}" | tr -cd '[:digit:]')
-		fileport=$(grep "filetransfer_port=" "${servercfgfullpath}" | tr -cd '[:digit:]')
+		dbplugin=$(grep "dbplugin=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/dbplugin=//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		port=$(grep "default_voice_port" "${servercfgfullpath}" | tr -cd '[:digit:]')
+		queryport=$(grep "query_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
+		fileport=$(grep "filetransfer_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
 
 		# Not Set
 		port=${port:-"9987"}
 		queryport=${queryport:-"10011"}
 		fileport=${fileport:-"30033"}
+
+		ip=$(grep "voice_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/voice_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		ipsetinconfig=1
+		ipinconfigvar="voice_ip"
 	fi
 }
 
@@ -262,19 +320,17 @@ fn_info_config_mumble(){
 		queryport="${port}"
 		servername="Mumble"
 	else
-		# check if the ip exists in the config file. Failing this will fall back to the default.
-		ipconfigcheck=$(cat "${servercfgfullpath}" | grep "host=" | awk -F'=' '{ print $2}')
-		if [ -n "${ipconfigcheck}" ]; then
-			ip="${ipconfigcheck}"
-		fi
-		port=$(cat "${servercfgfullpath}" | grep 'port=' | awk -F'=' '{ print $2 }')
+		port=$(grep "port" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^;/d' -e 's/port//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
 		queryport="${port}"
 
 		# Not Set
 		port=${port:-"64738"}
 		queryport=${queryport:-"64738"}
-
 		servername="Mumble Port ${port}"
+
+		ip=$(cat "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^;/d' -e 's/voice_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		ipsetinconfig=1
+		ipinconfigvar="voice_ip"
 	fi
 }
 
@@ -286,11 +342,11 @@ fn_info_config_teeworlds(){
 		port="8303"
 		slots="12"
 	else
-		servername=$(grep "sv_name" "${servercfgfullpath}" | sed 's/sv_name //g' | sed 's/"//g')
-		serverpassword=$(grep "password " "${servercfgfullpath}" | awk '!/sv_rcon_password/'| sed 's/password //g' | tr -d '=\"; ')
-		rconpassword=$(grep "sv_rcon_password" "${servercfgfullpath}" | sed 's/sv_rcon_password //g' | tr -d '=\"; ')
-		port=$(grep "sv_port" "${servercfgfullpath}" | tr -cd '[:digit:]')
-		slots=$(grep "sv_max_clients" "${servercfgfullpath}" | tr -cd '[:digit:]')
+		servername=$(grep "sv_name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/^sv_name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		serverpassword=$(grep "password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' | grep "^password" | sed -e '/^#/d' -e 's/^password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		rconpassword=$(grep "sv_rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/^sv_rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		port=$(grep "sv_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
+		slots=$(grep "sv_max_clients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
 
 		# Not Set
 		servername=${servername:-"NOT SET"}
@@ -308,10 +364,10 @@ fn_info_config_terraria(){
 		gameworld="${unavailable}"
 		slots="${zero}"
 	else
-		servername=$(grep "worldname=" "${servercfgfullpath}" | sed 's/worldname=//g')
-		port=$(grep "port=" "${servercfgfullpath}" | tr -cd '[:digit:]')
-		gameworld=$(grep "world=" "${servercfgfullpath}" | sed 's/world=//g')
-		slots=$(grep "maxplayers=" "${servercfgfullpath}" | sed 's/maxplayers=//g')
+		servername=$(grep "worldname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/worldname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		port=$(grep "port" "${servercfgfullpath}" | tr -cd '[:digit:]')
+		gameworld=$(grep "world=" "${servercfgfullpath}" | grep -v "//" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/world=//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		slots=$(grep "maxplayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]')
 
 		# Not Set
 		servername=${servername:-"NOT SET"}
@@ -333,18 +389,18 @@ fn_info_config_unreal(){
 		webadminuser="${unavailable}"
 		webadminpass="${unavailable}"
 	else
-		servername=$(grep "ServerName=" "${servercfgfullpath}" | sed 's/ServerName=//g')
-		serverpassword=$(grep "GamePassword=" "${servercfgfullpath}" | sed 's/GamePassword=//g')
-		adminpassword=$(grep "AdminPassword=" "${servercfgfullpath}" | sed 's/AdminPassword=//g')
-		port=$(grep "Port=" "${servercfgfullpath}" | grep -v "Master" | grep -v "LAN" | grep -v "Proxy" | grep -v "Listen" | tr -d '\r' | tr -cd '[:digit:]')
-		gsqueryport=$(grep "OldQueryPortNumber=" "${servercfgfullpath}" | tr -d '\r' | tr -cd '[:digit:]')
-		webadminenabled=$(grep "bEnabled=" "${servercfgfullpath}" | sed 's/bEnabled=//g' | tr -d '\r')
-		webadminport=$(grep "ListenPort=" "${servercfgfullpath}" | tr -d '\r' | tr -cd '[:digit:]')
+		servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		serverpassword=$(grep "GamePassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/GamePassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		adminpassword=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		port=$(grep "Port" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' | grep "^Port" | grep -v "#" | tr -cd '[:digit:]')
+		gsqueryport=$(grep "OldQueryPortNumber" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
+		webadminenabled=$(grep "bEnabled" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bEnabled//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		webadminport=$(grep "ListenPort" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
 		if [ "${engine}" == "unreal" ]; then
-			webadminuser=$(grep "AdminUsername=" "${servercfgfullpath}" | sed 's/AdminUsername=//g')
-			webadminpass=$(grep "UTServerAdmin.UTServerAdmin" "${servercfgfullpath}" -A 2 | grep "AdminPassword=" | sed 's/AdminPassword=//g')
+			webadminuser=$(grep "AdminUsername" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminUsername//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+			webadminpass=$(grep "UTServerAdmin.UTServerAdmin" "${servercfgfullpath}" -A 4 | grep "AdminPassword" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
 		else
-			webadminuser=$(grep "AdminName=" "${servercfgfullpath}" | sed 's/AdminName=//g')
+			webadminuser=$(grep "AdminName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
 			webadminpass="${adminpassword}"
 		fi
 
@@ -413,12 +469,15 @@ fn_info_config_sdtd(){
 # Just Cause 2
 if [ "${engine}" == "avalanche" ]; then
 	fn_info_config_avalanche
+# Battlefield: 1942
+elif [ "${gamename}" == "Battlefield: 1942" ]; then
+	fn_info_config_bf1942
 # Dont Starve Together
 elif [ "${engine}" == "dontstarve" ]; then
 	fn_info_config_dontstarve
 # Quake Live
-elif [ "${engine}" == "idtech3" ]; then
-	fn_info_config_idtech3
+elif [ "${gamename}" == "Quake Live" ]; then
+	fn_info_config_quakelive
 # Minecraft
 elif [ "${engine}" == "lwjgl2" ]; then
 	fn_info_config_minecraft
@@ -454,4 +513,6 @@ elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then
 # 7 Day To Die (unity3d)
 elif [ "${gamename}" == "7 Days To Die" ]; then
 	fn_info_config_sdtd
+elif [ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then
+	fn_info_config_wolfensteinenemyterritory
 fi

+ 9 - 5
lgsm/functions/info_glibc.sh

@@ -6,7 +6,10 @@
 
 local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 
-if [ "${gamename}" == "Blade Symphony" ]; then
+if [ "${gamename}" == "Black Mesa: Deathmatch" ]; then
+	glibcrequired="2.15"
+	glibcfix="yes"
+elif [ "${gamename}" == "Blade Symphony" ]; then
 	glibcrequired="2.15"
 	glibcfix="yes"
 elif [ "${gamename}" == "BrainBread 2" ]; then
@@ -72,7 +75,7 @@ elif [ "${engine}" == "spark" ]; then
 	glibcrequired="2.15"
 	glibcfix="yes"
 elif [ "${engine}" == "starbound" ]; then
-	glibcrequired="2.12"
+	glibcrequired="2.17"
 	glibcfix="no"
 elif [ "${engine}" == "terraria" ]; then
 	glibcrequired="2.7"
@@ -98,12 +101,13 @@ elif [ "${gamename}" == "TeamSpeak 3" ]; then
 elif [ "${gamename}" == "Mumble" ]; then
 	glibcrequired="NOT REQUIRED"
 	glibcfix="no"
-elif [ "${engine}" == "idtech3" ]; then
-	glibcrequired="2.0"
-	glibcfix="no"
+
 elif [ "${engine}" == "refractor" ]; then
 	glibcrequired="2.0"
 	glibcfix="no"
+elif [ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then
+	glibcrequired="2.2.4"
+	glibcfix="no"
 else
 	glibcrequired="UNKNOWN"
 	glibcfix="no"

+ 3 - 3
lgsm/functions/info_parms.sh

@@ -15,7 +15,7 @@ local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 unavailable="${red}UNAVAILABLE${default}"
 zero="${red}0${default}"
 
-fn_info_config_idtech3(){
+fn_info_config_quakelive(){
 	# Not Set
 	port=${port:-"NOT SET"}
 	rconport=${rconport:-"0"}
@@ -128,8 +128,8 @@ elif [ "${engine}" == "dontstarve" ]; then
 elif [ "${engine}" == "projectzomboid" ]; then
 	fn_info_config_projectzomboid
 # Quake Live
-elif [ "${engine}" == "idtech3" ]; then
-	fn_info_config_idtech3
+elif [ "${gamename}" == "Quake Live" ]; then
+	fn_info_config_quakelive
 # ARMA 3
 elif [ "${engine}" == "realvirtuality" ]; then
 	fn_info_config_realvirtuality

+ 321 - 400
lgsm/functions/install_config.sh

@@ -8,460 +8,381 @@ local commandname="INSTALL"
 local commandaction="Install"
 local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 
-fn_defaultconfig(){
-	echo "creating ${servercfg} config file."
-	fn_script_log_info "creating ${servercfg} config file."
-	cp -v "${servercfgdefault}" "${servercfgfullpath}"
-	sleep 1
+fn_fetch_default_config(){
+	mkdir -pv "${lgsmdir}/default-configs"
+	githuburl="https://github.com/GameServerManagers/Game-Server-Configs/master"
+
+	for config in "${array_configs[@]}"
+	do
+		fileurl="https://raw.githubusercontent.com/GameServerManagers/Game-Server-Configs/master/${gamedirname}/${config}"; filedir="${lgsmdir}/default-configs"; filename="${config}";  executecmd="noexecute" run="norun"; force="noforce"
+		fn_fetch_file "${fileurl}" "${filedir}" "${filename}" "${executecmd}" "${run}" "${force}" "${md5}"
+	done
 }
 
-fn_userinputconfig(){
-	# allow user to input server name and password
-	if [ -z "${autoinstall}" ]; then
-		echo ""
-		echo "Configuring ${gamename} Server"
-		echo "================================="
-		sleep 1
-		read -p "Enter server name: " servername
-		read -p "Enter rcon password: " rconpass
-	else
-		servername="${servicename}"
-		rconpass="rconpassword"
-	fi
+# Changes some variables within the default configs
+# SERVERNAME to LinuxGSM
+# PASSWORD to random password
+fn_set_config_vars(){
+	random=$(strings /dev/urandom | grep -o '[[:alnum:]]' | head -n 8 | tr -d '\n'; echo)
+	servername="LinuxGSM"
+	rconpass="admin$random"
 	echo "changing hostname."
 	fn_script_log_info "changing hostname."
-	sed -i "s/\"<hostname>\"/\"${servername}\"/g" "${servercfgfullpath}"
-	sleep 1
-	echo "changing rconpassword."
-	fn_script_log_info "changing rconpassword."
-	sed -i "s/\"<rconpassword>\"/\"${rconpass}\"/g" "${servercfgfullpath}"
-	sleep 1
-}
-
-fn_arma3config(){
-	fn_defaultconfig
-	echo "creating ${networkcfg} config file."
-	fn_script_log_info "creating ${networkcfg} config file."
-	cp -v "${networkcfgdefault}" "${networkcfgfullpath}"
-	sleep 1
-	echo ""
-}
-
-fn_goldsourceconfig(){
-	fn_defaultconfig
-
-	# server.cfg redirects to ${servercfg} for added security
-	echo "creating server.cfg."
-	fn_script_log_info "creating server.cfg."
-	touch "server.cfg"
-	sleep 1
-	echo "creating redirect."
-	fn_script_log_info "creating redirect."
-	echo "server.cfg > ${servercfg}."
-	echo "exec ${servercfg}" > "server.cfg"
-	sleep 1
-
-	# creating other files required
-	echo "creating listip.cfg."
-	fn_script_log_info "creating listip.cfg."
-	touch "${systemdir}/listip.cfg"
-	sleep 1
-	echo "creating banned.cfg."
-	fn_script_log_info "creating banned.cfg."
-	touch "${systemdir}/banned.cfg"
-	sleep 1
-
-	fn_userinputconfig
-	echo ""
-}
-
-fn_serious3config(){
-	fn_defaultconfig
-	echo ""
-	echo "To edit ${gamename} server config use SS3 Server GUI 3 tool"
-	echo "http://mrag.nl/sgui3/"
-	fn_script_log_info "To edit ${gamename} server config use SS3 Server GUI 3 tool"
-	fn_script_log_info "http://mrag.nl/sgui3/"
-	sleep 1
-	echo ""
-}
-
-fn_sourceconfig(){
-	fn_defaultconfig
-
-	# server.cfg redirects to ${servercfg} for added security
-	echo "creating server.cfg."
-	fn_script_log_info "creating server.cfg."
-	touch "server.cfg"
-	sleep 1
-	echo "creating redirect."
-	fn_script_log_info "creating redirect."
-	echo "server.cfg > ${servercfg}."
-	echo "exec ${servercfg}" > "server.cfg"
-	sleep 1
-
-	fn_userinputconfig
-	echo ""
-}
-
-fn_teeworldsconfig(){
-	fn_defaultconfig
-
-	echo "adding logfile location to config."
-	fn_script_log_info "adding logfile location to config."
-	sed -i "s@\"<logfile>\"@\"${gamelog}\"@g" "${servercfgfullpath}"
-	sleep 1
-	echo "removing password holder."
-	fn_script_log_info "removing password holder."
-	sed -i "s/<password>//" "${servercfgfullpath}"
-	sleep 1
-
-	fn_userinputconfig
-	echo ""
-}
-
-fn_ut99config(){
-	echo "creating ${servercfg} config file."
-	fn_script_log_info "creating ${servercfg} config file."
-	echo "${servercfgdefault} > ${servercfgfullpath}"
-	tr -d '\r' < "${servercfgdefault}" > "${servercfgfullpath}"
 	sleep 1
-	echo ""
-	echo "Configuring ${gamename} Server"
-	echo "================================="
+	sed -i "s/SERVERNAME/${servername}/g" "${servercfgfullpath}"
+	echo "changing rcon/admin password."
+	fn_script_log_info "changing rcon/admin password."
+	sed -i "s/ADMINPASSWORD/${rconpass}/g" "${servercfgfullpath}"
 	sleep 1
-	echo "enabling WebAdmin."
-	fn_script_log_info "enabling WebAdmin."
-	sed -i 's/bEnabled=False/bEnabled=True/g' "${servercfgfullpath}"
-	sleep 1
-	echo "setting WebAdmin port to 8076."
-	fn_script_log_info "setting WebAdmin port to 8076."
-	sed -i '467i\ListenPort=8076' "${servercfgfullpath}"
-	sleep 1
-	echo ""
 }
 
-fn_unreal2config(){
-	fn_defaultconfig
-	echo ""
-	echo "Configuring ${gamename} Server"
-	echo "================================="
-	sleep 1
-	echo "setting WebAdmin username and password."
-	fn_script_log_info "setting WebAdmin username and password."
-	sed -i 's/AdminName=/AdminName=admin/g' "${servercfgfullpath}"
-	sed -i 's/AdminPassword=/AdminPassword=admin/g' "${servercfgfullpath}"
-	sleep 1
-	echo "enabling WebAdmin."
-	fn_script_log_info "enabling WebAdmin."
-	sed -i 's/bEnabled=False/bEnabled=True/g' "${servercfgfullpath}"
-	if [ "${gamename}" == "Unreal Tournament 2004" ]; then
-		sleep 1
-		echo "setting WebAdmin port to 8075."
-		fn_script_log_info "setting WebAdmin port to 8075."
-		sed -i 's/ListenPort=80/ListenPort=8075/g' "${servercfgfullpath}"
+# Checks if cfg dir exists, creates it if it doesn't
+fn_check_cfgdir(){
+	if [ ! -d "${servercfgdir}" ]; then
+		echo "creating ${servercfgdir} config folder."
+		fn_script_log_info "creating ${servercfgdir} config folder."
+		mkdir -pv "${servercfgdir}"
 	fi
-	sleep 1
-	echo ""
 }
 
-fn_ut3config(){
-	echo ""
-	echo "Configuring ${gamename} Server"
-	echo "================================="
-	sleep 1
-	echo "setting ServerName to 'LinuxGSM UT3 Server'."
-	fn_script_log_info "setting ServerName to 'LinuxGSM UT3 Server'."
-	sleep 1
-	sed -i 's/ServerName=/ServerName=LinuxGSM UT3 Server/g' "${servercfgdir}/DefaultGame.ini"
-	echo "setting WebAdmin password to admin."
-	fn_script_log_info "setting WebAdmin password to admin."
-	echo '[Engine.AccessControl]' >> "${servercfgdir}/DefaultGame.ini"
-	echo 'AdminPassword=admin' >> "${servercfgdir}/DefaultGame.ini"
+# Copys the default configs from Game-Server-Configs repo to the
+# correct location
+fn_default_config_remote(){
+	for config in "${array_configs[@]}"
+	do
+		# every config is copied
+		echo "copying ${servercfg} config file."
+		fn_script_log_info "copying ${servercfg} config file."
+		if [ "${config}" == "${servercfgdefault}" ]; then
+			cp -v "${lgsmdir}/default-configs/${config}" "${servercfgfullpath}"
+		elif [ "${config}" == "${networkcfgdefault}" ]; then
+			# ARMA 3
+			cp -v "${lgsmdir}/default-configs/${config}" "${networkcfgfullpath}"
+		else
+			cp -v "${lgsmdir}/default-configs/${config}" "${servercfgdir}/${config}"
+		fi
+	done
 	sleep 1
-	echo "enabling WebAdmin."
-	fn_script_log_info "enabling WebAdmin."
-	sed -i 's/bEnabled=false/bEnabled=True/g' "${servercfgdir}/DefaultWeb.ini"
-	if [ "${gamename}" == "Unreal Tournament 3" ]; then
-		sleep 1
-		echo "setting WebAdmin port to 8081."
-		fn_script_log_info "setting WebAdmin port to 8081."
-		sed -i 's/ListenPort=80/ListenPort=8081/g' "${servercfgdir}/DefaultWeb.ini"
-	fi
-	sleep 1
-	echo ""
-}
-
-fn_unrealtournament(){
-	# allow user to input server name and password
-	if [ -z "${autoinstall}" ]; then
-		echo ""
-		echo "Configuring ${gamename} Server"
-		echo "================================="
-		sleep 1
-		read -p "Enter server name: " servername
-		read -p "Enter rcon password: " rconpass
-	else
-		servername="${servicename}"
-		rconpass="rconpassword"
-	fi
-	echo "changing hostname."
-	fn_script_log_info "changing hostname."
-	sed -i "s/\"<hostname>\"/\"${servername}\"/g" "${servercfgdir}/Game.ini"
-	sleep 1
-	echo "changing rconpassword."
-	fn_script_log_info "changing rconpassword."
-	sed -i "s/\"<rconpassword>\"/\"${rconpass}\"/g" "${servercfgdir}/Engine.ini"
-	sleep 1
-
 }
 
 echo ""
-if [ "${gamename}" != "Hurtworld" ]; then
-echo "Creating Configs"
+echo "Downloading ${gamename} Config"
 echo "================================="
-sleep 1
-	mkdir -pv "${servercfgdir}"
-	cd "${servercfgdir}"
-	githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}"
-fi
-
+echo "default configs from https://github.com/GameServerManagers/Game-Server-Configs"
+sleep 2
 if [ "${gamename}" == "7 Days To Die" ]; then
-	fn_defaultconfig
+	gamedirname="7DaysToDie"
+	array_configs+=( serverconfig.xml )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "ARK: Survivial Evolved" ]; then
-	wget -N /dev/null ${githuburl}/ARKSurvivalEvolved/cfg/lgsm-default.ini 2>&1 | grep -F HTTP | cut -c45- | uniq
-	sleep 1
-	echo -e "downloading lgsm-default.ini...\c"
-	fn_defaultconfig
+	gamedirname="ARKSurvivalEvolved"
+	array_configs+=( GameUserSettings.ini )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "ARMA 3" ]; then
-	echo -e "downloading lgsm-default.server.cfg...\c"
-	wget -N /dev/null ${githuburl}/Arma3/cfg/lgsm-default.server.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
-	sleep 1
-	echo -e "downloading lgsm-default.network.cfg...\c"
-	wget -N /dev/null ${githuburl}/Arma3/cfg/lgsm-default.network.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
-	sleep 1
-	fn_arma3config
+	gamedirname="Arma3"
+	fn_check_cfgdir
+	array_configs+=( server.cfg network.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
+elif [ "${gamename}" == "Battlefield: 1942" ]; then
+	gamedirname="Battlefield1942"
+	array_configs+=( serversettings.con )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
+elif [ "${gamename}" == "Blade Symphony" ]; then
+	gamedirname="BladeSymphony"
+	array_configs+=( server.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "BrainBread 2" ]; then
-	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N /dev/null ${githuburl}/BrainBread2/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
-	sleep 1
-	fn_sourceconfig
+	gamedirname="BrainBread2"
+	array_configs+=( server.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "Black Mesa: Deathmatch" ]; then
-	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N /dev/null ${githuburl}/BlackMesa/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
-	sleep 1
-	fn_sourceconfig
-elif [ "${gamename}" == "Blade Symphony" ]; then
-	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N /dev/null ${githuburl}/BladeSymphony/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
-	sleep 1
-	fn_goldsourceconfig
+	gamedirname="BlackMesa"
+	array_configs+=( server.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "Codename CURE" ]; then
-	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N /dev/null ${githuburl}/CodenameCURE/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
-	sleep 1
-	fn_sourceconfig
+	gamedirname="CodenameCURE"
+	array_configs+=( server.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "Counter-Strike 1.6" ]; then
-	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N /dev/null ${githuburl}/CounterStrike/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
-	sleep 1
-	fn_goldsourceconfig
+	gamedirname="CounterStrike"
+	array_configs+=( server.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "Counter-Strike: Condition Zero" ]; then
-	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N /dev/null ${githuburl}/CounterStrikeConditionZero/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
-	sleep 1
-	fn_goldsourceconfig
+	gamedirname="CounterStrikeConditionZero"
+	array_configs+=( server.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "Counter-Strike: Global Offensive" ]; then
-	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N /dev/null ${githuburl}/CounterStrikeGlobalOffensive/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
-	sleep 1
-	fn_sourceconfig
+	gamedirname="CounterStrikeGlobalOffensive"
+	array_configs+=( server.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "Counter-Strike: Source" ]; then
-	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N /dev/null ${githuburl}/CounterStrikeSource/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
-	sleep 1
-	fn_sourceconfig
+	gamedirname="CounterStrikeSource"
+	array_configs+=( server.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "Day of Defeat" ]; then
-	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N /dev/null ${githuburl}/DayOfDefeat/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
-	sleep 1
-	fn_goldsourceconfig
+	gamedirname="DayOfDefeat"
+	array_configs+=( server.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "Day of Defeat: Source" ]; then
-	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N /dev/null ${githuburl}/DayOfDefeatSource/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
-	sleep 1
-	fn_sourceconfig
+	gamedirname="DayOfDefeatSource"
+	array_configs+=( server.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "Day of Infamy" ]; then
-	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N /dev/null ${githuburl}/DayOfInfamy/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
-	sleep 1
-	fn_sourceconfig
+	gamedirname="DayOfInfamy"
+	array_configs+=( server.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
+elif [ "${gamename}" == "Deathmatch Classic" ]; then
+	gamedirname="DeathmatchClassic"
+	array_configs+=( server.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "Don't Starve Together" ]; then
-	echo -e "downloading lgsm-default.ini...\c"
-	wget -N /dev/null ${githuburl}/DontStarveTogether/cfg/lgsm-default.ini 2>&1 | grep -F HTTP | cut -c45- | uniq
-	sleep 1
-	fn_defaultconfig
+	gamedirname="DontStarveTogether"
+	array_configs+=( Settings.ini )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "Double Action: Boogaloo" ]; then
-	echo -e "downloading lgsm-default.cfg...\c"
-	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}" == "Enemy Territory" ]; then
-	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N /dev/null ${githuburl}/EnemyTerritory/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
-	sleep 1
-	fn_defaultconfig
-	fn_userinputconfig
-	echo ""
+	gamedirname="DoubleActionBoogaloo"
+	array_configs+=( server.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 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
-	sleep 1
-	fn_sourceconfig
+	gamedirname="FistfulofFrags"
+	array_configs+=( server.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "Garry's Mod" ]; then
-	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N /dev/null ${githuburl}/GarrysMod/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
-	sleep 1
-	fn_sourceconfig
+	gamedirname="GarrysMod"
+	array_configs+=( server.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "GoldenEye: Source" ]; then
-	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N /dev/null ${githuburl}/GoldenEyeSource/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
-	sleep 1
-	fn_sourceconfig
-elif [ "${gamename}" == "Half Life 2: Deathmatch" ]; then
-	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N /dev/null ${githuburl}/HalfLife2Deathmatch/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
-	sleep 1
-	fn_sourceconfig
+	gamedirname="GoldenEyeSource"
+	array_configs+=( server.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "Half Life: Deathmatch" ]; then
-	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N /dev/null ${githuburl}/HalfLifeDeathmatch/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
-	sleep 1
-	fn_goldsourceconfig
+	gamedirname="HalfLifeDeathmatch"
+	array_configs+=( server.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
+elif [ "${gamename}" == "Half-Life Deathmatch: Source" ]; then
+	gamedirname="HalfLifeDeathmatchSource"
+	array_configs+=( server.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
+elif [ "${gamename}" == "Half-Life: Opposing Force" ]; then
+	gamedirname="OpposingForce"
+	array_configs+=( server.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
+elif [ "${gamename}" == "Half Life 2: Deathmatch" ]; then
+	gamedirname="HalfLife2Deathmatch"
+	array_configs+=( server.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "Insurgency" ]; then
-	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N /dev/null ${githuburl}/Insurgency/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
-	sleep 1
-	fn_sourceconfig
+	gamedirname="Insurgency"
+	array_configs+=( server.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "Just Cause 2" ]; then
-	fn_defaultconfig
+	gamedirname="JustCause2"
+	array_configs+=( config.lua )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "Killing Floor" ]; then
-	fn_unreal2config
+	gamedirname="KillingFloor"
+	array_configs+=( Default.ini )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "Left 4 Dead" ]; then
-	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N /dev/null ${githuburl}/Left4Dead/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
-	sleep 1
-	fn_sourceconfig
+	gamedirname="Left4Dead"
+	array_configs+=( server.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
+elif [ "${gamename}" == "Left 4 Dead" ]; then
+	gamedirname="Left4Dead"
+	array_configs+=( server.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "Left 4 Dead 2" ]; then
-	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N /dev/null ${githuburl}/Left4Dead2/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
-	sleep 1
-	fn_sourceconfig
+	gamedirname="Left4Dead2"
+	array_configs+=( server.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "Minecraft" ]; then
-	echo -e "downloading lgsm-default.ini...\c"
-	wget -N /dev/null ${githuburl}/Minecraft/cfg/lgsm-default.ini 2>&1 | grep -F HTTP | cut -c45- | uniq
-	sleep 1
-	fn_defaultconfig
+	gamedirname="Minecraft"
+	array_configs+=( server.properties )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "No More Room in Hell" ]; then
-	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N /dev/null ${githuburl}/NoMoreRoomInHell/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
-	sleep 1
-	fn_sourceconfig
+	gamedirname="NoMoreRoominHell"
+	array_configs+=( server.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
+elif [ "${gamename}" == "Mumble" ]; then
+	:
 elif [ "${gamename}" == "Natural Selection 2" ]; then
-	echo -e "no configs required."
-	sleep 1
-	echo ""
+	:
+elif [ "${gamename}" == "NS2: Combat" ]; then
+	:
 elif [ "${gamename}" == "Pirates, Vikings, and Knights II" ]; then
-	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N /dev/null ${githuburl}/PiratesVikingandKnightsII/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
-	sleep 1
-	fn_sourceconfig
+	gamedirname="PiratesVikingandKnightsII"
+	array_configs+=( server.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "Project Zomboid" ]; then
-	echo -e "downloading lgsm-default.ini...\c"
-	wget -N /dev/null ${githuburl}/ProjectZomboid/cfg/lgsm-default.ini 2>&1 | grep -F HTTP | cut -c45- | uniq
-	sleep 1
-	fn_defaultconfig
-elif [ "${gamename}" == "Quake 3: Team Arena" ]; then
-	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N /dev/null ${githuburl}/Quake3/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
-	sleep 1
-	fn_defaultconfig
-	fn_userinputconfig
+	gamedirname="ProjectZomboid"
+	array_configs+=( server.ini )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "Quake Live" ]; then
-	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N /dev/null ${githuburl}/QuakeLive/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
-	sleep 1
-	fn_defaultconfig
-	fn_userinputconfig
+	gamedirname="QuakeLive"
+	array_configs+=( server.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "Red Orchestra: Ostfront 41-45" ]; then
-	fn_unreal2config
-elif [ "${gamename}" == "Serious Sam 3: BFE" ]; then
-	echo -e "downloading lgsm-default.ini...\c"
-	wget -N /dev/null ${githuburl}/SeriousSam3BFE/cfg/lgsm-default.ini 2>&1 | grep -F HTTP | cut -c45- | uniq
-	sleep 1
-	fn_serious3config
+	:
+elif [ "${gamename}" == "Ricochet" ]; then
+	gamedirname="Ricochet"
+	array_configs+=( server.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "Rust" ]; then
-	echo -e "downloading server.cfg...\c"
-	wget -N /dev/null  ${githuburl}/Rust/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
-	sleep 1
-	fn_defaultconfig
-elif [ "${gamename}" == "Sven Co-op" ]; then
-	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N /dev/null ${githuburl}/SvenCoop/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
-	sleep 1
-	fn_goldsourceconfig
+	gamedirname="Rust"
+	array_configs+=( server.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
+elif [ "${gamename}" == "Serious Sam 3: BFE" ]; then
+	gamedirname="SeriousSam3BFE"
+	array_configs+=( server.ini )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "Starbound" ]; then
-	echo -e "downloading lgsm-default.config...\c"
-	wget -N /dev/null ${githuburl}/Starbound/cfg/lgsm-default.config 2>&1 | grep -F HTTP | cut -c45- | uniq
-	sleep 1
-	fn_defaultconfig
-	fn_userinputconfig
-elif [ "${gamename}" == "TeamSpeak 3" ]; then
-	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
+	gamedirname="Starbound"
+	array_configs+=( starbound.config )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
+elif [ "${gamename}" == "Sven Co-op" ]; then
+	gamedirname="SvenCoop"
+	array_configs+=( server.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "Team Fortress 2" ]; then
-	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
-	sleep 1
-	fn_sourceconfig
+	gamedirname="TeamFortress2"
+	array_configs+=( server.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "Team Fortress Classic" ]; then
-	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N /dev/null ${githuburl}/TeamFortressClassic/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
-	sleep 1
-	fn_goldsourceconfig
+	gamedirname="TeamFortressClassic"
+	array_configs+=( server.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
+elif [ "${gamename}" == "TeamSpeak 3" ]; then
+	gamedirname="TeamSpeak3"
+	array_configs+=( ts3server.ini )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "Teeworlds" ]; then
-	echo -e "downloading ctf.cfg...\c"
-	wget -N /dev/null ${githuburl}/Teeworlds/cfg/ctf.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
-	echo -e "downloading dm.cfg...\c"
-	wget -N /dev/null ${githuburl}/Teeworlds/cfg/dm.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
-	echo -e "downloading duel.cfg...\c"
-	wget -N /dev/null ${githuburl}/Teeworlds/cfg/duel.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
-	echo -e "downloading tdm.cfg...\c"
-	wget -N /dev/null ${githuburl}/Teeworlds/cfg/tdm.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
-	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N /dev/null ${githuburl}/Teeworlds/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
-	sleep 1
-	fn_teeworldsconfig
+	gamedirname="Teeworlds"
+	array_configs+=( server.cfg ctf.cfg dm.cfg duel.cfg tdm.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "Terraria" ]; then
-	echo -e "downloading lgsm-default.txt...\c"
-	wget -N /dev/null ${githuburl}/Terraria/cfg/lgsm-default.txt 2>&1 | grep -F HTTP | cut -c45- | uniq
-	sleep 1
-	fn_defaultconfig
+	gamedirname="Terraria"
+	array_configs+=( serverconfig.txt )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "Unreal Tournament" ]; then
-	echo -e "downloading Engine.ini...\c"
-	wget -N /dev/null ${githuburl}/UnrealTournament/cfg/Engine.ini 2>&1 | grep -F HTTP | cut -c45- | uniq
-	echo -e "downloading Game.ini...\c"
-	wget -N /dev/null ${githuburl}/UnrealTournament/cfg/Game.ini 2>&1 | grep -F HTTP | cut -c45- | uniq
-	sleep 1
-	fn_unrealtournament
-elif [ "${gamename}" == "Unreal Tournament 3" ]; then
-	fn_ut3config
+	gamedirname="UnrealTournament"
+	array_configs+=( Game.ini Engine.ini )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "Unreal Tournament 2004" ]; then
-	fn_unreal2config
+	gamedirname="UnrealTournament2004"
+	array_configs+=( UT2004.ini )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
+elif [ "${gamename}" == "Unreal Tournament 3" ]; then
+	gamedirname="UnrealTournament3"
+	array_configs+=( UTGame.ini )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "Unreal Tournament 99" ]; then
-	fn_ut99config
+	gamedirname="UnrealTournament99"
+	array_configs+=( Default.ini )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
+elif [ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then
+	gamedirname="WolfensteinEnemyTerritory"
+	array_configs+=( server.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 fi

+ 11 - 7
lgsm/functions/install_server_files.sh

@@ -10,21 +10,25 @@ local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 
 fn_install_server_files(){
 	if [ "${gamename}" == "Unreal Tournament 99" ]; then
-		fileurl="http://files.gameservermanagers.com/UnrealTournament99/ut99-server-451-ultimate-linux.tar.bz2"; filedir="${lgsmdir}/tmp"; filename="ut99-server-451-ultimate-linux.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="49cb24d0550ff6ddeaba6007045c6edd"
+		fileurl="http://files.gameservermanagers.com/UnrealTournament99/ut99-server-451-ultimate-linux.tar.bz2"; filedir="${tmpdir}"; filename="ut99-server-451-ultimate-linux.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="49cb24d0550ff6ddeaba6007045c6edd"
 	elif [ "${gamename}" == "Unreal Tournament 2004" ]; then
-		fileurl="http://files.gameservermanagers.com/UnrealTournament2004/ut2004-server-3339-ultimate-linux.tar.bz2"; filedir="${lgsmdir}/tmp"; filename="ut2004-server-3339-ultimate-linux.tar.bz2";  executecmd="noexecute" run="norun"; force="noforce"; md5="67c5e2cd9c2a4b04f163962ee41eff54"
+		fileurl="http://files.gameservermanagers.com/UnrealTournament2004/ut2004-server-3339-ultimate-linux.tar.bz2"; filedir="${tmpdir}"; filename="ut2004-server-3339-ultimate-linux.tar.bz2";  executecmd="noexecute" run="norun"; force="noforce"; md5="67c5e2cd9c2a4b04f163962ee41eff54"
 	elif [ "${gamename}" == "Unreal Tournament 3" ]; then
-		fileurl="http://files.gameservermanagers.com/UnrealTournament3/UT3-linux-server-2.1.tar.bz2"; filedir="${lgsmdir}/tmp"; filename="UT3-linux-server-2.1.tar.bz2";  executecmd="noexecute" run="norun"; force="noforce"; md5="6c22fcef9e2e03ed154df97569af540c"
+		fileurl="http://files.gameservermanagers.com/UnrealTournament3/UT3-linux-server-2.1.tar.bz2"; filedir="${tmpdir}"; filename="UT3-linux-server-2.1.tar.bz2";  executecmd="noexecute" run="norun"; force="noforce"; md5="2527437b46f1b47f20228d27d72395a6"
 	elif [ "${gamename}" == "Battlefield: 1942" ]; then
-		fileurl="http://files.gameservermanagers.com/BattleField1942/bf1942_lnxded-1.61-hacked-to-1.612.full.tar.gz"; filedir="${lgsmdir}/tmp"; filename="bf1942_lnxded-1.61-hacked-to-1.612.full.tar.gz";  executecmd="noexecute" run="norun"; force="noforce"; md5="7e9d2538a62b228f2de7176b44659aa9"
-	elif [ "${gamename}" == "Enemy Territory" ]; then
-		fileurl="http://files.gameservermanagers.com/WolfensteinEnemyTerritory/enemy-territory.260b.tar.bz2"; filedir="${lgsmdir}/tmp"; filename="enemy-territory.260b.tar.gz";  executecmd="noexecute" run="norun"; force="noforce"; md5="ded32053e470fe15d9403ec4a0ab7e89"
+		fileurl="http://files.gameservermanagers.com/BattleField1942/bf1942_lnxded-1.61-hacked-to-1.612.full.tar.bz2"; filedir="${tmpdir}"; filename="bf1942_lnxded-1.61-hacked-to-1.612.full.tar.bz2";  executecmd="noexecute" run="norun"; force="noforce"; md5="a86a5d3cd64ca59abcc9bb9f777c2e5d"
+	elif [ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then
+		fileurl="http://files.gameservermanagers.com/WolfensteinEnemyTerritory/enemy-territory.260b.tar.bz2"; filedir="${tmpdir}"; filename="enemy-territory.260b.tar.bz2";  executecmd="noexecute" run="norun"; force="noforce"; md5="f833f514bfcdd46b42c111f83350c5a7"
 	elif [ "${gamename}" == "Unreal Tournament" ]; then
-		fileurl="http://files.gameservermanagers.com/UnrealTournament/UnrealTournament-Server-XAN-3045522-Linux.zip"; filedir="${lgsmdir}/tmp"; filename="UnrealTournament-Server-XAN-3045522-Linux.zip";  executecmd="noexecute" run="norun"; force="noforce"; md5="553fed5645a9fc623e92563049bf79f6"
+		fileurl="http://files.gameservermanagers.com/UnrealTournament/UnrealTournament-Server-XAN-3045522-Linux.zip"; filedir="${tmpdir}"; filename="UnrealTournament-Server-XAN-3045522-Linux.zip";  executecmd="noexecute" run="norun"; force="noforce"; md5="553fed5645a9fc623e92563049bf79f6"
 	elif [ "${gamename}" == "GoldenEye: Source" ]; then
+<<<<<<< HEAD
 		fileurl="http://files.gameservermanagers.com/GoldenEyeSource/GoldenEye_Source_v5.0.1_full_server_linux.tar.bz2"; filedir="${lgsmdir}/tmp"; filename="GoldenEye_Source_v5.0.1_server_full_Linux.tar.bz2";  executecmd="noexecute" run="norun"; force="noforce"; md5="254533d4643ad2fe6f1f3ecc4f6b5e5f"
 	elif [ "${gamename}" == "Quake 3: Team Arena" ]; then
 		fileurl="https://s3.amazonaws.com/linuxgsm/quake3-1.32b-x86-full-linux.tar.bz2"; filedir="${lgsmdir}/tmp"; filename="quake3-1.32b-x86-full-linux.tar.bz2";  executecmd="noexecute" run="norun"; force="noforce"; md5="8fe61809ade4f9cce24e520043afe91b"
+=======
+		fileurl="http://files.gameservermanagers.com/GoldenEyeSource/GoldenEye_Source_v5.0.1_full_server_linux.tar.bz2"; filedir="${tmpdir}"; filename="GoldenEye_Source_v5.0.1_server_full_Linux.tar.bz2";  executecmd="noexecute" run="norun"; force="noforce"; md5="ea227a150300abe346e757380325f84c"
+>>>>>>> refs/remotes/origin/master
 	fi
 	fn_fetch_file "${fileurl}" "${filedir}" "${filename}" "${executecmd}" "${run}" "${force}" "${md5}"
 	fn_dl_extract "${filedir}" "${filename}" "${filesdir}"

+ 2 - 0
lgsm/functions/monitor_gsquery.sh

@@ -29,6 +29,8 @@ if [ "${gsquery}" == "yes" ]; then
 		port=$((port + 1))
 	elif [ "${engine}" == "spark" ]; then
 		port=$((port + 1))
+	elif [ "${engine}" == "idtech3_ql" ]; then
+		engine="quakelive"
 	fi
 
 	if [ -n "${queryport}" ]; then

+ 2 - 2
lgsm/functions/update_minecraft.sh

@@ -9,10 +9,10 @@ local commandaction="Update"
 local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 
 fn_update_dl(){
-	fn_fetch_file "https://s3.amazonaws.com/Minecraft.Download/versions/${availablebuild}/minecraft_server.${availablebuild}.jar" "${lgsmdir}/tmp" "minecraft_server.${availablebuild}.jar"
+	fn_fetch_file "https://s3.amazonaws.com/Minecraft.Download/versions/${availablebuild}/minecraft_server.${availablebuild}.jar" "${tmpdir}" "minecraft_server.${availablebuild}.jar"
 	echo -e "copying to ${filesdir}...\c"
 	fn_script_log "Copying to ${filesdir}"
-	cp "${lgsmdir}/tmp/minecraft_server.${availablebuild}.jar" "${filesdir}/minecraft_server.jar"
+	cp "${tmpdir}/minecraft_server.${availablebuild}.jar" "${filesdir}/minecraft_server.jar"
 	local exitcode=$?
 	if [ ${exitcode} -eq 0 ]; then
 		fn_print_ok_eol_nl

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio