Browse Source

Merged release/161125 into master

pull/1251/head 161125
Daniel Gibbs 8 years ago
parent
commit
9e21a76a34
  1. 2
      7DaysToDie/sdtdserver
  2. 2
      ARKSurvivalEvolved/arkserver
  3. 2
      Arma3/arma3server
  4. 2
      Battlefield1942/bf1942server
  5. 2
      BlackMesa/bmdmserver
  6. 2
      BladeSymphony/bsserver
  7. 2
      BrainBread2/bb2server
  8. 2
      CallOfDuty/codserver
  9. 2
      CallOfDuty2/cod2server
  10. 2
      CallOfDutyUnitedOffensive/coduoserver
  11. 188
      CallOfDutyWorldAtWar/codwawserver
  12. 2
      CodenameCURE/ccserver
  13. 2
      CounterStrike/csserver
  14. 2
      CounterStrikeConditionZero/csczserver
  15. 2
      CounterStrikeGlobalOffensive/csgoserver
  16. 2
      CounterStrikeSource/cssserver
  17. 2
      DayOfDefeat/dodserver
  18. 2
      DayOfDefeatSource/dodsserver
  19. 2
      DayOfInfamy/doiserver
  20. 2
      DeathmatchClassic/dmcserver
  21. 35
      DontStarveTogether/dstserver
  22. 2
      DoubleActionBoogaloo/dabserver
  23. 2
      FistfulOfFrags/fofserver
  24. 2
      GarrysMod/gmodserver
  25. 2
      GoldenEyeSource/gesserver
  26. 2
      HalfLife2Deathmatch/hl2dmserver
  27. 2
      HalfLifeDeathmatch/hldmserver
  28. 2
      HalfLifeDeathmatchSource/hldmsserver
  29. 2
      Hurtworld/hwserver
  30. 2
      Insurgency/insserver
  31. 2
      JustCause2/jc2server
  32. 2
      KillingFloor/kfserver
  33. 2
      Left4Dead/l4dserver
  34. 2
      Left4Dead2/l4d2server
  35. 2
      Minecraft/mcserver
  36. 2
      Mumble/mumbleserver
  37. 2
      NS2Combat/ns2cserver
  38. 2
      NaturalSelection2/ns2server
  39. 2
      NoMoreRoomInHell/nmrihserver
  40. 2
      OpposingForce/opforserver
  41. 2
      PiratesVikingandKnightsII/pvkiiserver
  42. 2
      ProjectZomboid/pzserver
  43. 2
      Quake2/q2server
  44. 2
      Quake3/q3server
  45. 2
      QuakeLive/qlserver
  46. 2
      RedOrchestra/roserver
  47. 2
      Ricochet/ricochetserver
  48. 4
      Rust/rustserver
  49. 2
      SeriousSam3BFE/ss3sserver
  50. 2
      Starbound/sbserver
  51. 2
      SvenCoop/svenserver
  52. 2
      TeamFortress2/tf2server
  53. 2
      TeamFortressClassic/tfcserver
  54. 2
      TeamSpeak3/ts3server
  55. 2
      Teeworlds/twserver
  56. 2
      Terraria/terrariaserver
  57. 2
      UnrealTournament/utserver
  58. 2
      UnrealTournament2004/ut2k4server
  59. 2
      UnrealTournament3/ut3server
  60. 2
      UnrealTournament99/ut99server
  61. 2
      WolfensteinEnemyTerritory/wetserver
  62. 8
      lgsm/functions/alert_email.sh
  63. 4
      lgsm/functions/check_deps.sh
  64. 36
      lgsm/functions/command_details.sh
  65. 4
      lgsm/functions/command_install.sh
  66. 2
      lgsm/functions/command_monitor.sh
  67. 10
      lgsm/functions/core_functions.sh
  68. 81
      lgsm/functions/core_getopt.sh
  69. 2
      lgsm/functions/fix.sh
  70. 11
      lgsm/functions/fix_rust.sh
  71. 4
      lgsm/functions/gsquery.py
  72. 140
      lgsm/functions/info_config.sh
  73. 5
      lgsm/functions/info_glibc.sh
  74. 6
      lgsm/functions/info_parms.sh
  75. 6
      lgsm/functions/install_complete.sh
  76. 70
      lgsm/functions/install_config.sh
  77. 49
      lgsm/functions/install_dst_token.sh
  78. 2
      lgsm/functions/install_server_files.sh
  79. 2
      tests/tests_jc2server.sh

2
7DaysToDie/sdtdserver

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

2
ARKSurvivalEvolved/arkserver

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

2
Arma3/arma3server

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

2
Battlefield1942/bf1942server

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

2
BlackMesa/bmdmserver

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

2
BladeSymphony/bsserver

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

2
BrainBread2/bb2server

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

2
CallOfDuty/codserver

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

2
CallOfDuty2/cod2server

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

2
CallOfDutyUnitedOffensive/coduoserver

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

188
CallOfDutyWorldAtWar/codwawserver

