Daniel Gibbs 9 лет назад
Родитель
Сommit
c0768c89ff
88 измененных файлов с 487 добавлено и 198 удалено
  1. 1 1
      7DaysToDie/sdtdserver
  2. 1 1
      ARKSurvivalEvolved/arkserver
  3. 1 1
      Arma3/arma3server
  4. 1 1
      BallisticOverkill/boserver
  5. 1 1
      Battlefield1942/bf1942server
  6. 1 1
      BlackMesa/bmdmserver
  7. 1 1
      BladeSymphony/bsserver
  8. 1 1
      BrainBread2/bb2server
  9. 1 1
      CallOfDuty/codserver
  10. 1 1
      CallOfDuty2/cod2server
  11. 1 1
      CallOfDuty4/cod4server
  12. 1 1
      CallOfDutyUnitedOffensive/coduoserver
  13. 1 1
      CallOfDutyWorldAtWar/codwawserver
  14. 228 0
      ClassicOffensive/coserver
  15. 1 1
      CodenameCURE/ccserver
  16. 1 1
      CounterStrike/csserver
  17. 1 1
      CounterStrikeConditionZero/csczserver
  18. 1 1
      CounterStrikeGlobalOffensive/csgoserver
  19. 1 1
      CounterStrikeSource/cssserver
  20. 1 1
      DayOfDefeat/dodserver
  21. 1 1
      DayOfDefeatSource/dodsserver
  22. 1 1
      DayOfInfamy/doiserver
  23. 1 1
      DeathmatchClassic/dmcserver
  24. 1 1
      DontStarveTogether/dstserver
  25. 1 1
      DoubleActionBoogaloo/dabserver
  26. 1 1
      EmpiresMod/emserver
  27. 1 1
      Factorio/fctrserver
  28. 1 1
      FistfulOfFrags/fofserver
  29. 1 1
      GarrysMod/gmodserver
  30. 1 1
      GoldenEyeSource/gesserver
  31. 1 1
      HalfLife2Deathmatch/hl2dmserver
  32. 1 1
      HalfLifeDeathmatch/hldmserver
  33. 1 1
      HalfLifeDeathmatchSource/hldmsserver
  34. 1 1
      Hurtworld/hwserver
  35. 1 1
      Insurgency/insserver
  36. 1 1
      JustCause2/jc2server
  37. 1 1
      KillingFloor/kfserver
  38. 1 1
      Left4Dead/l4dserver
  39. 1 1
      Left4Dead2/l4d2server
  40. 1 1
      Minecraft/mcserver
  41. 2 2
      MultiTheftAuto/mtaserver
  42. 1 1
      Mumble/mumbleserver
  43. 1 1
      NS2Combat/ns2cserver
  44. 1 1
      NaturalSelection2/ns2server
  45. 1 1
      NoMoreRoomInHell/nmrihserver
  46. 1 1
      OpposingForce/opforserver
  47. 1 1
      PiratesVikingandKnightsII/pvkiiserver
  48. 1 1
      ProjectCars/pcserver
  49. 1 1
      ProjectZomboid/pzserver
  50. 1 1
      Quake2/q2server
  51. 1 1
      Quake3/q3server
  52. 1 1
      QuakeLive/qlserver
  53. 1 1
      QuakeWorld/qwserver
  54. 1 0
      README.md
  55. 1 1
      RedOrchestra/roserver
  56. 1 1
      Ricochet/ricochetserver
  57. 1 1
      Rust/rustserver
  58. 1 1
      SeriousSam3BFE/ss3sserver
  59. 1 1
      Starbound/sbserver
  60. 1 1
      SvenCoop/svenserver
  61. 1 1
      TeamFortress2/tf2server
  62. 1 1
      TeamFortressClassic/tfcserver
  63. 1 1
      TeamSpeak3/ts3server
  64. 1 1
      Teeworlds/twserver
  65. 1 1
      Terraria/terrariaserver
  66. 1 1
      TowerUnite/tuserver
  67. 1 1
      UnrealTournament/utserver
  68. 1 1
      UnrealTournament2004/ut2k4server
  69. 1 1
      UnrealTournament3/ut3server
  70. 1 1
      UnrealTournament99/ut99server
  71. 1 1
      WolfensteinEnemyTerritory/wetserver
  72. 24 2
      lgsm/functions/alert_pushbullet.sh
  73. 15 15
      lgsm/functions/check_deps.sh
  74. 35 50
      lgsm/functions/command_dev_detect_deps.sh
  75. 11 8
      lgsm/functions/command_dev_detect_glibc.sh
  76. 1 1
      lgsm/functions/command_fastdl.sh
  77. 21 8
      lgsm/functions/command_start.sh
  78. 1 1
      lgsm/functions/command_stop.sh
  79. 10 1
      lgsm/functions/command_validate.sh
  80. 3 3
      lgsm/functions/fix_glibc.sh
  81. 12 28
      lgsm/functions/gsquery.py
  82. 6 4
      lgsm/functions/info_distro.sh
  83. 19 1
      lgsm/functions/info_glibc.sh
  84. 6 0
      lgsm/functions/install_config.sh
  85. 12 2
      lgsm/functions/install_server_files.sh
  86. 10 2
      lgsm/functions/update_steamcmd.sh
  87. 1 1
      tests/tests_jc2server.sh
  88. 1 1
      tests/tests_ts3server.sh

+ 1 - 1
7DaysToDie/sdtdserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
ARKSurvivalEvolved/arkserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
Arma3/arma3server

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
BallisticOverkill/boserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
Battlefield1942/bf1942server

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
BlackMesa/bmdmserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
BladeSymphony/bsserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
BrainBread2/bb2server

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
CallOfDuty/codserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
CallOfDuty2/cod2server

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
CallOfDuty4/cod4server

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
CallOfDutyUnitedOffensive/coduoserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
CallOfDutyWorldAtWar/codwawserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 228 - 0
ClassicOffensive/coserver

