diff --git a/7DaysToDie/sdtdserver b/7DaysToDie/sdtdserver index 0c532d2e5..1e5bca25e 100644 --- a/7DaysToDie/sdtdserver +++ b/7DaysToDie/sdtdserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/ARKSurvivalEvolved/arkserver b/ARKSurvivalEvolved/arkserver index aa562c209..bc4c53812 100644 --- a/ARKSurvivalEvolved/arkserver +++ b/ARKSurvivalEvolved/arkserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/Arma3/arma3server b/Arma3/arma3server index f5a1c7830..b132595a5 100644 --- a/Arma3/arma3server +++ b/Arma3/arma3server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/Battlefield1942/bf1942server b/Battlefield1942/bf1942server index 52eca3409..d011e57ac 100644 --- a/Battlefield1942/bf1942server +++ b/Battlefield1942/bf1942server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/BlackMesa/bmdmserver b/BlackMesa/bmdmserver index e59419347..025374c70 100644 --- a/BlackMesa/bmdmserver +++ b/BlackMesa/bmdmserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/BladeSymphony/bsserver b/BladeSymphony/bsserver index 89423115b..5e1a91654 100644 --- a/BladeSymphony/bsserver +++ b/BladeSymphony/bsserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/BrainBread2/bb2server b/BrainBread2/bb2server index 932600773..977e60025 100644 --- a/BrainBread2/bb2server +++ b/BrainBread2/bb2server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/CallOfDuty/codserver b/CallOfDuty/codserver index 795f89b83..8bf07b570 100755 --- a/CallOfDuty/codserver +++ b/CallOfDuty/codserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/CallOfDuty2/cod2server b/CallOfDuty2/cod2server index 885175339..49a32f1e5 100755 --- a/CallOfDuty2/cod2server +++ b/CallOfDuty2/cod2server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/CallOfDutyUnitedOffensive/coduoserver b/CallOfDutyUnitedOffensive/coduoserver index 95675a10f..37e053e10 100755 --- a/CallOfDutyUnitedOffensive/coduoserver +++ b/CallOfDutyUnitedOffensive/coduoserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/CallOfDutyWorldAtWar/codwawserver b/CallOfDutyWorldAtWar/codwawserver new file mode 100755 index 000000000..cd908489d --- /dev/null +++ b/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@example.com" +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 \ No newline at end of file diff --git a/CodenameCURE/ccserver b/CodenameCURE/ccserver index 00767735f..0fcd67964 100644 --- a/CodenameCURE/ccserver +++ b/CodenameCURE/ccserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/CounterStrike/csserver b/CounterStrike/csserver index 1acc5c203..8fae4ad6d 100644 --- a/CounterStrike/csserver +++ b/CounterStrike/csserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/CounterStrikeConditionZero/csczserver b/CounterStrikeConditionZero/csczserver index d478e5130..21b58f060 100644 --- a/CounterStrikeConditionZero/csczserver +++ b/CounterStrikeConditionZero/csczserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/CounterStrikeGlobalOffensive/csgoserver b/CounterStrikeGlobalOffensive/csgoserver index 6e06cce57..00234ea57 100755 --- a/CounterStrikeGlobalOffensive/csgoserver +++ b/CounterStrikeGlobalOffensive/csgoserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/CounterStrikeSource/cssserver b/CounterStrikeSource/cssserver index 5748f9482..6710cd78d 100644 --- a/CounterStrikeSource/cssserver +++ b/CounterStrikeSource/cssserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/DayOfDefeat/dodserver b/DayOfDefeat/dodserver index b8d5fd24c..f1638263e 100644 --- a/DayOfDefeat/dodserver +++ b/DayOfDefeat/dodserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/DayOfDefeatSource/dodsserver b/DayOfDefeatSource/dodsserver index feae13543..bee83c953 100644 --- a/DayOfDefeatSource/dodsserver +++ b/DayOfDefeatSource/dodsserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/DayOfInfamy/doiserver b/DayOfInfamy/doiserver index 3059345ab..da1605b39 100644 --- a/DayOfInfamy/doiserver +++ b/DayOfInfamy/doiserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/DeathmatchClassic/dmcserver b/DeathmatchClassic/dmcserver index 38487c7fc..58b6c4282 100644 --- a/DeathmatchClassic/dmcserver +++ b/DeathmatchClassic/dmcserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/DontStarveTogether/dstserver b/DontStarveTogether/dstserver index 28a104219..260a57a39 100644 --- a/DontStarveTogether/dstserver +++ b/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 \ No newline at end of file +core_getopt.sh diff --git a/DoubleActionBoogaloo/dabserver b/DoubleActionBoogaloo/dabserver index 8466f6d5d..0938bd94a 100644 --- a/DoubleActionBoogaloo/dabserver +++ b/DoubleActionBoogaloo/dabserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/FistfulOfFrags/fofserver b/FistfulOfFrags/fofserver index 5be1b822a..224ad89db 100644 --- a/FistfulOfFrags/fofserver +++ b/FistfulOfFrags/fofserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/GarrysMod/gmodserver b/GarrysMod/gmodserver index ea7e16c0a..379e36a08 100644 --- a/GarrysMod/gmodserver +++ b/GarrysMod/gmodserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/GoldenEyeSource/gesserver b/GoldenEyeSource/gesserver index 7eb70c8ba..c661a3d91 100644 --- a/GoldenEyeSource/gesserver +++ b/GoldenEyeSource/gesserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/HalfLife2Deathmatch/hl2dmserver b/HalfLife2Deathmatch/hl2dmserver index d2e98e034..49be6d637 100644 --- a/HalfLife2Deathmatch/hl2dmserver +++ b/HalfLife2Deathmatch/hl2dmserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/HalfLifeDeathmatch/hldmserver b/HalfLifeDeathmatch/hldmserver index 455bd016c..53bd98dc4 100644 --- a/HalfLifeDeathmatch/hldmserver +++ b/HalfLifeDeathmatch/hldmserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/HalfLifeDeathmatchSource/hldmsserver b/HalfLifeDeathmatchSource/hldmsserver index e5e992ef7..d0c9c33db 100644 --- a/HalfLifeDeathmatchSource/hldmsserver +++ b/HalfLifeDeathmatchSource/hldmsserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/Hurtworld/hwserver b/Hurtworld/hwserver index 81e085dcd..930f367be 100644 --- a/Hurtworld/hwserver +++ b/Hurtworld/hwserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/Insurgency/insserver b/Insurgency/insserver index 89589bdbb..6427fcdb7 100644 --- a/Insurgency/insserver +++ b/Insurgency/insserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/JustCause2/jc2server b/JustCause2/jc2server index 5ee07555e..1a4fa6c9a 100644 --- a/JustCause2/jc2server +++ b/JustCause2/jc2server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/KillingFloor/kfserver b/KillingFloor/kfserver index 6ff0300c1..53080e2a7 100644 --- a/KillingFloor/kfserver +++ b/KillingFloor/kfserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/Left4Dead/l4dserver b/Left4Dead/l4dserver index c72e1c6ec..b550880fa 100644 --- a/Left4Dead/l4dserver +++ b/Left4Dead/l4dserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/Left4Dead2/l4d2server b/Left4Dead2/l4d2server index 03f71e71e..8aee908b5 100644 --- a/Left4Dead2/l4d2server +++ b/Left4Dead2/l4d2server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/Minecraft/mcserver b/Minecraft/mcserver index eaac52215..320edc90d 100644 --- a/Minecraft/mcserver +++ b/Minecraft/mcserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/Mumble/mumbleserver b/Mumble/mumbleserver index 6e830badb..be06c44ef 100644 --- a/Mumble/mumbleserver +++ b/Mumble/mumbleserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/NS2Combat/ns2cserver b/NS2Combat/ns2cserver index 77688302f..437921ad3 100644 --- a/NS2Combat/ns2cserver +++ b/NS2Combat/ns2cserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/NaturalSelection2/ns2server b/NaturalSelection2/ns2server index bbb60dc34..3ce13f844 100644 --- a/NaturalSelection2/ns2server +++ b/NaturalSelection2/ns2server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/NoMoreRoomInHell/nmrihserver b/NoMoreRoomInHell/nmrihserver index 2c4e37ffe..6409591fc 100644 --- a/NoMoreRoomInHell/nmrihserver +++ b/NoMoreRoomInHell/nmrihserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/OpposingForce/opforserver b/OpposingForce/opforserver index 7b3cc6ef6..8fe185650 100644 --- a/OpposingForce/opforserver +++ b/OpposingForce/opforserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/PiratesVikingandKnightsII/pvkiiserver b/PiratesVikingandKnightsII/pvkiiserver index 4861430fe..e2c920423 100644 --- a/PiratesVikingandKnightsII/pvkiiserver +++ b/PiratesVikingandKnightsII/pvkiiserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/ProjectZomboid/pzserver b/ProjectZomboid/pzserver index 782a2118c..481dbdd75 100644 --- a/ProjectZomboid/pzserver +++ b/ProjectZomboid/pzserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/Quake2/q2server b/Quake2/q2server index 3a0723a1a..206ab8379 100644 --- a/Quake2/q2server +++ b/Quake2/q2server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/Quake3/q3server b/Quake3/q3server index 445875a85..ae71118ec 100644 --- a/Quake3/q3server +++ b/Quake3/q3server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/QuakeLive/qlserver b/QuakeLive/qlserver index 19fb451fa..d7be6d83d 100755 --- a/QuakeLive/qlserver +++ b/QuakeLive/qlserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/RedOrchestra/roserver b/RedOrchestra/roserver index 97534b981..85bd1b103 100644 --- a/RedOrchestra/roserver +++ b/RedOrchestra/roserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/Ricochet/ricochetserver b/Ricochet/ricochetserver index 419bc04c6..aaaf3f761 100644 --- a/Ricochet/ricochetserver +++ b/Ricochet/ricochetserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/Rust/rustserver b/Rust/rustserver index 3a19bb140..f02e29231 100644 --- a/Rust/rustserver +++ b/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" diff --git a/SeriousSam3BFE/ss3sserver b/SeriousSam3BFE/ss3sserver index bf5b8b3d9..f668959d6 100644 --- a/SeriousSam3BFE/ss3sserver +++ b/SeriousSam3BFE/ss3sserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/Starbound/sbserver b/Starbound/sbserver index ef4f73ef9..d4d93913f 100644 --- a/Starbound/sbserver +++ b/Starbound/sbserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/SvenCoop/svenserver b/SvenCoop/svenserver index c6fecf4ba..c69706307 100644 --- a/SvenCoop/svenserver +++ b/SvenCoop/svenserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/TeamFortress2/tf2server b/TeamFortress2/tf2server index 2d9a3da3c..c4ae5feae 100644 --- a/TeamFortress2/tf2server +++ b/TeamFortress2/tf2server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/TeamFortressClassic/tfcserver b/TeamFortressClassic/tfcserver index 9b80dca60..68be7bfb0 100644 --- a/TeamFortressClassic/tfcserver +++ b/TeamFortressClassic/tfcserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/TeamSpeak3/ts3server b/TeamSpeak3/ts3server index 10e3344ec..b22971108 100644 --- a/TeamSpeak3/ts3server +++ b/TeamSpeak3/ts3server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/Teeworlds/twserver b/Teeworlds/twserver index 2db116724..367baa386 100644 --- a/Teeworlds/twserver +++ b/Teeworlds/twserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/Terraria/terrariaserver b/Terraria/terrariaserver index bcc9a270e..cc68d2632 100644 --- a/Terraria/terrariaserver +++ b/Terraria/terrariaserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/UnrealTournament/utserver b/UnrealTournament/utserver index e40cba5cb..23a0d0ff1 100644 --- a/UnrealTournament/utserver +++ b/UnrealTournament/utserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/UnrealTournament2004/ut2k4server b/UnrealTournament2004/ut2k4server index bfbce6d08..2ee0f9b3f 100644 --- a/UnrealTournament2004/ut2k4server +++ b/UnrealTournament2004/ut2k4server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/UnrealTournament3/ut3server b/UnrealTournament3/ut3server index 3a70643ee..f721859b0 100644 --- a/UnrealTournament3/ut3server +++ b/UnrealTournament3/ut3server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/UnrealTournament99/ut99server b/UnrealTournament99/ut99server index c08403f97..8a86a4bfb 100644 --- a/UnrealTournament99/ut99server +++ b/UnrealTournament99/ut99server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/WolfensteinEnemyTerritory/wetserver b/WolfensteinEnemyTerritory/wetserver index ff33e2647..7cddd0575 100644 --- a/WolfensteinEnemyTerritory/wetserver +++ b/WolfensteinEnemyTerritory/wetserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ######## diff --git a/lgsm/functions/alert_email.sh b/lgsm/functions/alert_email.sh index abca02525..6b440070c 100644 --- a/lgsm/functions/alert_email.sh +++ b/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 diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh index 62d9ed6f6..36e0a8f04 100644 --- a/lgsm/functions/check_deps.sh +++ b/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 diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index 598451dc5..5ab856ed0 100644 --- a/lgsm/functions/command_details.sh +++ b/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 diff --git a/lgsm/functions/command_install.sh b/lgsm/functions/command_install.sh index 208f8e3d5..d7c3cbc54 100644 --- a/lgsm/functions/command_install.sh +++ b/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 diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index 2e5de3402..7f247795f 100644 --- a/lgsm/functions/command_monitor.sh +++ b/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 diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index f5ba4ce9e..ae1b436ea 100644 --- a/lgsm/functions/core_functions.sh +++ b/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 diff --git a/lgsm/functions/core_getopt.sh b/lgsm/functions/core_getopt.sh index 2178c1acb..8434f4454 100644 --- a/lgsm/functions/core_getopt.sh +++ b/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 diff --git a/lgsm/functions/fix.sh b/lgsm/functions/fix.sh index 5671ed627..85a65a814 100644 --- a/lgsm/functions/fix.sh +++ b/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 diff --git a/lgsm/functions/fix_rust.sh b/lgsm/functions/fix_rust.sh new file mode 100644 index 000000000..ec0b125d4 --- /dev/null +++ b/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" diff --git a/lgsm/functions/gsquery.py b/lgsm/functions/gsquery.py index e45d891cb..512d7411b 100644 --- a/lgsm/functions/gsquery.py +++ b/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', diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 318bf9da0..09cd8900d 100644 --- a/lgsm/functions/info_config.sh +++ b/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 diff --git a/lgsm/functions/info_glibc.sh b/lgsm/functions/info_glibc.sh index 0a4dd888a..b8b29239c 100644 --- a/lgsm/functions/info_glibc.sh +++ b/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" diff --git a/lgsm/functions/info_parms.sh b/lgsm/functions/info_parms.sh index 7cfdd8b8b..72ef857c9 100644 --- a/lgsm/functions/info_parms.sh +++ b/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 } diff --git a/lgsm/functions/install_complete.sh b/lgsm/functions/install_complete.sh index af522d2ee..4a38d79b4 100644 --- a/lgsm/functions/install_complete.sh +++ b/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!" diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 4e617ab62..b5f7a1148 100644 --- a/lgsm/functions/install_config.sh +++ b/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 \ No newline at end of file diff --git a/lgsm/functions/install_dst_token.sh b/lgsm/functions/install_dst_token.sh new file mode 100644 index 000000000..2e9713e71 --- /dev/null +++ b/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 "" diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index e7345cd8e..bc28bd2f2 100644 --- a/lgsm/functions/install_server_files.sh +++ b/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 diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index d141d58c7..c4d46cbcb 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -17,7 +17,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161118" +version="161125" ########################## ######## Settings ########