@ -0,0 +1,188 @@
#!/bin/bash
# Project: Game Server Managers - LinuxGSM
# Author: Daniel Gibbs
# License: MIT License, Copyright (c) 2016 Daniel Gibbs
# Purpose: Call of Duty: World at War | 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="161125"
##########################
######## Settings ########
##########################
#### Server Settings ####
## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters
defaultmap="mp_castle"
maxclients="20"
port="28960"
ip="0.0.0.0"
## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters
fn_parms(){
parms="+set sv_punkbuster 0 +set fs_basepath ${filesdir} +set dedicated 1 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxclients} +exec ${servercfg} +map ${defaultmap}"
}
#### LinuxGSM Settings ####
## Notification Alerts
# (on|off)
# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email
emailalert="off"
email="[email protected]"
emailfrom=""
# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet
pushbulletalert="off"
pushbullettoken="accesstoken"
channeltag=""
## 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"
#### 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"
## LinuxGSM Server Details
# Do not edit
gamename="Call of Duty: World at War"
engine="IW 3.0"
## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers
servicename="coduo-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}"
executabledir="${filesdir}"
executable="./codwaw_lnxded"
servercfg="${servicename}.cfg"
servercfgdefault="server.cfg"
servercfgdir="${systemdir}/main"
servercfgfullpath="${servercfgdir}/${servercfg}"
## Backup Directory
backupdir="${rootdir}/backups"
## Logging Directories
gamelogdir="${filesdir}/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

2
CodenameCURE/ccserver

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

2
CounterStrike/csserver

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

2
CounterStrikeConditionZero/csczserver

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

2
CounterStrikeGlobalOffensive/csgoserver

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

2
CounterStrikeSource/cssserver

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

2
DayOfDefeat/dodserver

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

2
DayOfDefeatSource/dodsserver

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

2
DayOfInfamy/doiserver

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

2
DeathmatchClassic/dmcserver

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

35
DontStarveTogether/dstserver

@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
set -x
fi
version="161118"
version="161125"
##########################
######## Settings ########
@ -22,16 +22,20 @@ version="161118"
#### Server Settings ####
## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters
ip="0.0.0.0"
## Installation Variables | https://github.com/GameServerManagers/LinuxGSM/wiki/Don't-Starve-Together
sharding="false"
master="true"
shard="Master"
cluster="Cluster_1"
cave="false"
# Edit with care
persistentstorageroot="${HOME}/.klei"
confdir="DoNotStarveTogether"
## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters
# Edit with care | http://dont-starve-game.wikia.com/wiki/Guides/Don%E2%80%99t_Starve_Together_Dedicated_Servers
# Overworld: -conf_dir DST_Overworld
# Cave: -conf_dir DST_Cave
fn_parms(){
parms="-console -cluster MyDediServer -shard Master"
# -console -cluster MyDediServer -shard Master
parms="-persistent_storage_root ${persistentstorageroot} -conf_dir ${confdir} -cluster ${cluster} -shard ${shard}"
}
#### LinuxGSM Settings ####
@ -83,7 +87,7 @@ gamename="Don't Starve Together"
engine="dontstarve"
## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers
servicename="dst-server"
servicename="dst-server-${shard}"
#### Directories ####
# Edit with care
@ -102,11 +106,14 @@ filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}"
executabledir="${filesdir}/bin"
executable="./dontstarve_dedicated_server_nullrenderer"
servercfg="settings.ini"
servercfgdefault="settings.ini"
servercfgdir="${HOME}/.klei/DoNotStarveTogether"
clustercfg="cluster.ini"
clustercfgdir="${persistentstorageroot}/${confdir}/${cluster}"
clustercfgfullpath="${clustercfgdir}/${clustercfg}"
clustercfgdefault="cluster.ini"
servercfg="server.ini"
servercfgdir="${clustercfgdir}/${shard}"
servercfgfullpath="${servercfgdir}/${servercfg}"
servercfgdefault="${servercfgdir}/lgsm-default.ini"
servercfgdefault="server.ini"
## Backup Directory
backupdir="${rootdir}/backups"
@ -197,4 +204,4 @@ fi
core_dl.sh
core_functions.sh
getopt=$1
core_getopt.sh
core_getopt.sh

2
DoubleActionBoogaloo/dabserver

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

2
FistfulOfFrags/fofserver

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

2
GarrysMod/gmodserver

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

2
GoldenEyeSource/gesserver

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

2
HalfLife2Deathmatch/hl2dmserver

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

2
HalfLifeDeathmatch/hldmserver

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

2
HalfLifeDeathmatchSource/hldmsserver

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

2
Hurtworld/hwserver

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

2
Insurgency/insserver

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

2
JustCause2/jc2server

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

2
KillingFloor/kfserver

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

2
Left4Dead/l4dserver

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

2
Left4Dead2/l4d2server

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

2
Minecraft/mcserver

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

2
Mumble/mumbleserver

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

2
NS2Combat/ns2cserver

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

2
NaturalSelection2/ns2server

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

2
NoMoreRoomInHell/nmrihserver

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

2
OpposingForce/opforserver

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

2
PiratesVikingandKnightsII/pvkiiserver

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

2
ProjectZomboid/pzserver

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

2
Quake2/q2server

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

2
Quake3/q3server

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

2
QuakeLive/qlserver

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

2
RedOrchestra/roserver

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

2
Ricochet/ricochetserver

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

4
Rust/rustserver

@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then
set -x
fi
version="161118"
version="161125"
##########################
######## Settings ########
@ -118,7 +118,7 @@ filesdir="${rootdir}/serverfiles"
## Server Specific Directories
systemdir="${filesdir}"
executabledir="${filesdir}"
executable="LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`dirname $0`/RustDedicated_Data/Plugins/x86_64 ./RustDedicated"
executable="./RustDedicated"
serveridentitydir="${systemdir}/server/${servicename}"
servercfg="server.cfg"
servercfgdefault="server.cfg"

2
SeriousSam3BFE/ss3sserver

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

2
Starbound/sbserver

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

2
SvenCoop/svenserver

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

2
TeamFortress2/tf2server

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

2
TeamFortressClassic/tfcserver

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

2
TeamSpeak3/ts3server

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

2
Teeworlds/twserver

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

2
Terraria/terrariaserver

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