@@ -0,0 +1,228 @@
+#!/bin/bash
+# Project: Game Server Managers - LinuxGSM
+# Author: Daniel Gibbs
+# License: MIT License, Copyright (c) 2017 Daniel Gibbs
+# Purpose: Classic Offensive | Server Management Script
+# Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors
+# Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki
+# Website: https://gameservermanagers.com
+
+# Debugging
+if [ -f ".dev-debug" ]; then
+	exec 5>dev-debug.log
+	BASH_XTRACEFD="5"
+	set -x
+fi
+
+version="170530"
+
+##########################
+######## Settings ########
+##########################
+
+#### Server Settings ####
+
+## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters
+# https://developer.valvesoftware.com/wiki/Counter-Strike:_Global_Offensive_Dedicated_Servers#Starting_the_Server
+# [Game Modes]				gametype		gamemode
+# Arms Race				1			0
+# Classic Casual			0			0
+# Classic Competitive			0			1
+# Demolition				1			1
+# Deathmatch				1			2
+gametype="0"
+gamemode="0"
+defaultmap="de_mirage"
+mapgroup="mg_active"
+maxplayers="16"
+tickrate="64"
+port="27015"
+sourcetvport="27020"
+clientport="27005"
+ip="0.0.0.0"
+
+## Required: Game Server Login Token
+# GSLT is required for running a public server.
+# More info: https://gameservermanagers.com/gslt
+gslt=""
+
+## Optional: Workshop Parameters
+# https://developer.valvesoftware.com/wiki/CSGO_Workshop_For_Server_Operators
+# To get an authkey visit - http://steamcommunity.com/dev/apikey
+# authkey=""
+# ws_collection_id=""
+# ws_start_map=""
+
+## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters
+fn_parms(){
+parms="-game csco -usercon -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} -tickrate ${tickrate} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers_override ${maxplayers} +mapgroup ${mapgroup} +game_mode ${gamemode} +game_type ${gametype} +host_workshop_collection ${ws_collection_id} +workshop_start_map ${ws_start_map} -authkey ${authkey}"
+}
+
+#### LinuxGSM Settings ####
+
+## Notification Alerts
+# (on|off)
+# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email
+emailalert="off"
+email="email@example.com"
+emailfrom=""
+
+# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet
+pushbulletalert="off"
+pushbullettoken="accesstoken"
+channeltag=""
+
+## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update
+updateonstart="off"
+
+## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup
+maxbackups="4"
+maxbackupdays="30"
+stoponbackup="on"
+
+## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging
+consolelogging="on"
+logdays="7"
+
+#### LinuxGSM Advanced Settings ####
+
+## SteamCMD Settings
+# Server appid
+appid="740"
+appid_co="600380"
+# Steam App Branch Select
+# Allows to opt into the various Steam app branches. Default branch is "".
+# Example: "-beta latest_experimental"
+branch=""
+
+## SteamCMD Login | https://github.com/GameServerManagers/LinuxGSM/wiki/SteamCMD#steamcmd-login
+steamuser="accountname"
+steampass='accountpassword'
+
+## Github Branch Select
+# Allows for the use of different function files
+# from a different repo and/or branch.
+githubuser="GameServerManagers"
+githubrepo="LinuxGSM"
+githubbranch="master"
+
+## LinuxGSM Server Details
+# Do not edit
+gamename="Classic Offensive"
+engine="source"
+
+## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers
+servicename="co-server"
+
+#### Directories ####
+# Edit with care
+
+## Work Directories
+rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))"
+selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
+lockselfname=".${servicename}.lock"
+lgsmdir="${rootdir}/lgsm"
+functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
+filesdir="${rootdir}/serverfiles"
+
+## Server Specific Directories
+systemdir="${filesdir}/csco"
+executabledir="${filesdir}"
+executable="./srcds_run"
+servercfg="${servicename}.cfg"
+servercfgdefault="server.cfg"
+servercfgdir="${systemdir}/cfg"
+servercfgfullpath="${servercfgdir}/${servercfg}"
+
+## Backup Directory
+backupdir="${rootdir}/backups"
+
+## Logging Directories
+gamelogdir="${systemdir}/logs"
+scriptlogdir="${rootdir}/log/script"
+consolelogdir="${rootdir}/log/console"
+scriptlog="${scriptlogdir}/${servicename}-script.log"
+consolelog="${consolelogdir}/${servicename}-console.log"
+emaillog="${scriptlogdir}/${servicename}-email.log"
+
+## Logs Naming
+scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log"
+consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log"
+
+########################
+######## Script ########
+###### Do not edit #####
+########################
+
+# Fetches core_dl for file downloads
+fn_fetch_core_dl(){
+github_file_url_dir="lgsm/functions"
+github_file_url_name="${functionfile}"
+filedir="${functionsdir}"
+filename="${github_file_url_name}"
+githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
+# If the file is missing, then download
+if [ ! -f "${filedir}/${filename}" ]; then
+	if [ ! -d "${filedir}" ]; then
+		mkdir -p "${filedir}"
+	fi
+	echo -e "    fetching ${filename}...\c"
+	# Check curl exists and use available path
+	curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)"
+	for curlcmd in ${curlpaths}
+	do
+		if [ -x "${curlcmd}" ]; then
+			break
+		fi
+	done
+	# If curl exists download file
+	if [ "$(basename ${curlcmd})" == "curl" ]; then
+		curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1)
+		if [ $? -ne 0 ]; then
+			echo -e "\e[0;31mFAIL\e[0m\n"
+			echo "${curlfetch}"
+			echo -e "${githuburl}\n"
+			exit 1
+		else
+			echo -e "\e[0;32mOK\e[0m"
+		fi
+	else
+		echo -e "\e[0;31mFAIL\e[0m\n"
+		echo "Curl is not installed!"
+		echo -e ""
+		exit 1
+	fi
+	chmod +x "${filedir}/${filename}"
+fi
+source "${filedir}/${filename}"
+}
+
+core_dl.sh(){
+# Functions are defined in core_functions.sh.
+functionfile="${FUNCNAME}"
+fn_fetch_core_dl
+}
+
+core_functions.sh(){
+# Functions are defined in core_functions.sh.
+functionfile="${FUNCNAME}"
+fn_fetch_core_dl
+}
+
+# Prevent from running this script as root.
+if [ "$(whoami)" = "root" ]; then
+	if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then
+		echo "[ FAIL ] Do NOT run this script as root!"
+		exit 1
+	else
+		core_functions.sh
+		check_root.sh
+	fi
+fi
+
+core_dl.sh
+core_functions.sh
+getopt=$1
+core_getopt.sh

+ 1 - 1
CodenameCURE/ccserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
CounterStrike/csserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
CounterStrikeConditionZero/csczserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
CounterStrikeGlobalOffensive/csgoserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
CounterStrikeSource/cssserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
DayOfDefeat/dodserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
DayOfDefeatSource/dodsserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
DayOfInfamy/doiserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
DeathmatchClassic/dmcserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
DontStarveTogether/dstserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
DoubleActionBoogaloo/dabserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
EmpiresMod/emserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
Factorio/fctrserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
FistfulOfFrags/fofserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
GarrysMod/gmodserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
GoldenEyeSource/gesserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
HalfLife2Deathmatch/hl2dmserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
HalfLifeDeathmatch/hldmserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
HalfLifeDeathmatchSource/hldmsserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
Hurtworld/hwserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
Insurgency/insserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
JustCause2/jc2server

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
KillingFloor/kfserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
Left4Dead/l4dserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
Left4Dead2/l4d2server

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
Minecraft/mcserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 2 - 2
MultiTheftAuto/mtaserver

@@ -12,7 +12,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########
@@ -57,7 +57,7 @@ logdays="7"
 # Github Branch Select
 # Allows for the use of different function files
 # from a different repo and/or branch.
-githubuser="dgibbs64"
+githubuser="GameServerManagers"
 githubrepo="linuxgsm"
 githubbranch="master"
 

+ 1 - 1
Mumble/mumbleserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
NS2Combat/ns2cserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
NaturalSelection2/ns2server

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
NoMoreRoomInHell/nmrihserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
OpposingForce/opforserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
PiratesVikingandKnightsII/pvkiiserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
ProjectCars/pcserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
ProjectZomboid/pzserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
Quake2/q2server

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
Quake3/q3server

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
QuakeLive/qlserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
QuakeWorld/qwserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 0
README.md