2
UnrealTournament/utserver

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

2
UnrealTournament2004/ut2k4server

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

2
UnrealTournament3/ut3server

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

2
UnrealTournament99/ut99server

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

2
WolfensteinEnemyTerritory/wetserver

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

8
lgsm/functions/alert_email.sh

@ -100,7 +100,7 @@ fn_details_gameserver(){
# Server IP: 1.2.3.4:27960
# RCON password: CHANGE_ME
# Server password: NOT SET
# Slots: 16
# Maxplayers: 16
# Status: OFFLINE
{
@ -133,9 +133,9 @@ fn_details_gameserver(){
echo -e "Stats password: ********"
fi
# Slots
if [ -n "${slots}" ]; then
echo -e "Slots: ${slots}"
# Maxplayers
if [ -n "${maxplayers}" ]; then
echo -e "Maxplayers: ${maxplayers}"
fi
# Game mode

4
lgsm/functions/check_deps.sh

@ -201,7 +201,7 @@ if [ -n "$(command -v dpkg-query)" ]; then
fi
# GoldenEye: Source
elif [ "${gamename}" == "GoldenEye: Source" ]; then
array_deps_required+=( zlib1g:i386 )
array_deps_required+=( zlib1g:i386 libldap-2.4-2:i386 )
# Unreal Engine
elif [ "${executable}" == "./ucc-bin" ]; then
#UT2K4
@ -273,7 +273,7 @@ elif [ -n "$(command -v yum)" ]; then
fi
# GoldenEye: Source
elif [ "${gamename}" == "GoldenEye: Source" ]; then
array_deps_required+=( zlib.i686 )
array_deps_required+=( zlib.i686 openldap.i686 )
# Unreal Engine
elif [ "${executable}" == "./ucc-bin" ]; then
#UT2K4

36
lgsm/functions/command_details.sh

@ -98,7 +98,7 @@ fn_details_gameserver(){
# Server IP: 1.2.3.4:27960
# RCON password: CHANGE_ME
# Server password: NOT SET
# Slots: 16
# Maxplayers: 16
# Status: OFFLINE
echo -e ""
@ -133,9 +133,9 @@ fn_details_gameserver(){
echo -e "${blue}Stats password:\t${default}${statspassword}"
fi
# Slots
if [ -n "${slots}" ]; then
echo -e "${blue}Slots:\t${default}${slots}"
# Maxplayers
if [ -n "${maxplayers}" ]; then
echo -e "${blue}Maxplayers:\t${default}${maxplayers}"
fi
# Game mode
@ -152,6 +152,16 @@ fn_details_gameserver(){
if [ -n "${tickrate}" ]; then
echo -e "${blue}Tick rate:\t${default}${tickrate}"
fi
# Cluster (Don't Starve Together)
if [ -n "${cluster}" ]; then
echo -e "${blue}Cluster:\t${default}${cluster}"
fi
# Shard (Don't Starve Together)
if [ -n "${shard}" ]; then
echo -e "${blue}Shard:\t${default}${shard}"
fi
# TeamSpeak dbplugin
if [ -n "${dbplugin}" ]; then
@ -308,7 +318,7 @@ fn_details_ports(){
fi
done
# engines that require editing in the script file
local ports_edit_array=( "starbound" "spark" "source" "goldsource" "Rust" "Hurtworld" "unreal4")
local ports_edit_array=( "Hurtworld" "iw3.0" "goldsource" "Rust" "spark" "source" "starbound" "unreal4" )
for port_edit in "${ports_edit_array[@]}"
do
if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]; then
@ -368,12 +378,24 @@ fn_details_cod2(){
} | column -s $'\t' -t
}
fn_details_codwaw(){
echo -e "netstat -atunp | grep codwaw_lnxded"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "> Game\tINBOUND\t${port}\tudp"
} | column -s $'\t' -t
}
fn_details_dontstarve(){
echo -e "netstat -atunp | grep dontstarve"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "> Game\tINBOUND\t${port}\tudp"
echo -e "> Game: Server\tINBOUND\t${port}\tudp"
echo -e "> Game: Master\tINBOUND\t${masterport}\tudp"
echo -e "> Steam: Auth\tINBOUND\t${steamauthenticationport}\tudp"
echo -e "> Steam: Master\tINBOUND\t${steammasterserverport}\tudp"
} | column -s $'\t' -t
}
@ -730,6 +752,8 @@ fn_display_details() {
fn_details_coduo
elif [ "${gamename}" == "Call of Duty 2" ]; then
fn_details_cod2
elif [ "${gamename}" == "Call of Duty: World at War" ]; then
fn_details_codwaw
elif [ "${gamename}" == "Hurtworld" ]; then
fn_details_hurtworld
elif [ "${gamename}" == "QuakeWorld" ]; then

4
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}" == "Battlefield: 1942" ]||[ "${gamename}" == "Call of Duty" ]||[ "${gamename}" == "Call of Duty: United Offensive" ]||[ "${gamename}" == "Call of Duty 2" ]||[ "${gamename}" == "Minecraft" ]||[ "${gamename}" == "Quake 2" ]||[ "${gamename}" == "Quake 3: Arena" ]||[ "${gamename}" == "QuakeWorld" ]||[ "${gamename}" == "Unreal Tournament 99" ]||[ "${gamename}" == "Unreal Tournament" ]||[ "${gamename}" == "Unreal Tournament 3" ]||[ "${gamename}" == "TeamSpeak 3" ]||[ "${gamename}" == "Mumble" ]||[ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then
elif [ "${gamename}" == "Battlefield: 1942" ]||[ "${gamename}" == "Call of Duty" ]||[ "${gamename}" == "Call of Duty: United Offensive" ]||[ "${gamename}" == "Call of Duty 2" ]||[ "${gamename}" == "Call of Duty: World at War" ]||[ "${gamename}" == "Minecraft" ]||[ "${gamename}" == "Quake 2" ]||[ "${gamename}" == "Quake 3: Arena" ]||[ "${gamename}" == "QuakeWorld" ]||[ "${gamename}" == "Unreal Tournament 99" ]||[ "${gamename}" == "Unreal Tournament" ]||[ "${gamename}" == "Unreal Tournament 3" ]||[ "${gamename}" == "TeamSpeak 3" ]||[ "${gamename}" == "Mumble" ]||[ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then
installer=1
install_server_files.sh
elif [ -n "${appid}" ]; then
@ -30,6 +30,8 @@ fi
install_config.sh
if [ "${gamename}" == "Counter-Strike: Global Offensive" ]||[ "${gamename}" == "Team Fortress 2" ]||[ "${gamename}" == "BrainBread 2" ]; then
install_gslt.sh
elif [ "${gamename}" == "Don't Starve Together" ]; then
install_dst_token.sh
elif [ "${gamename}" == "TeamSpeak 3" ]; then
install_ts3db.sh
fi

2
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 idtech3 idtech3_ql iw2.0 quake refractor realvirtuality source spark unity3d unreal unreal2 )
local allowed_engines_array=( avalanche goldsource idtech3 idtech3_ql iw2.0 iw3.0 quake refractor realvirtuality source spark unity3d unreal unreal2 )
for allowed_engine in "${allowed_engines_array[@]}"
do
if [ "${allowed_engine}" == "${engine}" ]; then

10
lgsm/functions/core_functions.sh

@ -362,6 +362,11 @@ functionfile="${FUNCNAME}"
fn_fetch_function
}
fix_rust.sh(){
functionfile="${FUNCNAME}"
fn_fetch_function
}
# Info
info_config.sh(){
@ -475,6 +480,11 @@ functionfile="${FUNCNAME}"
fn_fetch_function
}
install_dst_token.sh(){
functionfile="${FUNCNAME}"
fn_fetch_function
}
install_gsquery.sh(){
functionfile="${FUNCNAME}"
fn_fetch_function

81
lgsm/functions/core_getopt.sh

@ -337,6 +337,83 @@ case "${getopt}" in
esac
}
fn_getopt_dstserver(){
case "${getopt}" in
st|start)
command_start.sh;;
sp|stop)
command_stop.sh;;
r|restart)
command_restart.sh;;
u|update)
command_update.sh;;
fu|force-update|update-restart)
forceupdate=1;
command_update.sh;;
uf|update-functions)
command_update_functions.sh;;
v|validate)
command_validate.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;;
ct|cluster-token)
install_dst_token.sh;;
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\t${default}u |Checks and applies updates from SteamCMD."
echo -e "${blue}force-update\t${default}fu |Bypasses the check and applies updates from SteamCMD."
echo -e "${blue}update-functions\t${default}uf |Removes all functions so latest can be downloaded."
echo -e "${blue}validate\t${default}v |Validate server files with SteamCMD."
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."
echo -e "${blue}install\t${default}i |Install the server."
echo -e "${blue}auto-install\t${default}ai |Install the server, without prompts."
echo -e "${blue}cluster-token\t${default}ct |Configure cluster token."
} | column -s $'\t' -t
esac
}
fn_getopt_gmodserver(){
case "${getopt}" in
st|start)
@ -622,12 +699,14 @@ case "${getopt}" in
if [ "${gamename}" == "Mumble" ]; then
fn_getopt_mumble
elif [ "${gamename}" == "Battlefield: 1942" ]||[ "${gamename}" == "Call of Duty" ]||[ "${gamename}" == "Call of Duty: United Offensive" ]||[ "${gamename}" == "Call of Duty 2" ]||[ "${gamename}" == "QuakeWorld" ]||[ "${gamename}" == "Quake 2" ]||[ "${gamename}" == "Quake 3: Arena" ]||[ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then
elif [ "${gamename}" == "Battlefield: 1942" ]||[ "${gamename}" == "Call of Duty" ]||[ "${gamename}" == "Call of Duty: United Offensive" ]||[ "${gamename}" == "Call of Duty 2" ]||[ "${gamename}" == "Call of Duty: World at War" ]||[ "${gamename}" == "QuakeWorld" ]||[ "${gamename}" == "Quake 2" ]||[ "${gamename}" == "Quake 3: Arena" ]||[ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then
fn_getopt_generic_no_update
elif [ "${engine}" == "lwjgl2" ]; then
fn_getopt_minecraft
elif [ "${gamename}" == "TeamSpeak 3" ]; then
fn_getopt_teamspeak3
elif [ "${gamename}" == "Don't Starve Together" ]; then
fn_getopt_dstserver
elif [ "${gamename}" == "Garry's Mod" ]; then
fn_getopt_gmodserver
elif [ "${engine}" == "unreal2" ]; then

2
lgsm/functions/fix.sh

@ -45,6 +45,8 @@ if [ "${function_selfname}" != "command_install.sh" ]; then
fix_ges.sh
elif [ "${gamename}" == "Insurgency" ]; then
fix_ins.sh
elif [ "${gamename}" == "Rust" ]; then
fix_rust.sh
fi
fi

11
lgsm/functions/fix_rust.sh

@ -0,0 +1,11 @@
#!/bin/bash
# LGSM fix_rust.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Description: Resolves startup issue with Rust
local commandname="FIX"
local commandaction="Fix"
# Fixes: [Raknet] Server Shutting Down (Shutting Down)
export LD_LIBRARY_PATH="${systemdir}/RustDedicated_Data/Plugins/x86_64"

4
lgsm/functions/gsquery.py

@ -28,6 +28,8 @@ class GameServer:
self.query_prompt_string = b'\xff\xff\xff\xffgetstatus'
elif self.option.engine == 'iw2.0':
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':
@ -115,7 +117,7 @@ if __name__ == '__main__':
action='store',
dest='engine',
default=False,
help='Engine type: avalanche, goldsource, idtech2, idtech3, iw2.0, realvirtuality, quake, quakelive, refractor, spark, source, unity3d, unreal, unreal2.'
help='Engine type: avalanche, goldsource, idtech2, idtech3, iw2.0, iw3.0, realvirtuality, quake, quakelive, refractor, spark, source, unity3d, unreal, unreal2.'
)
parser.add_option(
'-v', '--verbose',

140
lgsm/functions/info_config.sh

@ -18,13 +18,13 @@ fn_info_config_avalanche(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}"
serverpassword="${unavailable}"
slots="${zero}"
maxplayers="${zero}"
port="${zero}"
else
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:]')
maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]')
port=$(grep "BindPort" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]')
ip=$(grep "BindIP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/BindIP//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
@ -34,7 +34,7 @@ fn_info_config_avalanche(){
# Not Set
servername=${servername:-"NOT SET"}
serverpassword=${serverpassword:-"NOT SET"}
slots=${slots:-"0"}
maxplayers=${maxplayers:-"0"}
port=${port:-"0"}
fi
}
@ -43,14 +43,14 @@ fn_info_config_bf1942(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}"
serverpassword="${unavailable}"
slots="${zero}"
maxplayers="${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:]')
maxplayers=$(grep "game.serverMaxPlayers" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]')
port=$(grep "game.serverPort" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]')
queryport="22000"
@ -61,7 +61,7 @@ fn_info_config_bf1942(){
# Not Set
servername=${servername:-"NOT SET"}
serverpassword=${serverpassword:-"NOT SET"}
slots=${slots:-"0"}
maxplayers=${maxplayers:-"0"}
port=${port:-"0"}
fi
}
@ -94,29 +94,62 @@ fn_info_config_cod2(){
fi
}
fn_info_config_dontstarve(){
fn_info_config_codwaw(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}"
rconpassword="${unavailable}"
else
servername=$(grep "sv_hostname " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname //g' | tr -d '=\";,:' | xargs)
rconpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
# Not Set
servername=${servername:-"NOT SET"}
rconpassword=${rconpassword=:-"NOT SET"}
fi
}
fn_info_config_dontstarve(){
if [ ! -f "${clustercfgfullpath}" ]; then
servername="${unavailable}"
serverpassword="${unavailable}"
slots="${zero}"
maxplayers="${zero}"
gamemode="${unavailable}"
tickrate="${zero}"
port="${zero}"
masterport="${zero}"
else
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}" | 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:]')
servername=$(grep "cluster_name" "${clustercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/cluster_name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
serverpassword=$(grep "cluster_password" "${clustercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/cluster_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
maxplayers=$(grep "max_players" "${clustercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
gamemode=$(grep "game_mode" "${clustercfgfullpath}" | 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" "${clustercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
masterport=$(grep "master_port" "${clustercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
ip=$(grep "bind_ip" "${clustercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bind_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
ipsetinconfig=1
ipinconfigvar="bind_ip"
# Not Set
servername=${servername:-"NOT SET"}
serverpassword=${serverpassword:-"NOT SET"}
slots=${slots:-"0"}
maxplayers=${maxplayers:-"0"}
gamemode=${gamemode:-"NOT SET"}
tickrate=${tickrate:-"0"}
masterport=${masterport:-"0"}
fi
if [ ! -f "${servercfgfullpath}" ]; then
port="${zero}"
steamauthenticationport="${zero}"
steammasterserverport="${zero}"
else
port=$(grep "server_port" "${servercfgfullpath}" | grep "^server_port" | grep -v "#" | tr -cd '[:digit:]')
steamauthenticationport=$(grep "authentication_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
steammasterserverport=$(grep "master_server_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
# Not Set
port=${port:-"0"}
steamauthenticationport=${steamauthenticationport:-"0"}
steammasterserverport=${steammasterserverport:-"0"}
fi
}
@ -125,7 +158,7 @@ fn_info_config_minecraft(){
servername="${unavailable}"
rconpassword="${unavailable}"
rconport="${zero}"
slots="${zero}"
maxplayers="${zero}"
port="${zero}"
gamemode="${unavailable}"
gameworld="${unavailable}"
@ -133,7 +166,7 @@ fn_info_config_minecraft(){
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:]')
maxplayers=$(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]*$//')
@ -146,7 +179,7 @@ fn_info_config_minecraft(){
servername=${servername:-"NOT SET"}
rconpassword=${rconpassword:-"NOT SET"}
rconport=${rconport:-"NOT SET"}
slots=${slots:-"NOT SET"}
maxplayers=${maxplayers:-"NOT SET"}
port=${port:-"NOT SET"}
gamemode=${gamemode:-"NOT SET"}
gameworld=${gameworld:-"NOT SET"}
@ -159,14 +192,14 @@ fn_info_config_projectzomboid(){
servername="${unavailable}"
serverpassword="${unavailable}"
rconpassword="${unavailable}"
slots="${zero}"
maxplayers="${zero}"
port="${zero}"
gameworld="${unavailable}"
else
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:]')
maxplayers=$(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]*$//')
@ -174,7 +207,7 @@ fn_info_config_projectzomboid(){
servername=${servername:-"NOT SET"}
serverpassword=${serverpassword:-"NOT SET"}
rconpassword=${rconpassword:-"NOT SET"}
slots=${slots:-"NOT SET"}
maxplayers=${maxplayers:-"NOT SET"}
port=${port:-"NOT SET"}
gameworld=${gameworld:-"NOT SET"}
fi
@ -185,16 +218,16 @@ fn_info_config_quake2(){
rconpassword="${unavailable}"
servername="${unavailable}"
serverpassword="${unavailable}"
slots="${zero}"
maxplayers="${zero}"
else
rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
slots=$(grep "maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
maxplayers=$(grep "maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
# Not Set
rconpassword=${rconpassword:-"NOT SET"}
servername=${servername:-"NOT SET"}
slots=${slots:-"0"}
maxplayers=${maxplayers:-"0"}
fi
}
@ -203,18 +236,18 @@ fn_info_config_quake3(){
rconpassword="${unavailable}"
servername="${unavailable}"
serverpassword="${unavailable}"
slots="${zero}"
maxplayers="${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 "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
slots=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
maxplayers=$(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"}
maxplayers=${maxplayers:-"0"}
fi
}
@ -223,12 +256,12 @@ fn_info_config_quakelive(){
rconpassword="${unavailable}"
servername="${unavailable}"
serverpassword="${unavailable}"
slots="${zero}"
maxplayers="${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:]')
maxplayers=$(grep "sv_maxClients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
ip=$(grep "set net_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set net_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
ipsetinconfig=1
@ -238,7 +271,7 @@ fn_info_config_quakelive(){
rconpassword=${rconpassword:-"NOT SET"}
servername=${servername:-"NOT SET"}
serverpassword=${serverpassword:-"NOT SET"}
slots=${slots:-"0"}
maxplayers=${maxplayers:-"0"}
fi
}
@ -247,14 +280,14 @@ fn_info_config_wolfensteinenemyterritory(){
rconpassword="${unavailable}"
servername="${unavailable}"
serverpassword="${unavailable}"
slots="${zero}"
maxplayers="${zero}"
port="${zero}"
else
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:]')
maxplayers=$(grep "set sv_maxclients" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]')
ip=$(grep "set net_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set net_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
ipsetinconfig=1
@ -264,7 +297,7 @@ fn_info_config_wolfensteinenemyterritory(){
rconpassword=${rconpassword:-"NOT SET"}
servername=${servername:-"NOT SET"}
serverpassword=${serverpassword:-"NOT SET"}
slots=${slots:-"0"}
maxplayers=${maxplayers:-"0"}
port=${port:-"27960"}
fi
}
@ -274,18 +307,18 @@ fn_info_config_realvirtuality(){
servername="${unavailable}"
adminpassword="${unavailable}"
serverpassword="${unavailable}"
slots="${zero}"
maxplayers="${zero}"
else
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:]')
maxplayers=$(grep "maxPlayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]')
# Not Set
servername=${servername:-"NOT SET"}
adminpassword=${adminpassword:-"NOT SET"}
serverpassword=${serverpassword:-"NOT SET"}
slots=${slots:-"0"}
maxplayers=${maxplayers:-"0"}
fi
}
@ -294,20 +327,20 @@ fn_info_config_seriousengine35(){
servername="${unavailable}"
rconpassword="${unavailable}"
gamemode="${unavailable}"
slots="${zero}"
maxplayers="${zero}"
port="${zero}"
else
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:]')
maxplayers=$(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"}
rconpassword=${rconpassword:-"NOT SET"}
gamemode=${gamemode:-"NOT SET"}
slots=${slots:-"0"}
maxplayers=${maxplayers:-"0"}
port=${port:-"0"}
fi
}
@ -336,14 +369,14 @@ fn_info_config_starbound(){
port="21025"
queryport="21025"
rconport="21026"
slots="8"
maxplayers="8"
else
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:]')
slots=$(grep "maxPlayers" "${servercfgfullpath}" | tr -cd '[:digit:]')
maxplayers=$(grep "maxPlayers" "${servercfgfullpath}" | tr -cd '[:digit:]')
# Not Set
servername=${servername:-"NOT SET"}
@ -351,7 +384,7 @@ fn_info_config_starbound(){
port=${port:-"21025"}
queryport=${queryport:-"21025"}
rconport=${rconport:-"21026"}
slots=${slots:-"8"}
maxplayers=${maxplayers:-"8"}
fi
}
@ -404,20 +437,20 @@ fn_info_config_teeworlds(){
serverpassword="${unavailable}"
rconpassword="${unavailable}"
port="8303"
slots="12"
maxplayers="12"
else
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:]')
maxplayers=$(grep "sv_max_clients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
# Not Set
servername=${servername:-"NOT SET"}
serverpassword=${serverpassword:-"NOT SET"}
rconpassword=${rconpassword:-"NOT SET"}
port=${port:-"8303"}
slots=${slots:-"12"}
maxplayers=${maxplayers:-"12"}
fi
}
@ -426,18 +459,18 @@ fn_info_config_terraria(){
servername="${unavailable}"
port="${zero}"
gameworld="${unavailable}"
slots="${zero}"
maxplayers="${zero}"
else
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:]')
maxplayers=$(grep "maxplayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]')
# Not Set
servername=${servername:-"NOT SET"}
port=${port:-"0"}
gameworld=${gameworld:-"NOT SET"}
slots=${slots:-"0"}
maxplayers=${maxplayers:-"0"}
fi
}
@ -493,7 +526,7 @@ fn_info_config_sdtd(){
telnetenabled="${unavailable}"
telnetport="${zero}"
telnetpass="${unavailable}"
slots="${unavailable}"
maxplayers="${unavailable}"
gamemode="${unavailable}"
gameworld="${unavailable}"
else
@ -509,7 +542,7 @@ fn_info_config_sdtd(){
telnetport=$(grep "TelnetPort" "${servercfgfullpath}" | tr -cd '[:digit:]')
telnetpass=$(grep "TelnetPassword" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"")
slots=$(grep "ServerMaxPlayerCount" "${servercfgfullpath}" | tr -cd '[:digit:]')
maxplayers=$(grep "ServerMaxPlayerCount" "${servercfgfullpath}" | tr -cd '[:digit:]')
gamemode=$(grep "GameMode" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"")
gameworld=$(grep "GameWorld" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"")
@ -524,7 +557,7 @@ fn_info_config_sdtd(){
telnetenabled=${telnetenabled:-"NOT SET"}
telnetport=${telnetport:-"0"}
telnetpass=${telnetpass:-"NOT SET"}
slots=${slots:-"NOT SET"}
maxplayers=${maxplayers:-"NOT SET"}
gamemode=${gamemode:-"NOT SET"}
gameworld=${gameworld:-"NOT SET"}
fi
@ -542,6 +575,9 @@ elif [ "${gamename}" == "Call of Duty" ]||[ "${gamename}" == "Call of Duty: Unit
# Call of Duty 2
elif [ "${gamename}" == "Call of Duty 2" ]; then
fn_info_config_cod2
# Call of Duty: World at War
elif [ "${gamename}" == "Call of Duty: World at War" ]; then
fn_info_config_codwaw
# Dont Starve Together
elif [ "${engine}" == "dontstarve" ]; then
fn_info_config_dontstarve

5
lgsm/functions/info_glibc.sh

@ -23,6 +23,9 @@ elif [ "${gamename}" == "Call of Duty 2" ]; then
elif [ "${gamename}" == "Call of Duty: United Offensive" ]; then
glibcrequired="2.1"
glibcfix="no"
elif [ "${gamename}" == "Call of Duty: World at War" ]; then
glibcrequired="2.3.2"
glibcfix="no"
elif [ "${gamename}" == "Day of Infamy" ]; then
glibcrequired="2.15"
glibcfix="yes"
@ -40,7 +43,7 @@ elif [ "${gamename}" == "Garry's Mod" ]; then
glibcfix="yes"
elif [ "${gamename}" == "GoldenEye: Source" ]; then
glibcrequired="2.15"
glibcfix="no"
glibcfix="yes"
elif [ "${gamename}" == "Insurgency" ]; then
glibcrequired="2.15"
glibcfix="yes"

6
lgsm/functions/info_parms.sh

@ -49,20 +49,20 @@ fn_info_config_teeworlds(){
serverpassword="${unavailable}"
rconpassword="${unavailable}"
port="8303"
slots="12"
maxplayers="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:]')
maxplayers=$(grep "sv_max_clients" "${servercfgfullpath}" | tr -cd '[:digit:]')
# Not Set
servername=${servername:-"NOT SET"}
serverpassword=${serverpassword:-"NOT SET"}
rconpassword=${rconpassword:-"NOT SET"}
port=${port:-"8303"}
slots=${slots:-"12"}
maxplayers=${maxplayers:-"12"}
fi
}

6
lgsm/functions/install_complete.sh

@ -8,12 +8,6 @@ local commandname="INSTALL"
local commandaction="Install"
local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
if [ "${gamename}" == "Don't Starve Together" ]; then
echo ""
echo "An Authentication Token is required to run this server!"
echo "Follow the instructions in this link to obtain this key"
echo " https://gameservermanagers.com/dst-auth-token"
fi
echo "================================="
echo "Install Complete!"
fn_script_log_info "Install Complete!"

70
lgsm/functions/install_config.sh

@ -51,13 +51,14 @@ fn_default_config_remote(){
for config in "${array_configs[@]}"
do
# every config is copied
echo "copying ${servercfg} config file."
echo "copying ${config} 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
elif [ "${gamename}" == "ARMA 3" ]&&[ "${config}" == "${networkcfgdefault}" ]; then
cp -v "${lgsmdir}/default-configs/${config}" "${networkcfgfullpath}"
elif [ "${gamename}" == "Don't Starve Together" ]&&[ "${config}" == "${clustercfgdefault}" ]; then
cp -nv "${lgsmdir}/default-configs/${clustercfgdefault}" "${clustercfgfullpath}"
else
cp -v "${lgsmdir}/default-configs/${config}" "${servercfgdir}/${config}"
fi
@ -65,6 +66,56 @@ fn_default_config_remote(){
sleep 1
}
# Changes some variables within the default Don't Starve Together configs
fn_set_dst_config_vars(){
## cluster.ini
if grep -Fq "SERVERNAME" "${clustercfgfullpath}"; then
echo "changing server name."
fn_script_log_info "changing server name."
sed -i "s/SERVERNAME/LinuxGSM/g" "${clustercfgfullpath}"
sleep 1
echo "changing shard mode."
fn_script_log_info "changing shard mode."
sed -i "s/USESHARDING/${sharding}/g" "${clustercfgfullpath}"
sleep 1
echo "randomizing cluster key."
fn_script_log_info "randomizing cluster key."
randomkey=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
sed -i "s/CLUSTERKEY/${randomkey}/g" "${clustercfgfullpath}"
sleep 1
else
echo "${clustercfg} is already configured."
fn_script_log_info "${clustercfg} is already configured."
fi
## server.ini
# removing unnecessary options (dependent on sharding & shard type)
if [ "${sharding}" == "false" ]; then
sed -i "s/ISMASTER//g" "${servercfgfullpath}"
sed -i "/SHARDNAME/d" "${servercfgfullpath}"
elif [ "${master}" == "true" ]; then
sed -i "/SHARDNAME/d" "${servercfgfullpath}"
fi
echo "changing shard name."
fn_script_log_info "changing shard name."
sed -i "s/SHARDNAME/${shard}/g" "${servercfgfullpath}"
sleep 1
echo "changing master setting."
fn_script_log_info "changing master setting."
sed -i "s/ISMASTER/${master}/g" "${servercfgfullpath}"
sleep 1
## worldgenoverride.lua
if [ "${cave}" == "true" ]; then
echo "defining ${shard} as cave in ${servercfgdir}/worldgenoverride.lua."
fn_script_log_info "defining ${shard} as cave in ${servercfgdir}/worldgenoverride.lua."
echo 'return { override_enabled = true, preset = "DST_CAVE", }' > "${servercfgdir}/worldgenoverride.lua"
fi
sleep 1
echo ""
}
echo ""
echo "Downloading ${gamename} Config"
echo "================================="
@ -131,6 +182,12 @@ elif [ "${gamename}" == "Call of Duty 2" ]; then
fn_fetch_default_config
fn_default_config_remote
fn_set_config_vars
elif [ "${gamename}" == "Call of Duty: World at War" ]; then
gamedirname="CallOfDutyWorldAtWar"
array_configs+=( server.cfg )
fn_fetch_default_config
fn_default_config_remote
fn_set_config_vars
elif [ "${gamename}" == "Codename CURE" ]; then
gamedirname="CodenameCURE"
array_configs+=( server.cfg )
@ -187,10 +244,11 @@ elif [ "${gamename}" == "Deathmatch Classic" ]; then
fn_set_config_vars
elif [ "${gamename}" == "Don't Starve Together" ]; then
gamedirname="DontStarveTogether"
array_configs+=( Settings.ini )
fn_check_cfgdir
array_configs+=( cluster.ini server.ini )
fn_fetch_default_config
fn_default_config_remote
fn_set_config_vars
fn_set_dst_config_vars
elif [ "${gamename}" == "Double Action: Boogaloo" ]; then
gamedirname="DoubleActionBoogaloo"
array_configs+=( server.cfg )
@ -424,4 +482,4 @@ elif [ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then
fn_fetch_default_config
fn_default_config_remote
fn_set_config_vars
fi
fi

49
lgsm/functions/install_dst_token.sh

@ -0,0 +1,49 @@
#!/bin/bash
# LGSM install_dst_token.sh function
# Author: Daniel Gibbs & Marvin Lehmann (marvinl97)
# Website: https://gameservermanagers.com
# Description: Configures Don't Starve Together cluster with given token.
local commandname="INSTALL"
local commandaction="Install"
local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
echo ""
echo "Enter ${gamename} Cluster Token"
echo "================================="
sleep 1
echo "A cluster token is required to run this server!"
echo "Follow the instructions in this link to obtain this key:"
echo "https://gameservermanagers.com/dst-auth-token"
echo ""
if [ -z "${autoinstall}" ]; then
overwritetoken="true"
if [ -s "${clustercfgdir}/cluster_token.txt" ]; then
echo "The cluster token is already set. Do you want to overwrite it?"
fn_script_log_info "Don't Starve Together cluster token is already set"
while true; do
read -e -i "n" -p "Continue? [Y/n]" yn
case $yn in
[Yy]* ) overwritetoken="true"; break;;
[Nn]* ) overwritetoken="false"; break;;
* ) echo "Please answer yes or no.";;
esac
done
fi
if [ "${overwritetoken}" == "true" ]; then
echo "Once you have the cluster token, enter it below"
echo -n "Cluster Token: "
read token
mkdir -pv "${clustercfgdir}"
echo "${token}" > "${clustercfgdir}/cluster_token.txt"
if [ -f "${clustercfgdir}/cluster_token.txt" ]; then
echo "Don't Starve Together cluster token created"
fn_script_log_info "Don't Starve Together cluster token created"
fi
unset overwritetoken
fi
else
echo "You can add your cluster token using the following command"
echo "./${selfname} cluster-token"
fi
echo ""

2
lgsm/functions/install_server_files.sh

@ -17,6 +17,8 @@ fn_install_server_files(){
fileurl="http://files.gameservermanagers.com/CallOfDutyUnitedOffensive/coduo-lnxded-1.51b-full.tar.bz2"; filedir="${tmpdir}"; filename="coduo-lnxded-1.51b-full.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="f1804ef13036e2b4ab535db000b19e97"
elif [ "${gamename}" == "Call of Duty 2" ]; then
fileurl="http://files.gameservermanagers.com/CallOfDuty2/cod2-lnxded-1.3-full.tar.bz2"; filedir="${tmpdir}"; filename="cod2-lnxded-1.3-full.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="078128f83d06dc3d7699428dc2870214"
elif [ "${gamename}" == "Call of Duty: World at War" ]; then
fileurl="http://files.gameservermanagers.com/CallOfDutyWorldAtWar/codwaw-lnxded-1.7-full.tar.bz2"; filedir="${tmpdir}"; filename="codwaw-lnxded-1.7-full.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="0489697ff3bf678c109bfb377d1b7895"
elif [ "${gamename}" == "GoldenEye: Source" ]; then
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"
elif [ "${gamename}" == "Quake 2" ]; then

2
tests/tests_jc2server.sh

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

Loading…
Cancel
Save