@@ -3,6 +3,7 @@
 
 [![Build Status](https://travis-ci.org/GameServerManagers/LinuxGSM.svg?branch=master)](https://travis-ci.org/GameServerManagers/LinuxGSM)
 [![Under Development](https://badge.waffle.io/GameServerManagers/LinuxGSM.svg?label=Under%20Development&title=Under%20Development)](http://waffle.io/GameServerManagers/LinuxGSM)
+[![Discord](https://discordapp.com/api/guilds/127498813903601664/widget.png?style=shield)](https://gameservermanagers.com/discord)
 
 The Linux Game Server Managers are command line tools for quick, simple deployment and management of various dedicated game servers and voice alert servers.
 

+ 1 - 1
RedOrchestra/roserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
Ricochet/ricochetserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
Rust/rustserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
SeriousSam3BFE/ss3sserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
Starbound/sbserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
SvenCoop/svenserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
TeamFortress2/tf2server

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
TeamFortressClassic/tfcserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
TeamSpeak3/ts3server

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
Teeworlds/twserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
Terraria/terrariaserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
TowerUnite/tuserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
UnrealTournament/utserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
UnrealTournament2004/ut2k4server

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
UnrealTournament3/ut3server

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
UnrealTournament99/ut99server

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
WolfensteinEnemyTerritory/wetserver

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 24 - 2
lgsm/functions/alert_pushbullet.sh

@@ -8,10 +8,32 @@ local commandname="ALERT"
 local commandaction="Alert"
 local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 
+# converts text to ascii then passes to curl. allowing special characters to be sent e.g %
+# http://stackoverflow.com/a/10660730
+fn_rawurlencode() {
+  local string="${1}"
+  local strlen=${#string}
+  local encoded=""
+  local pos c o
+
+  for (( pos=0 ; pos<strlen ; pos++ )); do
+     c=${string:$pos:1}
+     case "$c" in
+        [-_.~a-zA-Z0-9] ) o="${c}" ;;
+        * )               printf -v o '%%%02x' "'$c"
+     esac
+     encoded+="${o}"
+  done
+  echo "${encoded}"    # You can either set a return variable (FASTER)
+  REPLY="${encoded}"   #+or echo the result (EASIER)... or both... :p
+}
+
+pbalertbody=$(fn_rawurlencode "${alertbody}"; echo ${REPLY})
+pbalertsubject=$(fn_rawurlencode "${alertsubject}"; echo ${REPLY})
+
 fn_print_dots "Sending Pushbullet alert"
 sleep 1
-
-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)
+pushbulletsend=$(curl --silent -u """${pushbullettoken}"":" -d channel_tag="${channeltag}" -d type="note" -d body="${pbalertbody}" -d title="${pbalertsubject}" '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"

+ 15 - 15
lgsm/functions/check_deps.sh

@@ -18,10 +18,10 @@ fn_deps_detector(){
 		depstatus=0
 		deptocheck="${javaversion}"
 		unset javacheck
-	elif [ -n "$(command -v apt-get)" ]; then
+	elif [ -n "$(command -v apt-get 2>/dev/null)" ]; then
 		dpkg-query -W -f='${Status}' ${deptocheck} 2>/dev/null | grep -q -P '^install ok installed$'
 		depstatus=$?
-	elif [ -n "$(command -v yum)" ]; then
+	elif [ -n "$(command -v yum 2>/dev/null)" ]; then
 		yum -q list installed ${deptocheck} > /dev/null 2>&1
 		depstatus=$?
 	fi
@@ -56,15 +56,15 @@ fn_deps_email(){
 				array_deps_required+=( exim4 )
 			elif [ -d /etc/sendmail ]; then
 				array_deps_required+=( sendmail )
-			elif [ -n "$(command -v dpkg-query)" ]; then
+			elif [ -n "$(command -v dpkg-query 2>/dev/null)" ]; then
 				array_deps_required+=( mailutils postfix )
-			elif [ -n "$(command -v yum)" ]; then
+			elif [ -n "$(command -v yum 2>/dev/null)" ]; then
 				array_deps_required+=( mailx postfix )
 			fi
 		else
-			if [ -n "$(command -v dpkg-query)" ]; then
+			if [ -n "$(command -v dpkg-query 2>/dev/null)" ]; then
 				array_deps_required+=( mailutils postfix )
-			elif [ -n "$(command -v yum)" ]; then
+			elif [ -n "$(command -v yum 2>/dev/null)" ]; then
 				array_deps_required+=( mailx postfix )
 			fi
 		fi
@@ -89,10 +89,10 @@ fn_found_missing_deps(){
 			echo -en "...\r"
 			sleep 1
 			echo -en "   \r"
-			if [ -n "$(command -v dpkg-query)" ]; then
+			if [ -n "$(command -v dpkg-query 2>/dev/null)" ]; then
 				cmd="sudo dpkg --add-architecture i386; sudo apt-get update; sudo apt-get -y install ${array_deps_missing[@]}"
 				eval ${cmd}
-			elif [ -n "$(command -v yum)" ]; then
+			elif [ -n "$(command -v yum 2>/dev/null)" ]; then
 				cmd="sudo yum -y install ${array_deps_missing[@]}"
 				eval ${cmd}
 			fi
@@ -107,9 +107,9 @@ fn_found_missing_deps(){
 			echo ""
 			fn_print_warning_nl "$(whoami) does not have sudo access. Manually install dependencies."
 			fn_script_log_warn "$(whoami) does not have sudo access. Manually install dependencies."
-			if [ -n "$(command -v dpkg-query)" ]; then
+			if [ -n "$(command -v dpkg-query 2>/dev/null)" ]; then
 				echo "	sudo dpkg --add-architecture i386; sudo apt-get update; sudo apt-get install ${array_deps_missing[@]}"
-			elif [ -n "$(command -v yum)" ]; then
+			elif [ -n "$(command -v yum 2>/dev/null)" ]; then
 				echo "	sudo yum install ${array_deps_missing[@]}"
 			fi
 			echo ""
@@ -140,16 +140,16 @@ if [ "${function_selfname}" == "command_install.sh" ]; then
 fi
 
 # Check will only run if using apt-get or yum
-if [ -n "$(command -v dpkg-query)" ]; then
+if [ -n "$(command -v dpkg-query 2>/dev/null)" ]; then
 	# Generate array of missing deps
 	array_deps_missing=()
 
 	# LinuxGSM requirements
-	array_deps_required=( curl wget ca-certificates file bsdmainutils util-linux python bzip2 gzip unzip )
+	array_deps_required=( curl wget ca-certificates file bsdmainutils util-linux python bzip2 gzip unzip binutils )
 
 	# All servers except ts3 require tmux
 	if [ "${gamename}" != "TeamSpeak 3" ]; then
-		if [ "$(command -v tmux)" ]||[ "$(which tmux 2>/dev/null)" ]||[ -f "/usr/bin/tmux" ]||[ -f "/bin/tmux" ]; then
+		if [ "$(command -v tmux 2>/dev/null)" ]||[ "$(which tmux 2>/dev/null)" ]||[ -f "/usr/bin/tmux" ]||[ -f "/bin/tmux" ]; then
 			tmuxcheck=1 # Added for users compiling tmux from source to bypass check.
 		else
 			array_deps_required+=( tmux )
@@ -219,7 +219,7 @@ if [ -n "$(command -v dpkg-query)" ]; then
 	fn_deps_email
 	fn_check_loop
 
-elif [ -n "$(command -v yum)" ]; then
+elif [ -n "$(command -v yum 2>/dev/null)" ]; then
 	# Generate array of missing deps
 	array_deps_missing=()
 
@@ -232,7 +232,7 @@ elif [ -n "$(command -v yum)" ]; then
 
 	# All servers except ts3 require tmux
 	if [ "${gamename}" != "TeamSpeak 3" ]; then
-		if [ "$(command -v tmux)" ]||[ "$(which tmux 2>/dev/null)" ]||[ -f "/usr/bin/tmux" ]||[ -f "/bin/tmux" ]; then
+		if [ "$(command -v tmux 2>/dev/null)" ]||[ "$(which tmux 2>/dev/null)" ]||[ -f "/usr/bin/tmux" ]||[ -f "/bin/tmux" ]; then
 			tmuxcheck=1 # Added for users compiling tmux from source to bypass check.
 		else
 			array_deps_required+=( tmux )

+ 35 - 50
lgsm/functions/command_dev_detect_deps.sh

@@ -8,63 +8,49 @@ local commandname="DEPS-DETECT"
 local commandaction="Deps-Detect"
 local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 
-check.sh
-cd "${executabledir}"
-if [ "${executable}" ==  "./hlds_run" ]; then
-	executable=hlds_linux
-elif [ "${executable}" ==  "./srcds_run" ]||[ "${executable}" ==  "./dabds.sh" ]||[ "${executable}" ==  "./srcds_run.sh" ]; then
-	executable=srcds_linux
-elif [ "${executable}" ==  "./server_linux32" ]; then
-	executable=libSpark_Core.so
-elif [ "${executable}" ==  "./runSam3_DedicatedServer.sh" ]; then
-	executable=Sam3_DedicatedServer
-elif [ "${executable}" ==  "./7DaysToDie.sh" ]; then
-	executable=7DaysToDie.x86
-elif [ "${executable}" ==  "./ucc-bin" ]; then
-
-	if [ -f "${executabledir}/ucc-bin-real" ]; then
-		executable=ucc-bin-real
-	elif [ -f "${executabledir}/ut2004-bin" ]; then
-		executable=ut2004-bin
-	else
-		executable=ut-bin
-	fi
-
-elif [ "${executable}" ==  "./ts3server_startscript.sh" ]; then
-	executable=ts3server_linux_amd64
-fi
-
-if [ "$(command -v eu-readelf)" ]; then
+echo "================================="
+echo "Dependencies Checker"
+echo "================================="
+echo "Checking directory: "
+echo "${filesdir}"
+if [ "$(command -v eu-readelf 2>/dev/null)" ]; then
 	readelf=eu-readelf
-elif [ "$(command -v readelf)" ]; then
+elif [ "$(command -v readelf 2>/dev/null)" ]; then
 	readelf=readelf
 else
 	echo "readelf/eu-readelf not installed"
 fi
+files=$(find ${filesdir} | wc -l)
+find "${filesdir}" -type f -print0 |
+while IFS= read -r -d $'\0' line; do
+	if [ "${readelf}" == "eu-readelf" ];then
+		${readelf} -d "${line}" 2>/dev/null|grep NEEDED|awk '{ print $4 }'|sed 's/\[//g;s/\]//g' >> "${tmpdir}/.depdetect_readelf"
+	else
+		${readelf} -d "${line}" 2>/dev/null|grep NEEDED|awk '{ print $5 }'|sed 's/\[//g;s/\]//g' >> "${tmpdir}/.depdetect_readelf"
+	fi
+	echo -n "${i} / ${files}" $'\r'
+	((i++))
+done
 
-${readelf} -d ${executable} |grep NEEDED|awk '{ print $5 }'|sed 's/\[//g'|sed 's/\]//g' > "${tmpdir}/.depdetect_readelf"
-
+sort "${tmpdir}/.depdetect_readelf" |uniq >"${tmpdir}/.depdetect_readelf_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
+	if [ "${lib}" == "libm.so.6" ]||[ "${lib}" == "libc.so.6" ]||[ "${lib}" == "libtcmalloc_minimal.so.4" ]||[ "${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" >> "${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" >> "${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" >> "${tmpdir}/.depdetect_centos_list"
 		echo "libstdc++5:i386" >> "${tmpdir}/.depdetect_ubuntu_list"
 		echo "libstdc++5:i386" >> "${tmpdir}/.depdetect_debian_list"
-
+	elif [ "${lib}" == "libcurl-gnutls.so.4" ]; then
+		echo "libcurl.i686" >> "${tmpdir}/.depdetect_centos_list"
+		echo "libcurl4-gnutls-dev:i386" >> "${tmpdir}/.depdetect_ubuntu_list"
+		echo "libcurl4-gnutls-dev:i386" >> "${tmpdir}/.depdetect_debian_list"
 	elif [ "${lib}" == "libspeex.so.1" ]||[ "${lib}" == "libspeexdsp.so.1" ]; then
 		echo "speex.i686" >> "${tmpdir}/.depdetect_centos_list"
 		echo "speex:i386" >> "${tmpdir}/.depdetect_ubuntu_list"
@@ -80,14 +66,17 @@ while read lib; do
 		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
+	elif [ "${lib}" == "libtier0.so" ]||[ "${lib}" == "libtier0_srv.so" ]||[ "${lib}" == "libvstdlib_srv.so" ]||[ "${lib}" == "Core.so" ]||[ "${lib}" == "libvstdlib.so" ]||[ "${lib}" == "libtier0_s.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}" >> "${tmpdir}/.depdetect_unknown"
 	fi
-done < "${tmpdir}/.depdetect_readelf"
+
+done < "${tmpdir}/.depdetect_readelf_uniq"
+
+
 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"
@@ -95,10 +84,10 @@ if [ "${unknownlib}" == "1" ]; then
 	sort "${tmpdir}/.depdetect_unknown" | uniq >> "${tmpdir}/.depdetect_unknown_uniq"
 fi
 
-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"
-
+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 ""
 echo "Required Dependencies"
 echo "================================="
@@ -128,10 +117,6 @@ echo ""
 echo "Required Librarys"
 echo "================================="
 sort "${tmpdir}/.depdetect_readelf" |uniq
-echo ""
-echo "ldd"
-echo "================================="
-ldd ${executable}
 echo -en "\n"
 rm -f "${tmpdir}/.depdetect_centos_line"
 rm -f "${tmpdir}/.depdetect_centos_list"
@@ -146,8 +131,8 @@ rm -f "${tmpdir}/.depdetect_ubuntu_list"
 rm -f "${tmpdir}/.depdetect_ubuntu_list_uniq"
 
 rm -f "${tmpdir}/.depdetect_readelf"
-
+rm -f "${tmpdir}/.depdetect_readelf_uniq"
 rm -f "${tmpdir}/.depdetect_unknown"
 rm -f "${tmpdir}/.depdetect_unknown_uniq"
 
-core_exit.sh
+core_exit.sh

+ 11 - 8
lgsm/functions/command_dev_detect_glibc.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# command_dev_detect_glibc.sh function
+# LinuxGSM command_dev_detect_glibc.sh function
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
 # Description: Automatically detects the version of GLIBC that is required.
@@ -15,10 +15,6 @@ if [ -z "$(command -v objdump)" ]; then
 	core_exit.sh
 fi
 
-if [ -z "${filesdir}" ]; then
-	dir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))"
-fi
-
 if [ -d "${filesdir}" ]; then
 	echo "Checking directory: "
 	echo "${filesdir}"
@@ -29,14 +25,21 @@ fi
 echo ""
 
 files=$(find ${filesdir} | wc -l)
-find ${filesdir} -type f -print0 |
+find "${filesdir}" -type f -print0 |
 while IFS= read -r -d $'\0' line; do
-	objdump -T $line 2>/dev/null|grep -oP "GLIBC[^ ]+" >>"${tmpdir}/detect_glibc.tmp"
-	echo -n "$i / $files" $'\r'
+	glibcversion=$(objdump -T "${line}" 2>/dev/null|grep -oP "GLIBC[^ ]+" |grep -v GLIBCXX|sort|uniq|sort -r --version-sort| head -n 1)
+	if [ "${glibcversion}" ];then
+		echo "${glibcversion}: ${line}" >>"${tmpdir}/detect_glibc_files.tmp"
+	fi
+	objdump -T "${line}" 2>/dev/null|grep -oP "GLIBC[^ ]+" >>"${tmpdir}/detect_glibc.tmp"
+	echo -n "${i} / ${files}" $'\r'
 	((i++))
 done
 echo ""
+cat "${tmpdir}/detect_glibc_files.tmp"
+echo ""
 cat "${tmpdir}/detect_glibc.tmp"|sort|uniq|sort -r --version-sort
 rm "${tmpdir}/detect_glibc.tmp"
+rm "${tmpdir}/detect_glibc_files.tmp"
 
 core_exit.sh

+ 1 - 1
lgsm/functions/command_fastdl.sh

@@ -23,7 +23,7 @@ luafastdlfile="lgsm_cl_force_fastdl.lua"
 luafastdlfullpath="${luasvautorundir}/${luafastdlfile}"
 
 # Check if bzip2 is installed
-if [ -z "$(command -v bzip2)" ]; then
+if [ -z "$(command -v bzip2 2>/dev/null)" ]; then
 	fn_print_fail "bzip2 is not installed"
 	fn_script_log_fatal "bzip2 is not installed"
 	core_exit.sh

+ 21 - 8
lgsm/functions/command_start.sh

@@ -31,8 +31,9 @@ fn_start_teamspeak3(){
 		fn_script_log_error "${servername} is already running"
 		core_exit.sh
 	fi
-
-	mv "${scriptlog}" "${scriptlogdate}"
+	if [ -f "${scriptlog}" ]; then
+		mv "${scriptlog}" "${scriptlogdate}"
+	fi
 	# Create lockfile
 	date > "${rootdir}/${lockselfname}"
 	cd "${executabledir}"
@@ -57,6 +58,18 @@ fn_start_teamspeak3(){
 fn_start_tmux(){
 	fn_parms
 
+	# check for tmux size variables
+	if [[ "${servercfgtmuxwidth}" =~ ^[0-9]+$ ]]; then
+		sessionwidth="${servercfgtmuxwidth}"
+	else
+		sessionwidth="80"
+	fi
+	if [[ "${servercfgtmuxheight}" =~ ^[0-9]+$ ]]; then
+		sessionheight="${servercfgtmuxheight}"
+	else
+		sessionheight="23"
+	fi
+
 	# Log rotation
 	check_status.sh
 	if [ "${status}" == "0" ]; then
@@ -81,16 +94,16 @@ fn_start_tmux(){
 	# Create lockfile
 	date > "${rootdir}/${lockselfname}"
 	cd "${executabledir}"
-	tmux new-session -d -s "${servicename}" "${executable} ${parms}" 2> "${scriptlogdir}/.${servicename}-tmux-error.tmp"
+	tmux new-session -d -x "${sessionheight}" -y "${sessionwidth}" -s "${servicename}" "${executable} ${parms}" 2> "${scriptlogdir}/.${servicename}-tmux-error.tmp"
 
 	# tmux pipe-pane not supported in tmux versions < 1.6
-	if [ "$(tmux -V|sed "s/tmux //"|sed -n '1 p'|tr -cd '[:digit:]')" -lt "16" ]; then
+	if [ "$(tmux -V|sed "s/tmux //"|sed -n '1 p'|tr -cd '[:digit:]')" -lt "16" ] 2>/dev/null; then # Tmux compiled from source will not return a number, therefore bypass this check and trash the error
 		echo "Console logging disabled: Tmux => 1.6 required
 		https://gameservermanagers.com/tmux-upgrade
 		Currently installed: $(tmux -V)" > "${consolelog}"
 
 	# Console logging disabled: Bug in tmux 1.8 breaks logging
-	elif [ "$(tmux -V|sed "s/tmux //"|sed -n '1 p'|tr -cd '[:digit:]')" -eq "18" ]; then
+	elif [ "$(tmux -V|sed "s/tmux //"|sed -n '1 p'|tr -cd '[:digit:]')" -eq "18" ] 2>/dev/null; then
 		echo "Console logging disabled: Bug in tmux 1.8 breaks logging
 		https://gameservermanagers.com/tmux-upgrade
 		Currently installed: $(tmux -V)" > "${consolelog}"
@@ -126,7 +139,7 @@ fn_start_tmux(){
 			echo "================================="
 			cat "${scriptlogdir}/.${servicename}-tmux-error.tmp" | tee -a "${scriptlog}"
 
-			# Detected error https://gameservermanagers.com/issues
+			# Detected error https://gameservermanagers.com/support
 			if [ $(grep -c "Operation not permitted" "${scriptlogdir}/.${servicename}-tmux-error.tmp") ]; then
 			echo ""
 			echo "Fix"
@@ -148,8 +161,8 @@ fn_start_tmux(){
 				else
 					echo "No known fix currently. Please log an issue."
 					fn_script_log_info "No known fix currently. Please log an issue."
-					echo "https://gameservermanagers.com/issues"
-					fn_script_log_info "https://gameservermanagers.com/issues"
+					echo "https://gameservermanagers.com/support"
+					fn_script_log_info "https://gameservermanagers.com/support"
 				fi
 			fi
 		fi

+ 1 - 1
lgsm/functions/command_stop.sh

@@ -113,7 +113,7 @@ fn_stop_graceful_sdtd(){
 	sleep 1
 	if [ "${telnetenabled}" == "false" ]; then
 		fn_print_info_nl "Graceful: telnet: DISABLED: Enable in ${servercfg}"
-	elif [ "$(command -v expect)" ]||[ "$(which expect >/dev/null 2>&1)" ]; then
+	elif [ "$(command -v expect 2>/dev/null)" ]||[ "$(which expect >/dev/null 2>&1)" ]; then
 		# Tries to shutdown with both localhost and server IP.
 		for telnetip in 127.0.0.1 ${ip}; do
 			fn_print_dots "Graceful: telnet: ${telnetip}"

+ 10 - 1
lgsm/functions/command_validate.sh

@@ -9,6 +9,7 @@ local commandaction="Validate"
 local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 
 fn_validation(){
+	appid="${1}"
 	echo ""
 	echo -e "	* Validating may overwrite some customised files."
 	echo -en "	* https://developer.valvesoftware.com/wiki/SteamCMD#Validate"
@@ -51,10 +52,18 @@ check_status.sh
 if [ "${status}" != "0" ]; then
 	exitbypass=1
 	command_stop.sh
-	fn_validation
+	fn_validation "${appid}"
+	# will also check for second appid
+	if [ "${gamename}" == "Classic Offensive" ]; then
+		fn_validation "${appid_co}"
+	fi
 	exitbypass=1
 	command_start.sh
 else
 	fn_validation
+	# will also check for second appid
+	if [ "${gamename}" == "Classic Offensive" ]; then
+		fn_validation "${appid_co}"
+	fi
 fi
 core_exit.sh

+ 3 - 3
lgsm/functions/fix_glibc.sh

@@ -11,7 +11,7 @@ local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 ## i386
 
 # libstdc++.so.6
-local libstdc_servers_array=( "ARMA 3" "Blade Symphony" "Garry's Mod" "GoldenEye: Source" "Just Cause 2" )
+local libstdc_servers_array=( "ARMA 3" "Blade Symphony" "Counter-Strike: Global Offensive" "Garry's Mod" "GoldenEye: Source" "Just Cause 2" "Team Fortress 2" )
 for libstdc_server in "${libstdc_servers_array[@]}"
 do
 	if [ "${gamename}" == "${libstdc_server}" ]; then
@@ -20,7 +20,7 @@ do
 done
 
 # libm.so.6
-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" )
+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" "Pirates, Vikings, and Knights II" "Team Fortress 2" )
 for libm_server in "${libm_servers_array[@]}"
 do
 	if [ "${gamename}" == "${libm_server}" ]; then
@@ -29,7 +29,7 @@ do
 done
 
 # libc.so.6
-local libc_servers_array=( "Black Mesa: Deathmatch" "Blade Symphony" "Garry's Mod" "GoldenEye: Source" )
+local libc_servers_array=( "Black Mesa: Deathmatch" "Blade Symphony" "Garry's Mod" "GoldenEye: Source" "Team Fortress 2" )
 for libc_server in "${libc_servers_array[@]}"
 do
 	if [ "${gamename}" == "${libc_server}" ]; then

+ 12 - 28
lgsm/functions/gsquery.py

@@ -1,16 +1,15 @@
 #! /usr/bin/env python
 # -*- coding: utf-8 -*-
-# Game Server Query
+# PythonGSQ
 # Author: Anonymous & Daniel Gibbs
 # Website: https://gameservermanagers.com
-# Description: Handles querying of .
+# Description: Allows querying of various game servers.
 
 import optparse
 import socket
 import sys
 
-
-class GameServer:
+class PythonGSQ:
     def __init__(self, options, arguments):
         self.option = options
         self.argument = arguments
@@ -18,32 +17,17 @@ class GameServer:
         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':
+        sourcequery=['quakelive','realvirtuality','refractor','source','goldsource','spark','unity3d']
+        idtech2query=['idtech3','quake','iw3.0']
+        idtech3query=['idtech2','iw2.0']
+        if self.option.engine in sourcequery:
             self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0'
-        elif self.option.engine == 'idtech2':
+        elif self.option.engine in idtech2query:
             self.query_prompt_string = b'\xff\xff\xff\xffstatus\x00'
-        elif self.option.engine == 'idtech3':
-            self.query_prompt_string = b'\xff\xff\xff\xffgetstatus'
-        elif self.option.engine == 'iw2.0':
+        elif self.option.engine in idtech3query:
             self.query_prompt_string = b'\xff\xff\xff\xffgetstatus'
-        elif self.option.engine == 'iw3.0':
-            self.query_prompt_string = b'\xff\xff\xff\xffgetstatus'
-        elif self.option.engine == 'quake':
-            self.query_prompt_string = b'\xff\xff\xff\xffstatus\x00'
-        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 == 'avalanche':
+            self.query_prompt_string = b'\xFE\xFD\x09\x10\x20\x30\x40'
         elif self.option.engine == 'unreal':
             self.query_prompt_string = b'\x5C\x69\x6E\x66\x6F\x5C'
         elif self.option.engine == 'unreal2':
@@ -135,5 +119,5 @@ if __name__ == '__main__':
     )
     options, arguments = parser.parse_args()
     #
-    server = GameServer(options, arguments)
+    server = PythonGSQ(options, arguments)
     server.responding()

+ 6 - 4
lgsm/functions/info_distro.sh

@@ -37,12 +37,14 @@ glibcversion="$(ldd --version | sed -n '1s/.* //p')"
 
 ## tmux version
 # e.g: tmux 1.6
-if [ -z "$(command -v tmux)" ]; then
+if [ -z "$(command -V tmux 2>/dev/null)" ]; then
 	tmuxv="${red}NOT INSTALLED!${default}"
-elif [ "$(tmux -V|sed "s/tmux //" | sed -n '1 p' | tr -cd '[:digit:]')" -lt "16" ]; then
-	tmuxv="$(tmux -V) (>= 1.6 required for console log)"
 else
-	tmuxv=$(tmux -V)
+	if [ "$(tmux -V|sed "s/tmux //" | sed -n '1 p' | tr -cd '[:digit:]')" -lt "16" ] 2>/dev/null; then
+		tmuxv="$(tmux -V) (>= 1.6 required for console log)"
+	else
+		tmuxv=$(tmux -V)
+	fi
 fi
 
 ## Uptime

+ 19 - 1
lgsm/functions/info_glibc.sh

@@ -35,6 +35,12 @@ elif [ "${gamename}" == "Call of Duty 4" ]; then
 elif [ "${gamename}" == "Call of Duty: World at War" ]; then
 	glibcrequired="2.3.2"
 	glibcfix="no"
+elif [ "${gamename}" == "Codename CURE" ]; then
+	glibcrequired="2.15"
+	glibcfix="yes"
+elif [ "${gamename}" == "Counter-Strike: Global Offensive" ]; then
+	glibcrequired="2.15"
+	glibcfix="yes"
 elif [ "${gamename}" == "Day of Infamy" ]; then
 	glibcrequired="2.15"
 	glibcfix="yes"
@@ -68,6 +74,9 @@ elif [ "${gamename}" == "No More Room in Hell" ]; then
 elif [ "${gamename}" == "Project Cars" ]; then
 	glibcrequired="2.4"
 	glibcfix="no"
+elif [ "${gamename}" == "Pirates, Vikings, and Knights II" ]; then
+	glibcrequired="2.15"
+	glibcfix="yes"
 elif [ "${gamename}" == "Quake 2" ]; then
 	glibcrequired="NOT REQUIRED"
 	glibcfix="no"
@@ -80,6 +89,9 @@ elif [ "${gamename}" == "Quake Live" ]; then
 elif [ "${gamename}" == "Sven Co-op" ]; then
 	glibcrequired="2.18"
 	glibcfix="no"
+elif [ "${gamename}" == "Team Fortress 2" ]; then
+	glibcrequired="2.15"
+	glibcfix="yes"
 elif [ "${gamename}" == "TeamSpeak 3" ]; then
 	glibcrequired="NOT REQUIRED"
 	glibcfix="no"
@@ -104,9 +116,12 @@ elif [ "${engine}" == "realvirtuality" ]; then
 elif [ "${engine}" == "seriousengine35" ]; then
 	glibcrequired="2.13"
 	glibcfix="yes"
-elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
+elif [ "${engine}" == "source" ]; then
 	glibcrequired="2.3.6"
 	glibcfix="no"
+elif [ "${engine}" == "goldsource" ]; then
+	glibcrequired="2.3.4"
+	glibcfix="no"
 elif [ "${engine}" == "spark" ]; then
 	glibcrequired="2.15"
 	glibcfix="yes"
@@ -134,6 +149,9 @@ elif [ "${engine}" == "unreal4" ]; then
 elif [ "${engine}" == "unity3d" ]; then
 	glibcrequired="2.15"
 	glibcfix="no"
+elif [ "${engine}" == "Team Fortress 2" ]; then
+	glibcrequired="2.15"
+	glibcfix="yes"
 elif [ "${gamename}" == "TeamSpeak 3" ]; then
 	glibcrequired="NOT REQUIRED"
 	glibcfix="no"

+ 6 - 0
lgsm/functions/install_config.sh

@@ -228,6 +228,12 @@ elif [ "${gamename}" == "Counter-Strike: Global Offensive" ]; then
 	fn_fetch_default_config
 	fn_default_config_remote
 	fn_set_config_vars
+elif [ "${gamename}" == "Classic Offensive" ]; then
+	gamedirname="ClassicOffensive"
+	array_configs+=( server.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "Counter-Strike: Source" ]; then
 	gamedirname="CounterStrikeSource"
 	array_configs+=( server.cfg )

+ 12 - 2
lgsm/functions/install_server_files.sh

@@ -34,7 +34,7 @@ fn_install_server_files(){
 	elif [ "${gamename}" == "Unreal Tournament 99" ]; then
 		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" ]; then
-		fileurl="https://s3.amazonaws.com/unrealtournament/UnrealTournament-Server-XAN-3270765-Linux.zip"; filedir="${tmpdir}"; filename="UnrealTournament-Server-XAN-3270765-Linux.zip";  executecmd="noexecute" run="norun"; force="noforce"; md5="8791dc087383061d7f7f9f523237b8b3"
+		fileurl="https://s3.amazonaws.com/unrealtournament/UnrealTournament-Server-XAN-3395761-Linux.zip"; filedir="${tmpdir}"; filename="UnrealTournament-Server-XAN-3395761-Linux.zip";  executecmd="noexecute" run="norun"; force="noforce"; md5="f04ad5b96865b19613303331ff4075eb"
 	elif [ "${gamename}" == "Unreal Tournament 3" ]; then
 		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}" == "Wolfenstein: Enemy Territory" ]; then
@@ -72,7 +72,7 @@ fn_install_server_files_steamcmd(){
 
 			# Detects if unbuffer command is available for 32 bit distributions only.
 			info_distro.sh
-			if [ $(command -v stdbuf) ]&&[ "${arch}" != "x86_64" ]; then
+			if [ $(command -v stdbuf 2>/dev/null) ]&&[ "${arch}" != "x86_64" ]; then
 				unbuffer="stdbuf -i0 -o0 -e0"
 			fi
 
@@ -83,6 +83,11 @@ fn_install_server_files_steamcmd(){
 				else
 					${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" ${branch} +quit
 					local exitcode=$?
+
+					if [ "${gamename}" == "Classic Offensive" ]; then
+						${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid_co}" ${branch} +quit
+						local exitcode=$?
+					fi
 				fi
 			elif [ "${counter}" -ge "5" ]; then
 				if [ "${engine}" == "goldsource" ]; then
@@ -91,6 +96,11 @@ fn_install_server_files_steamcmd(){
 				else
 					${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" ${branch} -validate +quit
 					local exitcode=$?
+
+					if [ "${gamename}" == "Classic Offensive" ]; then
+						${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid_co}" ${branch} -validate +quit
+						local exitcode=$?
+					fi
 				fi
 			fi
 		elif [ "${counter}" -ge "11" ]; then

+ 10 - 2
lgsm/functions/update_steamcmd.sh

@@ -29,6 +29,10 @@ fn_update_steamcmd_dl(){
 		${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" ${branch} +quit | tee -a "${scriptlog}"
 	else
 		${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" ${branch} +quit | tee -a "${scriptlog}"
+
+		if [ "${gamename}" == "Classic Offensive" ]; then
+			${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid_co}" ${branch} +quit | tee -a "${scriptlog}"
+		fi
 	fi
 
 	fix.sh
@@ -136,6 +140,7 @@ fn_update_request_log(){
 }
 
 fn_update_steamcmd_check(){
+	appid="${1}"
 	fn_appmanifest_check
 	# Checks for server update from SteamCMD
 	fn_print_dots "Checking for update: SteamCMD"
@@ -181,7 +186,6 @@ fn_update_steamcmd_check(){
 		sleep 1
 		echo -e "	Current build: ${red}${currentbuild}${default}"
 		echo -e "	Available build: ${green}${availablebuild}${default}"
-		echo -e ""
 		echo -e "	https://steamdb.info/app/${appid}/"
 		sleep 1
 		echo ""
@@ -240,5 +244,9 @@ if [ "${engine}" == "goldsource" ]||[ "${forceupdate}" == "1" ]; then
 	fi
 else
 	fn_update_request_log
-	fn_update_steamcmd_check
+	fn_update_steamcmd_check "${appid}"
+	# will also check for second appid
+	if [ "${gamename}" == "Classic Offensive" ]; then
+		fn_update_steamcmd_check "${appid_co}"
+	fi
 fi

+ 1 - 1
tests/tests_jc2server.sh

@@ -17,7 +17,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########

+ 1 - 1
tests/tests_ts3server.sh

@@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="170305"
+version="170530"
 
 ##########################
 ######## Settings ########