diff --git a/7DaysToDie/sdtdserver b/7DaysToDie/sdtdserver index 518628004..0ab687af9 100644 --- a/7DaysToDie/sdtdserver +++ b/7DaysToDie/sdtdserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/ARKSurvivalEvolved/arkserver b/ARKSurvivalEvolved/arkserver index cd8a603d3..d47590b77 100644 --- a/ARKSurvivalEvolved/arkserver +++ b/ARKSurvivalEvolved/arkserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/Arma3/arma3server b/Arma3/arma3server index f6c03be06..74b5532b6 100644 --- a/Arma3/arma3server +++ b/Arma3/arma3server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/Battlefield1942/bf1942server b/Battlefield1942/bf1942server index ae7447aa9..7e21c0fbc 100644 --- a/Battlefield1942/bf1942server +++ b/Battlefield1942/bf1942server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/BlackMesa/bmdmserver b/BlackMesa/bmdmserver index 6baa4e739..05d93a735 100644 --- a/BlackMesa/bmdmserver +++ b/BlackMesa/bmdmserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/BladeSymphony/bsserver b/BladeSymphony/bsserver index 1e5ad15cc..6a486a16e 100644 --- a/BladeSymphony/bsserver +++ b/BladeSymphony/bsserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/BrainBread2/bb2server b/BrainBread2/bb2server index 8668fffce..72700d7e3 100644 --- a/BrainBread2/bb2server +++ b/BrainBread2/bb2server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a90acec99..fbbbb0430 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,11 +9,11 @@ Before working on a project we recommend that you create a issue in regards to t Here are some important resources: * [Issues Page](https://github.com/GameServerManagers/LinuxGSM/issues) provides a list of areas that could use some work, - * [Developing LGSM](https://github.com/GameServerManagers/LinuxGSM/wiki/Developing-LGSM) gives a detailed guide on developing LGSM, - * [LGSM Exit Codes](https://github.com/GameServerManagers/LinuxGSM/wiki/LGSM-Exit-Codes) describes and gives an explanation for exit codes, + * [Developing LinuxGSM](https://github.com/GameServerManagers/LinuxGSM/wiki/Developing-LGSM) gives a detailed guide on developing LGSM, + * [LinuxGSM Exit Codes](https://github.com/GameServerManagers/LinuxGSM/wiki/LGSM-Exit-Codes) describes and gives an explanation for exit codes, * [gsquery](https://github.com/GameServerManagers/LinuxGSM/wiki/gsquery.py) describes the uses of the gsquery.py file, and * [Branching](https://github.com/GameServerManagers/LinuxGSM/wiki/Branching) is our final guide to submitting changes. - + ## Testing Please make sure all the code you write is working properly **before** you create a pull request. Information on debugging can be found in the following document: @@ -27,7 +27,7 @@ Please send a [GitHub Pull Request to LinuxGSM](https://github.com/GameServerMan Always write a clear log message for your commits. One-line messages are fine for small changes, but bigger changes should look like this: $ git commit -m "A brief summary of the commit - > + > > A paragraph describing what changed and its impact." This will help us in understanding your code and determining where problems may arise. diff --git a/CallOfDuty/codserver b/CallOfDuty/codserver index b13aa8ed2..c9fd27ae1 100755 --- a/CallOfDuty/codserver +++ b/CallOfDuty/codserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/CallOfDuty2/cod2server b/CallOfDuty2/cod2server index 2939c036e..61eac16a7 100755 --- a/CallOfDuty2/cod2server +++ b/CallOfDuty2/cod2server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/CallOfDuty4/cod4server b/CallOfDuty4/cod4server index 661077042..4c9e3c48a 100644 --- a/CallOfDuty4/cod4server +++ b/CallOfDuty4/cod4server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/CallOfDutyUnitedOffensive/coduoserver b/CallOfDutyUnitedOffensive/coduoserver index 172af806c..1006c9aaf 100755 --- a/CallOfDutyUnitedOffensive/coduoserver +++ b/CallOfDutyUnitedOffensive/coduoserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/CallOfDutyWorldAtWar/codwawserver b/CallOfDutyWorldAtWar/codwawserver index 43b5c7a42..1af43280e 100755 --- a/CallOfDutyWorldAtWar/codwawserver +++ b/CallOfDutyWorldAtWar/codwawserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/CodenameCURE/ccserver b/CodenameCURE/ccserver index 30bb0a0b2..aa7233712 100644 --- a/CodenameCURE/ccserver +++ b/CodenameCURE/ccserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/CounterStrike/csserver b/CounterStrike/csserver index e6de0dc7e..72eb9bb2a 100644 --- a/CounterStrike/csserver +++ b/CounterStrike/csserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/CounterStrikeClassicOffensive/cscoserver b/CounterStrikeClassicOffensive/cscoserver deleted file mode 100755 index 09a247588..000000000 --- a/CounterStrikeClassicOffensive/cscoserver +++ /dev/null @@ -1,205 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 Daniel Gibbs -# Purpose: Counter-Strike: Classic Offensive | Server Management Script -# Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors -# Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki -# Website: https://gameservermanagers.com - -# Debugging -if [ -f ".dev-debug" ]; then - exec 5>dev-debug.log - BASH_XTRACEFD="5" - set -x -fi - -version="170128" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -defaultmap="de_dust2_csco" -maxplayers="16" -port="27015" -sourcetvport="27020" -clientport="27005" -ip="0.0.0.0" - -## Required: Game Server Login Token -# GSLT is required for running a public server. -# More info: https://gameservermanagers.com/gslt -gslt="" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="-game csco -usercon -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers_override ${maxplayers}" -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="740" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## 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="Counter-Strike: Classic Offensive" -engine="source" - -## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers -servicename="csco-server" - -#### Directories #### -# Edit with care - -## Work Directories -rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" -selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -lockselfname=".${servicename}.lock" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/csco" -executabledir="${filesdir}" -executable="./srcds_run" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}/cfg" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/CounterStrikeConditionZero/csczserver b/CounterStrikeConditionZero/csczserver index ba70f15f3..ff72163e8 100644 --- a/CounterStrikeConditionZero/csczserver +++ b/CounterStrikeConditionZero/csczserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/CounterStrikeGlobalOffensive/csgoserver b/CounterStrikeGlobalOffensive/csgoserver index 347983ebb..c630e9888 100755 --- a/CounterStrikeGlobalOffensive/csgoserver +++ b/CounterStrikeGlobalOffensive/csgoserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/CounterStrikeSource/cssserver b/CounterStrikeSource/cssserver index be253b1d8..2a8a0b805 100644 --- a/CounterStrikeSource/cssserver +++ b/CounterStrikeSource/cssserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/DayOfDefeat/dodserver b/DayOfDefeat/dodserver index 83929712f..cae5ce0e1 100644 --- a/DayOfDefeat/dodserver +++ b/DayOfDefeat/dodserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/DayOfDefeatSource/dodsserver b/DayOfDefeatSource/dodsserver index 60dfa9f66..4fcca9610 100644 --- a/DayOfDefeatSource/dodsserver +++ b/DayOfDefeatSource/dodsserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/DayOfInfamy/doiserver b/DayOfInfamy/doiserver index acf036430..0ea17b569 100644 --- a/DayOfInfamy/doiserver +++ b/DayOfInfamy/doiserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/DeathmatchClassic/dmcserver b/DeathmatchClassic/dmcserver index fbd3ee106..17e96aa9c 100644 --- a/DeathmatchClassic/dmcserver +++ b/DeathmatchClassic/dmcserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/DontStarveTogether/dstserver b/DontStarveTogether/dstserver index 972009a08..ec0e5a12b 100644 --- a/DontStarveTogether/dstserver +++ b/DontStarveTogether/dstserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/DoubleActionBoogaloo/dabserver b/DoubleActionBoogaloo/dabserver index 04ab7fdda..d803cacfa 100644 --- a/DoubleActionBoogaloo/dabserver +++ b/DoubleActionBoogaloo/dabserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/EmpiresMod/emserver b/EmpiresMod/emserver index e628f4c42..9f9771d57 100644 --- a/EmpiresMod/emserver +++ b/EmpiresMod/emserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/Factorio/fctrserver b/Factorio/fctrserver index f6b29d916..f92db7e47 100644 --- a/Factorio/fctrserver +++ b/Factorio/fctrserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/FistfulOfFrags/fofserver b/FistfulOfFrags/fofserver index 9039576f5..ee2ec15c0 100644 --- a/FistfulOfFrags/fofserver +++ b/FistfulOfFrags/fofserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/GarrysMod/gmodserver b/GarrysMod/gmodserver index 4a790b467..d48af2545 100644 --- a/GarrysMod/gmodserver +++ b/GarrysMod/gmodserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/GoldenEyeSource/gesserver b/GoldenEyeSource/gesserver index 228d54523..20c639879 100644 --- a/GoldenEyeSource/gesserver +++ b/GoldenEyeSource/gesserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/HalfLife2Deathmatch/hl2dmserver b/HalfLife2Deathmatch/hl2dmserver index 53cc2f4ab..adb1e18e2 100644 --- a/HalfLife2Deathmatch/hl2dmserver +++ b/HalfLife2Deathmatch/hl2dmserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/HalfLifeDeathmatch/hldmserver b/HalfLifeDeathmatch/hldmserver index b008887a9..4c007e738 100644 --- a/HalfLifeDeathmatch/hldmserver +++ b/HalfLifeDeathmatch/hldmserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/HalfLifeDeathmatchSource/hldmsserver b/HalfLifeDeathmatchSource/hldmsserver index 22ab2c5d1..68c4b1904 100644 --- a/HalfLifeDeathmatchSource/hldmsserver +++ b/HalfLifeDeathmatchSource/hldmsserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/Hurtworld/hwserver b/Hurtworld/hwserver index 24b43ca40..2e1f7e45f 100644 --- a/Hurtworld/hwserver +++ b/Hurtworld/hwserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## @@ -23,7 +23,7 @@ version="170128" #### Server Settings #### ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -servername="Hurtworld LGSM Server" +servername="Hurtworld LinuxGSM Server" ip="0.0.0.0" port="12871" queryport="12881" diff --git a/Insurgency/insserver b/Insurgency/insserver index d6f7a8841..5778bf628 100644 --- a/Insurgency/insserver +++ b/Insurgency/insserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/JustCause2/jc2server b/JustCause2/jc2server index 0f4ef2dba..077595ecf 100644 --- a/JustCause2/jc2server +++ b/JustCause2/jc2server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/KillingFloor/kfserver b/KillingFloor/kfserver index de04e2db9..5e32707a1 100644 --- a/KillingFloor/kfserver +++ b/KillingFloor/kfserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/Left4Dead/l4dserver b/Left4Dead/l4dserver index 915efab6f..d9a755c65 100644 --- a/Left4Dead/l4dserver +++ b/Left4Dead/l4dserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/Left4Dead2/l4d2server b/Left4Dead2/l4d2server index 8d9e428fa..ac3fa7edf 100644 --- a/Left4Dead2/l4d2server +++ b/Left4Dead2/l4d2server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/Minecraft/mcserver b/Minecraft/mcserver index 39db226d1..9ebf44f4a 100644 --- a/Minecraft/mcserver +++ b/Minecraft/mcserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/MultiTheftAuto/mtaserver b/MultiTheftAuto/mtaserver index 1fc07fdbb..1132e0cc9 100644 --- a/MultiTheftAuto/mtaserver +++ b/MultiTheftAuto/mtaserver @@ -12,7 +12,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170103" +version="170212" ########################## ######## Settings ######## diff --git a/Mumble/mumbleserver b/Mumble/mumbleserver index e19c936cd..b27f06ba5 100644 --- a/Mumble/mumbleserver +++ b/Mumble/mumbleserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/NS2Combat/ns2cserver b/NS2Combat/ns2cserver index 41949f3c6..b7014072f 100644 --- a/NS2Combat/ns2cserver +++ b/NS2Combat/ns2cserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/NaturalSelection2/ns2server b/NaturalSelection2/ns2server index 272f68fef..6f6b0cfd2 100644 --- a/NaturalSelection2/ns2server +++ b/NaturalSelection2/ns2server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/NoMoreRoomInHell/nmrihserver b/NoMoreRoomInHell/nmrihserver index 0c44dd2ff..92f39d795 100644 --- a/NoMoreRoomInHell/nmrihserver +++ b/NoMoreRoomInHell/nmrihserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/OpposingForce/opforserver b/OpposingForce/opforserver index 32a668f53..17ce539fb 100644 --- a/OpposingForce/opforserver +++ b/OpposingForce/opforserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/PiratesVikingandKnightsII/pvkiiserver b/PiratesVikingandKnightsII/pvkiiserver index 7442c678a..e909137d3 100644 --- a/PiratesVikingandKnightsII/pvkiiserver +++ b/PiratesVikingandKnightsII/pvkiiserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/ProjectZomboid/pzserver b/ProjectZomboid/pzserver index 31cc52efa..3339ac2d6 100644 --- a/ProjectZomboid/pzserver +++ b/ProjectZomboid/pzserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/Quake2/q2server b/Quake2/q2server index e86933c26..9ebc1163e 100644 --- a/Quake2/q2server +++ b/Quake2/q2server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/Quake3/q3server b/Quake3/q3server index aca7dfcde..b959e7a20 100644 --- a/Quake3/q3server +++ b/Quake3/q3server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/QuakeLive/qlserver b/QuakeLive/qlserver index 7433273d9..ac5f4ab39 100755 --- a/QuakeLive/qlserver +++ b/QuakeLive/qlserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/QuakeWorld/qwserver b/QuakeWorld/qwserver index 800ada9cd..081c5a81a 100644 --- a/QuakeWorld/qwserver +++ b/QuakeWorld/qwserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/RedOrchestra/roserver b/RedOrchestra/roserver index 19d4b65cf..f7b883560 100644 --- a/RedOrchestra/roserver +++ b/RedOrchestra/roserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/Ricochet/ricochetserver b/Ricochet/ricochetserver index e1486d67f..2cfc3b93f 100644 --- a/Ricochet/ricochetserver +++ b/Ricochet/ricochetserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/Rust/rustserver b/Rust/rustserver index 8d4ded872..9557f914d 100644 --- a/Rust/rustserver +++ b/Rust/rustserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/SeriousSam3BFE/ss3sserver b/SeriousSam3BFE/ss3sserver index 029db5b59..8c1b31ebd 100644 --- a/SeriousSam3BFE/ss3sserver +++ b/SeriousSam3BFE/ss3sserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/Starbound/sbserver b/Starbound/sbserver index 38f48c97e..c0d59f47e 100644 --- a/Starbound/sbserver +++ b/Starbound/sbserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/SvenCoop/svenserver b/SvenCoop/svenserver index b401e72ea..b320e8812 100644 --- a/SvenCoop/svenserver +++ b/SvenCoop/svenserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/TeamFortress2/tf2server b/TeamFortress2/tf2server index e9982d1f8..313a63c3a 100644 --- a/TeamFortress2/tf2server +++ b/TeamFortress2/tf2server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/TeamFortressClassic/tfcserver b/TeamFortressClassic/tfcserver index 501ef64a4..ed3d30662 100644 --- a/TeamFortressClassic/tfcserver +++ b/TeamFortressClassic/tfcserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/TeamSpeak3/ts3server b/TeamSpeak3/ts3server index 6df71f193..e28b52d2e 100644 --- a/TeamSpeak3/ts3server +++ b/TeamSpeak3/ts3server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/Teeworlds/twserver b/Teeworlds/twserver index e038f175f..60d8dc5fc 100644 --- a/Teeworlds/twserver +++ b/Teeworlds/twserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/Terraria/terrariaserver b/Terraria/terrariaserver index 1f803e45b..5c5b7839c 100644 --- a/Terraria/terrariaserver +++ b/Terraria/terrariaserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/BallisticOverkill/boserver b/TowerUnite/tuserver old mode 100755 new mode 100644 similarity index 87% rename from BallisticOverkill/boserver rename to TowerUnite/tuserver index c17e02b6e..5483eed93 --- a/BallisticOverkill/boserver +++ b/TowerUnite/tuserver @@ -2,7 +2,7 @@ # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs # License: MIT License, Copyright (c) 2017 Daniel Gibbs -# Purpose: Ballistic Overkill | Server Management Script +# Purpose: Tower Unite | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki # Website: https://gameservermanagers.com @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## @@ -22,14 +22,14 @@ version="170128" #### Server Settings #### -## Optional: Game Server Login Token -# GSLT can be used for running a public server. -# More info: https://gameservermanagers.com/gslt -gslt="" +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +port="7777" +queryport="27015" +ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters fn_parms(){ -parms=" -batchmode -nographics -logFile output.txt" +parms="-log -MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -TowerServerINI=${servicename}.ini" } #### LinuxGSM Settings #### @@ -60,28 +60,28 @@ logdays="7" #### LinuxGSM Advanced Settings #### -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - ## SteamCMD Settings # Server appid -appid="416880" +appid="439660" # Steam App Branch Select # Allows to opt into the various Steam app branches. Default branch is "". # Example: "-beta latest_experimental" branch="" +## 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="Ballistic Overkill" -engine="unity" +gamename="Tower Unite" +engine="unreal4" ## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers -servicename="bo-server" +servicename="tu-server" #### Directories #### # Edit with care @@ -97,20 +97,19 @@ tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" ## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" -executable="./BODS.x86" -servercfg="config.txt" -servercfgdefault="${servercfg}" -servercfgdir="${systemdir}" +systemdir="${filesdir}/Tower" +executabledir="${systemdir}/Binaries/Linux" +executable="./TowerServer-Linux-Shipping" +servercfgdir="${systemdir}/Binaries/Linux" +servercfg="${servicename}.ini" servercfgfullpath="${servercfgdir}/${servercfg}" - +servercfgdefault="TowerServer.ini" ## Backup Directory backupdir="${rootdir}/backups" -## Logging Directorie -gamelogdir="${systemdir}/logs" +## Logging Directories +gamelogdir="${systemdir}/Saved/Logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" scriptlog="${scriptlogdir}/${servicename}-script.log" @@ -195,4 +194,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/UnrealTournament/utserver b/UnrealTournament/utserver index 6e3afdf5b..037948bfe 100644 --- a/UnrealTournament/utserver +++ b/UnrealTournament/utserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/UnrealTournament2004/ut2k4server b/UnrealTournament2004/ut2k4server index 1cbfd4c59..ae270fbb7 100644 --- a/UnrealTournament2004/ut2k4server +++ b/UnrealTournament2004/ut2k4server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/UnrealTournament3/ut3server b/UnrealTournament3/ut3server index 5dfe1207d..f03d2c9a4 100644 --- a/UnrealTournament3/ut3server +++ b/UnrealTournament3/ut3server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/UnrealTournament99/ut99server b/UnrealTournament99/ut99server index 237c1531a..4891a9cba 100644 --- a/UnrealTournament99/ut99server +++ b/UnrealTournament99/ut99server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/WolfensteinEnemyTerritory/wetserver b/WolfensteinEnemyTerritory/wetserver index bfc0cbd16..29d4f889c 100644 --- a/WolfensteinEnemyTerritory/wetserver +++ b/WolfensteinEnemyTerritory/wetserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/images/logo/README.md b/images/logo/README.md index ef9c9c3f7..4c3b9e790 100644 --- a/images/logo/README.md +++ b/images/logo/README.md @@ -1,3 +1,3 @@ -# LGSM - Official Logos +# LinuxGSM - Official Logos For Reference the original design can be found here. http://twolofbees.com/artwork.php?iid=870 \ No newline at end of file diff --git a/lgsm/functions/alert.sh b/lgsm/functions/alert.sh index 9cef86e95..afcec526c 100644 --- a/lgsm/functions/alert.sh +++ b/lgsm/functions/alert.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM alert.sh function +# LinuxGSM alert.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Overall function for managing alerts. @@ -9,36 +9,44 @@ local commandaction="Alert" fn_alert_test(){ fn_script_log_info "Sending test alert" - alertsubject="LGSM - Test Alert - ${servername}" - alertbody="LGSM test alert, how you read?" + alertsubject="LinuxGSM - Test Alert - ${servername}" + alertbody="LinuxGSM test alert, how you read?" } fn_alert_restart(){ fn_script_log_info "Sending restart alert: ${executable} process not running" - alertsubject="LGSM - Restarted - ${servername}" + alertsubject="LinuxGSM - Restarted - ${servername}" alertbody="${servicename} ${executable} process not running" } fn_alert_restart_query(){ fn_script_log_info "Sending restart alert: ${gsquerycmd}" - alertsubject="LGSM - Restarted - ${servername}" + alertsubject="LinuxGSM - Restarted - ${servername}" alertbody="gsquery.py failed to query: ${gsquerycmd}" } fn_alert_update(){ fn_script_log_info "Sending update alert" - alertsubject="LGSM - Updated - ${servername}" + alertsubject="LinuxGSM - Updated - ${servername}" alertbody="${servicename} received update" } -if [ "${alert}" == "restart" ]; then +fn_alert_permissions(){ + fn_script_log_info "Sending permissions error alert" + alertsubject="LinuxGSM - Error - ${servername}" + alertbody="${servicename} has permissions issues." +} + +if [ "${alert}" == "permissions" ]; then + fn_alert_permissions +elif [ "${alert}" == "restart" ]; then fn_alert_restart elif [ "${alert}" == "restartquery" ]; then fn_alert_restart_query -elif [ "${alert}" == "update" ]; then - fn_alert_update elif [ "${alert}" == "test" ]; then fn_alert_test +elif [ "${alert}" == "update" ]; then + fn_alert_update fi if [ "${emailalert}" == "on" ]&&[ -n "${email}" ]; then diff --git a/lgsm/functions/alert_email.sh b/lgsm/functions/alert_email.sh index 6b440070c..a49dda347 100644 --- a/lgsm/functions/alert_email.sh +++ b/lgsm/functions/alert_email.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM alert_email.sh function +# LinuxGSM alert_email.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Sends email alert including server details and logs. diff --git a/lgsm/functions/alert_pushbullet.sh b/lgsm/functions/alert_pushbullet.sh index aecf3d875..05276b010 100644 --- a/lgsm/functions/alert_pushbullet.sh +++ b/lgsm/functions/alert_pushbullet.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM alert_pushbullet.sh function +# LinuxGSM alert_pushbullet.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Sends Pushbullet alert including the server status. diff --git a/lgsm/functions/check.sh b/lgsm/functions/check.sh index b48edf27c..7cc1e9584 100644 --- a/lgsm/functions/check.sh +++ b/lgsm/functions/check.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM check.sh function +# LinuxGSM check.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Overall function for managing checks. @@ -12,7 +12,10 @@ local commandname="CHECK" check_root.sh check_tmuxception.sh -check_permissions.sh + +if [ "${function_selfname}" != "command_monitor.sh" ];then + check_permissions.sh +fi if [ "${function_selfname}" != "command_install.sh" ]&&[ "${function_selfname}" != "command_update_functions.sh" ]; then check_system_dir.sh diff --git a/lgsm/functions/check_config.sh b/lgsm/functions/check_config.sh index 72ea95c5c..7b1ff92cf 100644 --- a/lgsm/functions/check_config.sh +++ b/lgsm/functions/check_config.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM check_config.sh function +# LinuxGSM check_config.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Checks if the server config is missing and warns the user if needed. diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh index ea16e4b19..a159f858c 100644 --- a/lgsm/functions/check_deps.sh +++ b/lgsm/functions/check_deps.sh @@ -1,8 +1,8 @@ #!/bin/bash -# LGSM check_deps.sh function +# LinuxGSM check_deps.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com -# Description: Checks if required dependencies are installed for LGSM. +# Description: Checks if required dependencies are installed for LinuxGSM. local commandname="CHECK" @@ -144,7 +144,7 @@ if [ -n "$(command -v dpkg-query)" ]; then # Generate array of missing deps array_deps_missing=() - # LGSM requirements + # LinuxGSM requirements array_deps_required=( curl wget ca-certificates file bsdmainutils util-linux python bzip2 gzip unzip ) # All servers except ts3 require tmux @@ -223,7 +223,7 @@ elif [ -n "$(command -v yum)" ]; then # Generate array of missing deps array_deps_missing=() - # LGSM requirements + # LinuxGSM requirements if [ "${distroversion}" == "6" ]; then array_deps_required=( curl wget util-linux-ng python file gzip bzip2 unzip ) else diff --git a/lgsm/functions/check_executable.sh b/lgsm/functions/check_executable.sh index 94e517cb5..14ccdb060 100644 --- a/lgsm/functions/check_executable.sh +++ b/lgsm/functions/check_executable.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM check_executable.sh function +# LinuxGSM check_executable.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Checks if executable exists. diff --git a/lgsm/functions/check_glibc.sh b/lgsm/functions/check_glibc.sh index a5e5c95a0..f470589ab 100644 --- a/lgsm/functions/check_glibc.sh +++ b/lgsm/functions/check_glibc.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM check_glibc.sh function +# LinuxGSM check_glibc.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Checks if the server has the correct Glibc version or a fix available. diff --git a/lgsm/functions/check_ip.sh b/lgsm/functions/check_ip.sh index 8141c534e..5ae639237 100644 --- a/lgsm/functions/check_ip.sh +++ b/lgsm/functions/check_ip.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM check_ip.sh function +# LinuxGSM check_ip.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Automatically identifies the server interface IP. diff --git a/lgsm/functions/check_logs.sh b/lgsm/functions/check_logs.sh index 5bd69bb0f..5e9da586c 100644 --- a/lgsm/functions/check_logs.sh +++ b/lgsm/functions/check_logs.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM check_logs.sh function +# LinuxGSM check_logs.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Checks if log files exist. diff --git a/lgsm/functions/check_permissions.sh b/lgsm/functions/check_permissions.sh index defde5771..d7bff4dee 100644 --- a/lgsm/functions/check_permissions.sh +++ b/lgsm/functions/check_permissions.sh @@ -1,12 +1,11 @@ #!/bin/bash -# LGSM check_permissions.sh +# LinuxGSM check_permissions.sh # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com # Description: Checks ownership & permissions of scripts, files and directories. local commandname="CHECK" -local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" fn_check_ownership(){ if [ -f "${rootdir}/${selfname}" ]; then @@ -43,8 +42,12 @@ fn_check_ownership(){ } | column -s $'\t' -t | tee -a "${scriptlog}" echo "" - fn_print_information_nl "For more information, please see https://github.com/GameServerManagers/LinuxGSM/wiki/FAQ#-fail--starting-game-server-ownership-issues-found" + fn_print_information_nl "please see https://github.com/GameServerManagers/LinuxGSM/wiki/FAQ#-fail--starting-game-server-ownership-issues-found" fn_script_log "For more information, please see https://github.com/GameServerManagers/LinuxGSM/wiki/FAQ#-fail--starting-game-server-ownership-issues-found" + if [ "${monitorflag}" == 1 ]; then + alert="permissions" + alert.sh + fi core_exit.sh fi } @@ -60,6 +63,10 @@ fn_check_permissions(){ echo -e "File\n" find "${functionsdir}" -type f -not -executable -printf "%p\n" } | column -s $'\t' -t | tee -a "${scriptlog}" + if [ "${monitorflag}" == 1 ]; then + alert="permissions" + alert.sh + fi core_exit.sh fi fi @@ -78,6 +85,10 @@ fn_check_permissions(){ fn_script_log_info "The following directory does not have the correct permissions:" fn_script_log_info "${rootdir}" ls -l "${rootdir}" + if [ "${monitorflag}" == 1 ]; then + alert="permissions" + alert.sh + fi core_exit.sh fi fi @@ -118,6 +129,10 @@ fn_check_permissions(){ ls -l "${executabledir}/${execname}" fn_script_log_warn "The following file could not be set executable:" fn_script_log_info "${executabledir}/${execname}" + if [ "${monitorflag}" == 1 ]; then + alert="permissions" + alert.sh + fi core_exit.sh fi fi @@ -157,6 +172,10 @@ fn_sys_perm_fix_manually_msg(){ echo " chmod a+rx /sys /sys/class /sys/class/net" fn_script_log "chmod a+rx /sys /sys/class /sys/class/net" sleep 1 + if [ "${monitorflag}" == 1 ]; then + alert="permissions" + alert.sh + fi core_exit.sh } diff --git a/lgsm/functions/check_root.sh b/lgsm/functions/check_root.sh index 70067f5e5..a71c993d2 100644 --- a/lgsm/functions/check_root.sh +++ b/lgsm/functions/check_root.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM check_root.sh function +# LinuxGSM check_root.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Checks if the user tried to run the script as root. diff --git a/lgsm/functions/check_status.sh b/lgsm/functions/check_status.sh index 4a8a381b4..036bf7269 100644 --- a/lgsm/functions/check_status.sh +++ b/lgsm/functions/check_status.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM check_status.sh function +# LinuxGSM check_status.sh function # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com @@ -19,7 +19,7 @@ if [ "${gamename}" == "TeamSpeak 3" ]; then ts3error="${status}" status=0 fi - + elif [ "${gamename}" == "Mumble" ]; then # Get config info info_config.sh diff --git a/lgsm/functions/check_steamcmd.sh b/lgsm/functions/check_steamcmd.sh index 25b73a70b..ddfcb82d4 100644 --- a/lgsm/functions/check_steamcmd.sh +++ b/lgsm/functions/check_steamcmd.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM check_steamcmd.sh function +# LinuxGSM check_steamcmd.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Checks if SteamCMD is installed correctly. @@ -18,17 +18,17 @@ fn_install_steamcmd(){ fn_check_steamcmd_user(){ # Checks if steamuser is setup. if [ "${steamuser}" == "username" ]; then - fn_print_fail_nl "Steam login not set. Update steamuser in ${selfname}." + fn_print_fail_nl "Steam login not set. Update steamuser in ${selfname}" echo " * Change steamuser=\"username\" to a valid steam login." if [ -d "${scriptlogdir}" ]; then - fn_script_log_fatal "Steam login not set. Update steamuser in ${selfname}." + fn_script_log_fatal "Steam login not set. Update steamuser in ${selfname}" fi core_exit.sh fi # Anonymous user is set if steamuser is missing if [ -z "${steamuser}" ]; then if [ -d "${scriptlogdir}" ]; then - fn_script_log_info "Using anonymous Steam login." + fn_script_log_info "Using anonymous Steam login" fi steamuser="anonymous" steampass='' diff --git a/lgsm/functions/check_system_dir.sh b/lgsm/functions/check_system_dir.sh index d06cbba05..0e5c39718 100644 --- a/lgsm/functions/check_system_dir.sh +++ b/lgsm/functions/check_system_dir.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM check_system_dir.sh function +# LinuxGSM check_system_dir.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Checks if systemdir is accessible. diff --git a/lgsm/functions/check_system_requirements.sh b/lgsm/functions/check_system_requirements.sh index 3040a8406..56d1ffa3d 100644 --- a/lgsm/functions/check_system_requirements.sh +++ b/lgsm/functions/check_system_requirements.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM check_system_requirements.sh +# LinuxGSM check_system_requirements.sh # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com @@ -11,12 +11,16 @@ local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" info_distro.sh # RAM requirements in megabytes for each game or engine. -if [ "${gamename}" == "Rust" ]; then + +if [ "${gamename}" == "ARK: Survival Evolved" ]; then ramrequirementmb="4000" - ramrequirementgb="4" + ramrequirementgb="1" elif [ "${gamename}" == "ARMA 3" ]; then ramrequirementmb="1000" ramrequirementgb="1" +elif [ "${gamename}" == "Rust" ]; then + ramrequirementmb="4000" + ramrequirementgb="4" elif [ "${gamename}" == "Minecraft" ]; then ramrequirementmb="1000" ramrequirementgb="1" diff --git a/lgsm/functions/check_tmuxception.sh b/lgsm/functions/check_tmuxception.sh index 5b906f53e..53f6febd5 100644 --- a/lgsm/functions/check_tmuxception.sh +++ b/lgsm/functions/check_tmuxception.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM check_config.sh function +# LinuxGSM check_config.sh function # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com @@ -11,7 +11,7 @@ fn_check_is_in_tmux(){ if [ -n "${TMUX}" ];then fn_print_fail_nl "tmuxception error: Sorry Cobb you cannot start a tmux session inside of a tmux session." fn_script_log_fatal "Tmuxception error: Attempted to start a tmux session inside of a tmux session." - fn_print_information_nl "LGSM creates a tmux session when starting the server." + fn_print_information_nl "LinuxGSM creates a tmux session when starting the server." echo "It is not possible to run a tmux session inside another tmux session" echo "https://github.com/GameServerManagers/LinuxGSM/wiki/Tmux#tmuxception" core_exit.sh @@ -21,7 +21,7 @@ fn_check_is_in_screen(){ if [ -n "${STY}" ];then fn_print_fail_nl "tmuxception error: Sorry Cobb you cannot start a tmux session inside of a screen session." fn_script_log_fatal "Tmuxception error: Attempted to start a tmux session inside of a screen session." - fn_print_information_nl "LGSM creates a tmux session when starting the server." + fn_print_information_nl "LinuxGSM creates a tmux session when starting the server." echo "It is not possible to run a tmux session inside screen session" echo "https://github.com/GameServerManagers/LinuxGSM/wiki/Tmux#tmuxception" core_exit.sh diff --git a/lgsm/functions/command_backup.sh b/lgsm/functions/command_backup.sh index b4bff70b0..2ef072b0a 100644 --- a/lgsm/functions/command_backup.sh +++ b/lgsm/functions/command_backup.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_backup.sh function +# LinuxGSM command_backup.sh function # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com diff --git a/lgsm/functions/command_console.sh b/lgsm/functions/command_console.sh index e59d24a2f..98ddcae11 100644 --- a/lgsm/functions/command_console.sh +++ b/lgsm/functions/command_console.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_console.sh function +# LinuxGSM command_console.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Gives access to the server tmux console. diff --git a/lgsm/functions/command_debug.sh b/lgsm/functions/command_debug.sh index a98048638..5fcd1f6fd 100644 --- a/lgsm/functions/command_debug.sh +++ b/lgsm/functions/command_debug.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_debug.sh function +# LinuxGSM command_debug.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Runs the server without tmux and directly from the terminal. diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index e34f65702..debf5442d 100644 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_details.sh function +# LinuxGSM command_details.sh function # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com @@ -70,7 +70,7 @@ fn_details_disk(){ # Total: 15G # Used: 8.4G # Available: 5.7G - # LGSM Total: 1G + # LinuxGSM Total: 1G # Serverfiles: 961M # Backups: 2G @@ -82,7 +82,7 @@ fn_details_disk(){ echo -e "${blue}Total:\t${default}${totalspace}" echo -e "${blue}Used:\t${default}${usedspace}" echo -e "${blue}Available:\t${default}${availspace}" - echo -e "${blue}LGSM Total:\t${default}${rootdirdu}" + echo -e "${blue}LinuxGSM Total:\t${default}${rootdirdu}" echo -e "${blue}Serverfiles:\t${default}${filesdirdu}" if [ -d "${backupdir}" ]; then echo -e "${blue}Backups:\t${default}${backupdirdu}" @@ -315,7 +315,7 @@ fn_details_ports(){ parmslocation="${red}UNKNOWN${default}" # engines/games that require editing in the config file - local ports_edit_array=( "avalanche" "dontstarve" "idtech2" "idtech3" "idtech3_ql" "lwjgl2" "projectzomboid" "quake" "refractor" "realvirtuality" "renderware" "seriousengine35" "teeworlds" "terraria" "unreal" "unreal2" "unreal3" "TeamSpeak 3" "Mumble" "7 Days To Die" ) + local ports_edit_array=( "avalanche" "Ballistic Overkill" "dontstarve" "idtech2" "idtech3" "idtech3_ql" "lwjgl2" "projectzomboid" "quake" "refractor" "realvirtuality" "renderware" "seriousengine35" "teeworlds" "terraria" "unreal" "unreal2" "unreal3" "TeamSpeak 3" "Mumble" "7 Days To Die" ) for port_edit in "${ports_edit_array[@]}" do if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]; then @@ -355,7 +355,7 @@ fn_details_ark(){ echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" echo -e "> Game\tINBOUND\t${port}\tudp" # Don't do arithmetics if ever the port wasn't a numeric value - if [ "${port}" -eq "${port}" ]; then + if [ "${port}" -eq "${port}" ]; then echo -e "> RAW\tINBOUND\t$((port+1))\tudp" fi echo -e "> Query\tINBOUND\t${queryport}\tudp" @@ -363,6 +363,16 @@ fn_details_ark(){ } | column -s $'\t' -t } +fn_details_ballisticoverkill(){ + echo -e "netstat -atunp | grep BODS.x86" + echo -e "" + { + echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "> Game/RCON\tINBOUND\t${port}\tudp" + echo -e "> Query\tINBOUND\t${queryport}\tudp" + } | column -s $'\t' -t +} + fn_details_avalanche(){ echo -e "netstat -atunp | grep Jcmp-Server" echo -e "" @@ -539,7 +549,7 @@ fn_details_realvirtuality(){ echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" echo -e "> Game\tINBOUND\t${port}\tudp" # Don't do arithmetics if ever the port wasn't a numeric value - if [ "${port}" -eq "${port}" ]; then + if [ "${port}" -eq "${port}" ]; then echo -e "> Steam: Query\tINBOUND\t$((port+1))\tudp" echo -e "> Steam: Master traffic\tINBOUND\t$((port+2))\tudp" echo -e "> Undocumented Port\tINBOUND\t$((port+3))\tudp" @@ -675,6 +685,20 @@ fn_details_terraria(){ } | column -s $'\t' -t } +fn_details_towerunite(){ + echo -e "netstat -atunp | grep TowerServer" + echo -e "" + { + echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "> Game\tINBOUND\t${port}\ttcp" + # Don't do arithmetics if ever the port wasn't a numeric value + if [ "${port}" -eq "${port}" ]; then + echo -e "> Steam\tINBOUND\t$((port+1))\tudp" + fi + echo -e "> Query\tINBOUND\t${queryport}\tudp" + } | column -s $'\t' -t +} + fn_details_unreal(){ echo -e "netstat -atunp | grep ucc-bin" echo -e "" @@ -800,6 +824,8 @@ fn_display_details() { fn_details_sdtd elif [ "${gamename}" == "ARK: Survival Evolved" ]; then fn_details_ark + elif [ "${gamename}" == "Ballistic Overkill" ]; then + fn_details_ballisticoverkill elif [ "${gamename}" == "Call of Duty" ]; then fn_details_cod elif [ "${gamename}" == "Call of Duty: United Offensive" ]; then @@ -811,7 +837,7 @@ fn_display_details() { elif [ "${gamename}" == "Call of Duty: World at War" ]; then fn_details_codwaw elif [ "${gamename}" == "Factorio" ]; then - fn_details_factorio + fn_details_factorio elif [ "${gamename}" == "Hurtworld" ]; then fn_details_hurtworld elif [ "${gamename}" == "QuakeWorld" ]; then @@ -824,8 +850,10 @@ fn_display_details() { fn_details_quakelive elif [ "${gamename}" == "TeamSpeak 3" ]; then fn_details_teamspeak3 + elif [ "${gamename}" == "Tower Unite" ]; then + fn_details_towerunite elif [ "${gamename}" == "Multi Theft Auto" ]; then - fn_details_mta + fn_details_mta elif [ "${gamename}" == "Mumble" ]; then fn_details_mumble elif [ "${gamename}" == "Rust" ]; then diff --git a/lgsm/functions/command_dev_debug.sh b/lgsm/functions/command_dev_debug.sh index e17a8a719..98d785994 100644 --- a/lgsm/functions/command_dev_debug.sh +++ b/lgsm/functions/command_dev_debug.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_dev_debug.sh function +# LinuxGSM command_dev_debug.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Dev only: Enables debugging log to be saved to dev-debug.log. diff --git a/lgsm/functions/command_dev_detect_deps.sh b/lgsm/functions/command_dev_detect_deps.sh index 01c96ff47..f709a4603 100644 --- a/lgsm/functions/command_dev_detect_deps.sh +++ b/lgsm/functions/command_dev_detect_deps.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_dev_detect_deps.sh function +# LinuxGSM command_dev_detect_deps.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Detects dependencies the server binary requires. diff --git a/lgsm/functions/command_fastdl.sh b/lgsm/functions/command_fastdl.sh index 345ff765b..9fe7ca68b 100644 --- a/lgsm/functions/command_fastdl.sh +++ b/lgsm/functions/command_fastdl.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_fastdl.sh function +# LinuxGSM command_fastdl.sh function # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com diff --git a/lgsm/functions/command_install.sh b/lgsm/functions/command_install.sh index 15ed1bafd..7bbc40f42 100644 --- a/lgsm/functions/command_install.sh +++ b/lgsm/functions/command_install.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_install.sh function +# LinuxGSM command_install.sh function # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com @@ -28,7 +28,7 @@ fi # Configuration install_config.sh -if [ "${gamename}" == "Counter-Strike: Global Offensive" ]||[ "${gamename}" == "Team Fortress 2" ]||[ "${gamename}" == "BrainBread 2" ]; then +if [ "${gamename}" == "BrainBread 2" ]||[ "${gamename}" == "Black Mesa: Deathmatch" ]||[ "${gamename}" == "Counter-Strike: Global Offensive" ]||[ "${gamename}" == "Empires Mod" ]||[ "${gamename}" == "Garry’s Mod" ]||[ "${gamename}" == "No more Room in Hell" ]||[ "${gamename}" == "Team Fortress 2" ]||[ "${gamename}" == "Tower Unite" ]; then install_gslt.sh elif [ "${gamename}" == "Don't Starve Together" ]; then install_dst_token.sh diff --git a/lgsm/functions/command_install_resources_mta.sh b/lgsm/functions/command_install_resources_mta.sh index b4432e0f5..07c2e0ac0 100644 --- a/lgsm/functions/command_install_resources_mta.sh +++ b/lgsm/functions/command_install_resources_mta.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_install_resources_mta.sh function +# LinuxGSM command_install_resources_mta.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Installs the default resources for Multi Theft Auto. diff --git a/lgsm/functions/command_mods_install.sh b/lgsm/functions/command_mods_install.sh index 9610d5e91..9a51de5f3 100644 --- a/lgsm/functions/command_mods_install.sh +++ b/lgsm/functions/command_mods_install.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_mods_install.sh function +# LinuxGSM command_mods_install.sh function # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com @@ -52,7 +52,7 @@ done # If no mods are available for a specific game if [ -z "${compatiblemodslist}" ]; then - fn_print_fail "No mods are currently available for ${gamename}." + fn_print_fail_nl "No mods are currently available for ${gamename}." fn_script_log_info "No mods are currently available for ${gamename}." core_exit.sh fi diff --git a/lgsm/functions/command_mods_remove.sh b/lgsm/functions/command_mods_remove.sh index 932a3d733..87a83f758 100644 --- a/lgsm/functions/command_mods_remove.sh +++ b/lgsm/functions/command_mods_remove.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_mods_uninstall.sh function +# LinuxGSM command_mods_uninstall.sh function # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com diff --git a/lgsm/functions/command_mods_update.sh b/lgsm/functions/command_mods_update.sh index e93303016..81ac90fed 100644 --- a/lgsm/functions/command_mods_update.sh +++ b/lgsm/functions/command_mods_update.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_mods_update.sh function +# LinuxGSM command_mods_update.sh function # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index 7f247795f..0064ab439 100644 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_monitor.sh function +# LinuxGSM command_monitor.sh function # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com @@ -98,6 +98,7 @@ fn_monitor_tmux(){ fi } +monitorflag=1 fn_print_dots "${servername}" sleep 1 check.sh diff --git a/lgsm/functions/command_postdetails.sh b/lgsm/functions/command_postdetails.sh index 566d5c323..b4169023a 100644 --- a/lgsm/functions/command_postdetails.sh +++ b/lgsm/functions/command_postdetails.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_postdetails.sh function +# LinuxGSM command_postdetails.sh function # Author: CedarLUG # Contributor: CedarLUG # Website: https://gameservermanagers.com diff --git a/lgsm/functions/command_restart.sh b/lgsm/functions/command_restart.sh index eacebaaea..e0abc88ed 100644 --- a/lgsm/functions/command_restart.sh +++ b/lgsm/functions/command_restart.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_restart.sh function +# LinuxGSM command_restart.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Restarts the server. diff --git a/lgsm/functions/command_start.sh b/lgsm/functions/command_start.sh index 30bbfccc8..39dc363cf 100644 --- a/lgsm/functions/command_start.sh +++ b/lgsm/functions/command_start.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_start.sh function +# LinuxGSM command_start.sh function # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index 62d73c3da..8483e4669 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_stop.sh function +# LinuxGSM command_stop.sh function # Author: Daniel Gibbs # Contributors: UltimateByte # Website: https://gameservermanagers.com @@ -58,7 +58,7 @@ fn_stop_graceful_goldsource(){ fn_stop_tmux } -fn_stop_graceful_factorio(){ +fn_stop_graceful_ctrlc(){ fn_print_dots "Graceful: console CTRL+c" fn_script_log_info "Graceful: console CTRL+c" # sends quit @@ -221,8 +221,8 @@ fn_stop_graceful_mta(){ fn_stop_graceful_select(){ if [ "${gamename}" == "7 Days To Die" ]; then fn_stop_graceful_sdtd - elif [ "${gamename}" == "Factorio" ]; then - fn_stop_graceful_factorio + elif [ "${gamename}" == "Factorio" ]||[ "${engine}" == "unreal4" ]||[ "${engine}" == "unreal3" ]||[ "${engine}" == "unreal2" ]||[ "${engine}" == "unreal" ]; then + fn_stop_graceful_ctrlc elif [ "${engine}" == "source" ]; then fn_stop_graceful_source elif [ "${engine}" == "goldsource" ]; then @@ -237,45 +237,45 @@ fn_stop_graceful_select(){ } fn_stop_ark(){ - maxpiditer=15 # The maximum number of times to check if the ark pid has closed gracefully. - info_config.sh - if [ -z "${queryport}" ]; then - fn_print_warn "No queryport found using info_config.sh" - fn_script_log_warn "No queryport found using info_config.sh" - userconfigfile="${filesdir}" - userconfigfile+="/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini" - queryport=$(grep ^QueryPort= ${userconfigfile} | cut -d= -f2 | sed "s/[^[:digit:].*].*//g") - fi - if [ -z "${queryport}" ]; then - fn_print_warn "No queryport found in the GameUsersettings.ini file" - fn_script_log_warn "No queryport found in the GameUsersettings.ini file" - return - fi + maxpiditer=15 # The maximum number of times to check if the ark pid has closed gracefully. + info_config.sh + if [ -z "${queryport}" ]; then + fn_print_warn "No queryport found using info_config.sh" + fn_script_log_warn "No queryport found using info_config.sh" + userconfigfile="${filesdir}" + userconfigfile+="/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini" + queryport=$(grep ^QueryPort= ${userconfigfile} | cut -d= -f2 | sed "s/[^[:digit:].*].*//g") + fi + if [ -z "${queryport}" ]; then + fn_print_warn "No queryport found in the GameUsersettings.ini file" + fn_script_log_warn "No queryport found in the GameUsersettings.ini file" + return + fi - if [[ ${#queryport} -gt 0 ]] ; then - for (( pidcheck=0 ; pidcheck < ${maxpiditer} ; pidcheck++ )) ; do - pid=$(netstat -nap 2>/dev/null | grep ^udp[[:space:]] |\ - grep :${queryport}[[:space:]] | rev | awk '{print $1}' |\ - rev | cut -d\/ -f1) - # - # check for a valid pid - pid=${pid//[!0-9]/} - let pid+=0 # turns an empty string into a valid number, '0', - # and a valid numeric pid remains unchanged. - if [[ ${pid} -gt 1 && $pid -le $(cat /proc/sys/kernel/pid_max) ]] ; then - fn_print_dots "Process still bound. Awaiting graceful exit: ${pidcheck}" - sleep 1 - else - break # Our job is done here - fi # end if for pid range check - done - if [[ ${pidcheck} -eq ${maxpiditer} ]] ; then - # The process doesn't want to close after 20 seconds. - # kill it hard. - fn_print_error "Terminating reluctant Ark process: ${pid}" - kill -9 $pid - fi - fi # end if for port check + if [ "${#queryport}" -gt 0 ] ; then + for (( pidcheck=0 ; pidcheck < ${maxpiditer} ; pidcheck++ )) ; do + pid=$(netstat -nap 2>/dev/null | grep ^udp[[:space:]] |\ + grep :${queryport}[[:space:]] | rev | awk '{print $1}' |\ + rev | cut -d\/ -f1) + # + # check for a valid pid + pid=${pid//[!0-9]/} + let pid+=0 # turns an empty string into a valid number, '0', + # and a valid numeric pid remains unchanged. + if [ "${pid}" -gt 1 && "${pid}" -le $(cat /proc/sys/kernel/pid_max) ]; then + fn_print_dots "Process still bound. Awaiting graceful exit: ${pidcheck}" + sleep 1 + else + break # Our job is done here + fi # end if for pid range check + done + if [[ ${pidcheck} -eq ${maxpiditer} ]] ; then + # The process doesn't want to close after 20 seconds. + # kill it hard. + fn_print_error "Terminating reluctant Ark process: ${pid}" + kill -9 ${pid} + fi + fi # end if for port check } # end of fn_stop_ark fn_stop_teamspeak3(){ @@ -325,11 +325,10 @@ fn_stop_tmux(){ # Remove lockfile rm -f "${rootdir}/${lockselfname}" # ARK doesn't clean up immediately after tmux is killed. - # Make certain the ports are cleared before continuing. - if [ "${gamename}" == "ARK: Survival Evolved" ]; then - fn_stop_ark - echo -en "\n" - fi + # Make certain the ports are cleared before continuing. + if [ "${gamename}" == "ARK: Survival Evolved" ]; then + fn_stop_ark + fi fn_print_ok_nl "${servername}" fn_script_log_pass "Stopped ${servername}" else diff --git a/lgsm/functions/command_test_alert.sh b/lgsm/functions/command_test_alert.sh index 2f9749200..a21deace5 100644 --- a/lgsm/functions/command_test_alert.sh +++ b/lgsm/functions/command_test_alert.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_test_alert.sh function +# LinuxGSM command_test_alert.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Sends a test alert. diff --git a/lgsm/functions/command_ts3_server_pass.sh b/lgsm/functions/command_ts3_server_pass.sh index 529b705b1..5cdb59e6c 100644 --- a/lgsm/functions/command_ts3_server_pass.sh +++ b/lgsm/functions/command_ts3_server_pass.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_ts3_server_pass.sh function +# LinuxGSM command_ts3_server_pass.sh function # Author: Daniel Gibbs # Contributor : UltimateByte # Website: https://gameservermanagers.com diff --git a/lgsm/functions/command_update.sh b/lgsm/functions/command_update.sh index 3b0176ca4..bc76a29b2 100644 --- a/lgsm/functions/command_update.sh +++ b/lgsm/functions/command_update.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_update.sh function +# LinuxGSM command_update.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Handles updating of servers. diff --git a/lgsm/functions/command_update_functions.sh b/lgsm/functions/command_update_functions.sh index e3d96d378..34dbb8115 100644 --- a/lgsm/functions/command_update_functions.sh +++ b/lgsm/functions/command_update_functions.sh @@ -1,11 +1,11 @@ #!/bin/bash -# LGSM command_update_functions.sh function +# LinuxGSM command_update_functions.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Deletes the functions dir to allow re-downloading of functions from GitHub. -local commandname="UPDATE LGSM" -local commandaction="Update LGSM" +local commandname="UPDATE LinuxGSM" +local commandaction="Update LinuxGSM" local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" fn_print_dots "Updating functions" diff --git a/lgsm/functions/command_validate.sh b/lgsm/functions/command_validate.sh index 3627acdb6..eb6d13c15 100644 --- a/lgsm/functions/command_validate.sh +++ b/lgsm/functions/command_validate.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_validate.sh function +# LinuxGSM command_validate.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Runs a server validation. diff --git a/lgsm/functions/command_wipe.sh b/lgsm/functions/command_wipe.sh index d50e354fc..67ea65164 100644 --- a/lgsm/functions/command_wipe.sh +++ b/lgsm/functions/command_wipe.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_backup.sh function +# LinuxGSM command_backup.sh function # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com diff --git a/lgsm/functions/compress_unreal2_maps.sh b/lgsm/functions/compress_unreal2_maps.sh index f2bcb2135..9e0488095 100644 --- a/lgsm/functions/compress_unreal2_maps.sh +++ b/lgsm/functions/compress_unreal2_maps.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM compress_unreal2_maps.sh function +# LinuxGSM compress_unreal2_maps.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Compresses unreal maps. diff --git a/lgsm/functions/compress_ut99_maps.sh b/lgsm/functions/compress_ut99_maps.sh index 872b3da06..2a3b6a71f 100644 --- a/lgsm/functions/compress_ut99_maps.sh +++ b/lgsm/functions/compress_ut99_maps.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM compress_ut99_maps.sh function +# LinuxGSM compress_ut99_maps.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Compresses unreal maps. diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index aad8f1963..d6c9b58ca 100644 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -1,9 +1,9 @@ #!/bin/bash -# LGSM core_dl.sh function +# LinuxGSM core_dl.sh function # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com -# Description: Deals with all downloads for LGSM. +# Description: Deals with all downloads for LinuxGSM. # fileurl: The URL of the file: http://example.com/dl/File.tar.bz2 # filedir: location the file is to be saved: /home/server/lgsm/tmp diff --git a/lgsm/functions/core_exit.sh b/lgsm/functions/core_exit.sh index d5f17dfe5..02b471c78 100644 --- a/lgsm/functions/core_exit.sh +++ b/lgsm/functions/core_exit.sh @@ -1,8 +1,8 @@ #!/bin/bash -# LGSM core_exit.sh function +# LinuxGSM core_exit.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com -# Description: Handles exiting of LGSM by running and reporting an exit code. +# Description: Handles exiting of LinuxGSM by running and reporting an exit code. fn_exit_dev_debug(){ if [ -f "${rootdir}/.dev-debug" ]; then diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index c0be0b856..1738928ca 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM core_functions.sh function +# LinuxGSM core_functions.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Defines all functions to allow download and execution of functions using fn_fetch_function. diff --git a/lgsm/functions/core_getopt.sh b/lgsm/functions/core_getopt.sh index db531ccb6..bcecc6c2d 100644 --- a/lgsm/functions/core_getopt.sh +++ b/lgsm/functions/core_getopt.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM core_getopt.sh function +# LinuxGSM core_getopt.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: getopt arguments. diff --git a/lgsm/functions/core_messages.sh b/lgsm/functions/core_messages.sh index 1d3623173..565a1853e 100644 --- a/lgsm/functions/core_messages.sh +++ b/lgsm/functions/core_messages.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM core_messages.sh function +# LinuxGSM core_messages.sh function # Author: Daniel Gibbs # Contributor: s-eam # Website: https://gameservermanagers.com diff --git a/lgsm/functions/core_trap.sh b/lgsm/functions/core_trap.sh index 46615cfe5..253c8b4d2 100644 --- a/lgsm/functions/core_trap.sh +++ b/lgsm/functions/core_trap.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM core_trap.sh function +# LinuxGSM core_trap.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Handles CTRL-C trap to give an exit code. diff --git a/lgsm/functions/fix.sh b/lgsm/functions/fix.sh index 5bac281a3..250709cca 100644 --- a/lgsm/functions/fix.sh +++ b/lgsm/functions/fix.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fix.sh function +# LinuxGSM fix.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Overall function for managing fixes. diff --git a/lgsm/functions/fix_arma3.sh b/lgsm/functions/fix_arma3.sh index e1bb4abcc..6c65bf95f 100644 --- a/lgsm/functions/fix_arma3.sh +++ b/lgsm/functions/fix_arma3.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fix_arma3.sh function +# LinuxGSM fix_arma3.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Resolves an issue with ARMA3. diff --git a/lgsm/functions/fix_coduo.sh b/lgsm/functions/fix_coduo.sh index 09835eadb..a092acaba 100644 --- a/lgsm/functions/fix_coduo.sh +++ b/lgsm/functions/fix_coduo.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fix_coduo.sh function +# LinuxGSM fix_coduo.sh function # Author: Alexander Hurd # Website: https://gameservermanagers.com # Description: Fixes for Call of Duty: United Offensive diff --git a/lgsm/functions/fix_csgo.sh b/lgsm/functions/fix_csgo.sh index 38d169532..305c0d06b 100644 --- a/lgsm/functions/fix_csgo.sh +++ b/lgsm/functions/fix_csgo.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fix_csgo.sh function +# LinuxGSM fix_csgo.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Resolves various issues with CS:GO. diff --git a/lgsm/functions/fix_dst.sh b/lgsm/functions/fix_dst.sh index fea58b67e..5a631a52e 100644 --- a/lgsm/functions/fix_dst.sh +++ b/lgsm/functions/fix_dst.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fix_dst.sh function +# LinuxGSM fix_dst.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Resolves various issues with Don't Starve Together. diff --git a/lgsm/functions/fix_ges.sh b/lgsm/functions/fix_ges.sh index c8ee7ad5d..f97ca767c 100644 --- a/lgsm/functions/fix_ges.sh +++ b/lgsm/functions/fix_ges.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fix_ges.sh function +# LinuxGSM fix_ges.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Resolves various issues with GoldenEye: Source. diff --git a/lgsm/functions/fix_glibc.sh b/lgsm/functions/fix_glibc.sh index d03b2c41e..a36b568ac 100644 --- a/lgsm/functions/fix_glibc.sh +++ b/lgsm/functions/fix_glibc.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fix_glibc.sh function +# LinuxGSM fix_glibc.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Downloads required Glibc files and applies the Glibc fix if required. diff --git a/lgsm/functions/fix_ins.sh b/lgsm/functions/fix_ins.sh index 2fab8f8ae..c132173b0 100644 --- a/lgsm/functions/fix_ins.sh +++ b/lgsm/functions/fix_ins.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fix_ins.sh function +# LinuxGSM fix_ins.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Resolves various issues with Insurgency. diff --git a/lgsm/functions/fix_kf.sh b/lgsm/functions/fix_kf.sh index c08a34341..a70f8ce86 100644 --- a/lgsm/functions/fix_kf.sh +++ b/lgsm/functions/fix_kf.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fix_kf.sh function +# LinuxGSM fix_kf.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Resolves various issues with Killing Floor. diff --git a/lgsm/functions/fix_mta.sh b/lgsm/functions/fix_mta.sh index 7347201d9..ebefc79d2 100644 --- a/lgsm/functions/fix_mta.sh +++ b/lgsm/functions/fix_mta.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fix_mta.sh function +# LinuxGSM fix_mta.sh function # Author: Daniel Gibbs # Contributor: ChaosMTA # Website: https://gameservermanagers.com diff --git a/lgsm/functions/fix_ro.sh b/lgsm/functions/fix_ro.sh index ee28aaf4a..3498ee9c8 100644 --- a/lgsm/functions/fix_ro.sh +++ b/lgsm/functions/fix_ro.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fix_ro.sh function +# LinuxGSM fix_ro.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Resolves various issues with Red Orchestra. diff --git a/lgsm/functions/fix_rust.sh b/lgsm/functions/fix_rust.sh index ec0b125d4..13f7fbdb0 100644 --- a/lgsm/functions/fix_rust.sh +++ b/lgsm/functions/fix_rust.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fix_rust.sh function +# LinuxGSM fix_rust.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Resolves startup issue with Rust diff --git a/lgsm/functions/fix_steamcmd.sh b/lgsm/functions/fix_steamcmd.sh index 9f08fd36a..79bf5acce 100644 --- a/lgsm/functions/fix_steamcmd.sh +++ b/lgsm/functions/fix_steamcmd.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fix_steamcmd.sh function +# LinuxGSM fix_steamcmd.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Resolves various issues related to SteamCMD. @@ -40,4 +40,12 @@ elif [ "${gamename}" == "Hurtworld" ]; then cp -v "${rootdir}/steamcmd/linux32/steamclient.so" "${filesdir}/Hurtworld_Data/Plugins/x86_64/steamclient.so" >> "${scriptlog}" fn_fix_msg_end fi +elif [ "${gamename}" == "Tower Unite" ]; then + # Fixes: [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so. + if [ ! -f "${executabledir}/steamclient.so" ]; then + fixname="steamclient.so" + fn_fix_msg_start + cp -v "${filesdir}/linux64/steamclient.so" "${executabledir}/steamclient.so" >> "${scriptlog}" + fn_fix_msg_end + fi fi diff --git a/lgsm/functions/fix_ut.sh b/lgsm/functions/fix_ut.sh index 74233406f..24dad6ee6 100644 --- a/lgsm/functions/fix_ut.sh +++ b/lgsm/functions/fix_ut.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fix_ut.sh function +# LinuxGSM fix_ut.sh function # Author: Alexander Hurd # Website: https://gameservermanagers.com # Description: Resolves various issues with Unreal Tournament. diff --git a/lgsm/functions/fix_ut2k4.sh b/lgsm/functions/fix_ut2k4.sh index 85b2334a7..913ef62e9 100644 --- a/lgsm/functions/fix_ut2k4.sh +++ b/lgsm/functions/fix_ut2k4.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fix_ut2k4.sh function +# LinuxGSM fix_ut2k4.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Resolves various issues with Unreal Tournament 2004. diff --git a/lgsm/functions/fn_functions b/lgsm/functions/fn_functions index 758af3dbc..ca45dd740 100644 --- a/lgsm/functions/fn_functions +++ b/lgsm/functions/fn_functions @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_functions function +# LinuxGSM fn_functions function # Author: Daniel Gibbs # Website: https://gameservermanagers.com lgsm_version="211016" diff --git a/lgsm/functions/fn_getopt b/lgsm/functions/fn_getopt index 0302cf1d5..e15a29201 100644 --- a/lgsm/functions/fn_getopt +++ b/lgsm/functions/fn_getopt @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_getopt function +# LinuxGSM fn_getopt function # Author: Daniel Gibbs # Website: https://gameservermanagers.com lgsm_version="211016" diff --git a/lgsm/functions/fn_update_functions b/lgsm/functions/fn_update_functions index a424d3352..7dbde6694 100644 --- a/lgsm/functions/fn_update_functions +++ b/lgsm/functions/fn_update_functions @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_update_functions function +# LinuxGSM fn_update_functions function # Author: Daniel Gibbs # Website: https://gameservermanagers.com lgsm_version="211016" diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 0164999a3..9ce3ba242 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM info_config.sh function +# LinuxGSM info_config.sh function # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com @@ -514,6 +514,20 @@ fn_info_config_terraria(){ fi } +fn_info_config_towerunite(){ + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + maxplayers="${zero}" + else + servername=$(grep "ServerTitle" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/ServerTitle//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + + # Not Set + servername=${servername:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + fi +} + fn_info_config_unreal(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -554,6 +568,29 @@ fn_info_config_unreal(){ fi } +fn_info_config_ballistic_overkill(){ + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + port="${zero}" + queryport="${zero}" + maxplayers="${unavailable}" + else + servername=$(grep "ServerName=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "Password=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + port=$(grep "ServerPort=" "${servercfgfullpath}" | tr -cd '[:digit:]') + queryport=$((port + 1)) + maxplayers=$(grep "MaxPlayers=" "${servercfgfullpath}" | tr -cd '[:digit:]') + + # Not Set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + port=${port:-"0"} + queryport=${queryport:-"0"} + maxplayers=${maxplayers:-"NOT SET"} + fi +} + fn_info_config_sdtd(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -646,6 +683,9 @@ if [ "${engine}" == "avalanche" ]; then # ARK: Survival Evolved elif [ "${gamename}" == "ARK: Survivial Evolved" ]; then fn_info_config_ark +# Ballistic Overkill +elif [ "${gamename}" == "Ballistic Overkill" ]; then + fn_info_config_ballistic_overkill # Battlefield: 1942 elif [ "${gamename}" == "Battlefield: 1942" ]; then fn_info_config_bf1942 @@ -664,7 +704,7 @@ elif [ "${gamename}" == "Call of Duty: World at War" ]; then # Dont Starve Together elif [ "${engine}" == "dontstarve" ]; then fn_info_config_dontstarve -# Factorio +# Factorio elif [ "${gamename}" == "Factorio" ]; then fn_info_config_factorio # Quake 2 @@ -705,6 +745,9 @@ elif [ "${engine}" == "teeworlds" ]; then # Terraria elif [ "${engine}" == "terraria" ]; then fn_info_config_terraria +# Tower Unite +elif [ "${gamename}" == "Tower Unite" ]; then + fn_info_config_towerunite # Unreal/Unreal 2 engine elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then fn_info_config_unreal diff --git a/lgsm/functions/info_distro.sh b/lgsm/functions/info_distro.sh index 16973cfc1..d8d733d64 100644 --- a/lgsm/functions/info_distro.sh +++ b/lgsm/functions/info_distro.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM info_distro.sh function +# LinuxGSM info_distro.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Variables providing useful info on the Operating System such as disk and performace info. @@ -88,19 +88,19 @@ totalspace=$(df -hP "${rootdir}" | grep -v "Filesystem" | awk '{print $2}') usedspace=$(df -hP "${rootdir}" | grep -v "Filesystem" | awk '{print $3}') availspace=$(df -hP "${rootdir}" | grep -v "Filesystem" | awk '{print $4}') -## LGSM used space total. +## LinuxGSM used space total. rootdirdu=$(du -sh "${rootdir}" 2> /dev/null | awk '{print $1}') if [ -z "${rootdirdu}" ]; then rootdirdu="0M" fi -## LGSM used space in serverfiles dir. +## LinuxGSM used space in serverfiles dir. filesdirdu=$(du -sh "${filesdir}" 2> /dev/null | awk '{print $1}') if [ -z "${filesdirdu}" ]; then filesdirdu="0M" fi -## LGSM used space total minus backup dir. +## LinuxGSM used space total minus backup dir. rootdirduexbackup=$(du -sh --exclude="${backupdir}" "${filesdir}" 2> /dev/null | awk '{print $1}') if [ -z "${rootdirduexbackup}" ]; then rootdirduexbackup="0M" diff --git a/lgsm/functions/info_glibc.sh b/lgsm/functions/info_glibc.sh index 1736e0be6..ce17c0c22 100644 --- a/lgsm/functions/info_glibc.sh +++ b/lgsm/functions/info_glibc.sh @@ -1,12 +1,18 @@ #!/bin/bash -# LGSM info_glibc.sh function +# LinuxGSM info_glibc.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Stores details on servers Glibc requirements. local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -if [ "${gamename}" == "Black Mesa: Deathmatch" ]; then +if [ "${gamename}" == "ARK: Survival Evolved" ]; then + glibcrequired="2.15" + glibcfix="no" +elif [ "${gamename}" == "Ballistic Overkill" ]; then + glibcrequired="2.15" + glibcfix="yes" +elif [ "${gamename}" == "Black Mesa: Deathmatch" ]; then glibcrequired="2.15" glibcfix="yes" elif [ "${gamename}" == "Blade Symphony" ]; then diff --git a/lgsm/functions/info_parms.sh b/lgsm/functions/info_parms.sh index 72ef857c9..17be983fd 100644 --- a/lgsm/functions/info_parms.sh +++ b/lgsm/functions/info_parms.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM info_parms.sh function +# LinuxGSM info_parms.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Gets specific details from server parameters. diff --git a/lgsm/functions/install_complete.sh b/lgsm/functions/install_complete.sh index 4a38d79b4..d194e7a58 100644 --- a/lgsm/functions/install_complete.sh +++ b/lgsm/functions/install_complete.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM install_complete.sh function +# LinuxGSM install_complete.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Prints installation completion message and hints. diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 44a251d3a..529f87038 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM install_config.sh function +# LinuxGSM install_config.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Creates default server configs. @@ -144,6 +144,12 @@ elif [ "${gamename}" == "ARMA 3" ]; then fn_fetch_default_config fn_default_config_remote fn_set_config_vars +elif [ "${gamename}" == "Ballistic Overkill" ]; then + gamedirname="BallisticOverkill" + array_configs+=( config.txt ) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars elif [ "${gamename}" == "Battlefield: 1942" ]; then gamedirname="Battlefield1942" array_configs+=( serversettings.con ) @@ -210,12 +216,6 @@ elif [ "${gamename}" == "Counter-Strike 1.6" ]; then fn_fetch_default_config fn_default_config_remote fn_set_config_vars -elif [ "${gamename}" == "Counter-Strike: Classic Offensive" ]; then - gamedirname="CounterStrikeClassicOffensive" - array_configs+=( server.cfg ) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars elif [ "${gamename}" == "Counter-Strike: Condition Zero" ]; then gamedirname="CounterStrikeConditionZero" array_configs+=( server.cfg ) @@ -480,6 +480,13 @@ elif [ "${gamename}" == "Terraria" ]; then fn_fetch_default_config fn_default_config_remote fn_set_config_vars +elif [ "${gamename}" == "Tower Unite" ]; then + gamedirname="TowerUnite" + fn_check_cfgdir + array_configs+=( TowerServer.ini ) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars elif [ "${gamename}" == "Unreal Tournament" ]; then gamedirname="UnrealTournament" array_configs+=( Game.ini Engine.ini ) diff --git a/lgsm/functions/install_dst_token.sh b/lgsm/functions/install_dst_token.sh index 27966bcbc..b8b040329 100644 --- a/lgsm/functions/install_dst_token.sh +++ b/lgsm/functions/install_dst_token.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM install_dst_token.sh function +# LinuxGSM 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. diff --git a/lgsm/functions/install_factorio_save.sh b/lgsm/functions/install_factorio_save.sh index 353d57c20..e76e97e9f 100644 --- a/lgsm/functions/install_factorio_save.sh +++ b/lgsm/functions/install_factorio_save.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM install_factorio_save.sh function +# LinuxGSM install_factorio_save.sh function # Author: Kristian Polso # Website: https://gameservermanagers.com # Description: Creates the initial save file for Factorio diff --git a/lgsm/functions/install_gslt.sh b/lgsm/functions/install_gslt.sh index c611e91a3..5f62539d7 100644 --- a/lgsm/functions/install_gslt.sh +++ b/lgsm/functions/install_gslt.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM install_gslt.sh function +# LinuxGSM install_gslt.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Configures GSLT. @@ -26,12 +26,19 @@ fn_script_log_info "Get more info and a token here:" fn_script_log_info "https://gameservermanagers.com/gslt" echo "" if [ -z "${autoinstall}" ]; then - echo "Enter token below (Can be blank)." - echo -n "GSLT TOKEN: " - read token - sed -i -e "s/gslt=\"\"/gslt=\"${token}\"/g" "${rootdir}/${selfname}" + if [ "${gamename}" != "Tower Unite" ];then + echo "Enter token below (Can be blank)." + echo -n "GSLT TOKEN: " + read token + sed -i -e "s/gslt=\"\"/gslt=\"${token}\"/g" "${rootdir}/${selfname}" + fi fi sleep 1 -echo "The GSLT can be changed by editing ${selfname}." -fn_script_log_info "The GSLT can be changed by editing ${selfname}." +if [ "${gamename}" == "Tower Unite" ];then + echo "The GSLT can be changed by editing ${servercfg}." + fn_script_log_info "The GSLT can be changed by editing ${servercfg}." +else + echo "The GSLT can be changed by editing ${selfname}." + fn_script_log_info "The GSLT can be changed by editing ${selfname}." +fi echo "" \ No newline at end of file diff --git a/lgsm/functions/install_header.sh b/lgsm/functions/install_header.sh index 499d1aec9..d830a9408 100644 --- a/lgsm/functions/install_header.sh +++ b/lgsm/functions/install_header.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM install_header.sh function +# LinuxGSM install_header.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Prints installation header. diff --git a/lgsm/functions/install_logs.sh b/lgsm/functions/install_logs.sh index abad81329..2019fdb13 100644 --- a/lgsm/functions/install_logs.sh +++ b/lgsm/functions/install_logs.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM install_logs.sh function +# LinuxGSM install_logs.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Creates log directories. diff --git a/lgsm/functions/install_minecraft_eula.sh b/lgsm/functions/install_minecraft_eula.sh index e4901979b..7c172df1b 100644 --- a/lgsm/functions/install_minecraft_eula.sh +++ b/lgsm/functions/install_minecraft_eula.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM install_minecraft_eula.sh function +# LinuxGSM install_minecraft_eula.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Gets user to accept the EULA. diff --git a/lgsm/functions/install_mta_resources.sh b/lgsm/functions/install_mta_resources.sh index f4fff4010..8156da9da 100644 --- a/lgsm/functions/install_mta_resources.sh +++ b/lgsm/functions/install_mta_resources.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM install_mta_resources.sh function +# LinuxGSM install_mta_resources.sh function # Author: Daniel Gibbs # Contributor: ChaosMTA # Website: https://gameservermanagers.com diff --git a/lgsm/functions/install_retry.sh b/lgsm/functions/install_retry.sh index 757dd6574..8ca91542f 100644 --- a/lgsm/functions/install_retry.sh +++ b/lgsm/functions/install_retry.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM install_retry.sh function +# LinuxGSM install_retry.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Asks for installation retry after failure. diff --git a/lgsm/functions/install_server_dir.sh b/lgsm/functions/install_server_dir.sh index 1cd64110d..12762df57 100644 --- a/lgsm/functions/install_server_dir.sh +++ b/lgsm/functions/install_server_dir.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM install_server_dir.sh function +# LinuxGSM install_server_dir.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Creates the server directory. diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index 4d4dfe892..edee16e9f 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM install_server_files.sh function +# LinuxGSM install_server_files.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Installs server files. @@ -21,8 +21,6 @@ fn_install_server_files(){ fileurl="http://files.gameservermanagers.com/CallOfDuty4/cod4x18_dedrun.tar.bz2"; filedir="${tmpdir}"; filename="cod4x18_dedrun.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="bebdfc1755626462bdaad49f6f926c08" 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}" == "Counter-Strike: Classic Offensive" ]; then - fileurl="https://s3.amazonaws.com/linuxgsm/ClassicOffensive_Beta1.1d.zip"; filedir="${tmpdir}"; filename="ClassicOffensive_Beta1.1d.zip"; executecmd="noexecute" run="norun"; force="noforce"; md5="922ff1abe08ba12309b19900f1cbd33a" 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 @@ -136,7 +134,7 @@ elif [ "${gamename}" == "Multi Theft Auto" ]; then elif [ "${gamename}" == "Factorio" ]; then update_factorio.sh install_factorio_save.sh -elif [ -z "${appid}" ]||[ "${gamename}" == "GoldenEye: Source" ]||[ "${gamename}" == "Counter-Strike: Classic Offensive" ]; then +elif [ -z "${appid}" ]||[ "${gamename}" == "GoldenEye: Source" ]; then if [ "${gamename}" == "Unreal Tournament" ]; then install_unreal_tournament_eula.sh fi diff --git a/lgsm/functions/install_steamcmd.sh b/lgsm/functions/install_steamcmd.sh index 82cce59a6..26335c187 100644 --- a/lgsm/functions/install_steamcmd.sh +++ b/lgsm/functions/install_steamcmd.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM install_steamcmd.sh function +# LinuxGSM install_steamcmd.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Downloads SteamCMD on install. diff --git a/lgsm/functions/install_ts3db.sh b/lgsm/functions/install_ts3db.sh index dec3b6773..ceb91afa7 100644 --- a/lgsm/functions/install_ts3db.sh +++ b/lgsm/functions/install_ts3db.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM install_ts3db.sh function +# LinuxGSM install_ts3db.sh function # Author: Daniel Gibbs # Contributor: PhilPhonic # Website: https://gameservermanagers.com diff --git a/lgsm/functions/install_unreal_tournament_eula.sh b/lgsm/functions/install_unreal_tournament_eula.sh index f2a5eb445..b554ab2ad 100644 --- a/lgsm/functions/install_unreal_tournament_eula.sh +++ b/lgsm/functions/install_unreal_tournament_eula.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM install_unreal_tournament_eula.sh function +# LinuxGSM install_unreal_tournament_eula.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Gets user to accept the EULA. diff --git a/lgsm/functions/install_ut2k4_key.sh b/lgsm/functions/install_ut2k4_key.sh index b091faff3..b06cc12c3 100644 --- a/lgsm/functions/install_ut2k4_key.sh +++ b/lgsm/functions/install_ut2k4_key.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM install_ut2k4_key.sh function +# LinuxGSM install_ut2k4_key.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Activates ut2k4 server with given key. diff --git a/lgsm/functions/logs.sh b/lgsm/functions/logs.sh index 32ad0deae..ebcc8636a 100644 --- a/lgsm/functions/logs.sh +++ b/lgsm/functions/logs.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM logs.sh function +# LinuxGSM logs.sh function # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com diff --git a/lgsm/functions/mods_core.sh b/lgsm/functions/mods_core.sh index 1e36285e1..620bfa921 100644 --- a/lgsm/functions/mods_core.sh +++ b/lgsm/functions/mods_core.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_mods_install.sh function +# LinuxGSM command_mods_install.sh function # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com diff --git a/lgsm/functions/mods_list.sh b/lgsm/functions/mods_list.sh index 0be15b08b..f5768efed 100644 --- a/lgsm/functions/mods_list.sh +++ b/lgsm/functions/mods_list.sh @@ -1,9 +1,9 @@ #!/bin/bash -# LGSM mods_list.sh function +# LinuxGSM mods_list.sh function # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com -# Description: Lists and defines available mods for LGSM supported servers; works along with mods_core.sh. +# Description: Lists and defines available mods for LinuxGSM supported servers; works along with mods_core.sh. # Usage: To add a mod, you need to add an array variable following the guide to set proper values; # Usage: Then add this array to the mods_global_array. # Usage: If needed, you can scrape the download URL first. @@ -43,7 +43,7 @@ modseparator="MOD" # [4] | "filename": the output filename # [5] | "modsubdirs": in how many subdirectories is the mod (none is 0) (not used at release, but could be in the future) # [6] | "LowercaseOn/Off": LowercaseOff or LowercaseOn: enable/disable converting extracted files and directories to lowercase (some games require it) -# [7] | "modinstalldir": the directory in which to install the mode ( use LGSM dir variables such as ${systemdir}) +# [7] | "modinstalldir": the directory in which to install the mode (use LGSM dir variables such as ${systemdir}) # [8] | "/files/to/keep;", files & directories that should not be overwritten upon update, separated and ended with a semicolon; you can also use "OVERWRITE" value to ignore the value or "NOUPDATE" to disallow updating; for files to keep upon uninstall, see fn_mod_tidy_files_list from mods_core.sh # [9] | "Supported Engines;": list them according to LGSM ${engine} variables, separated and ended with a semicolon, or use ENGINES to ignore the value # [10] | "Supported Games;": list them according to LGSM ${gamename} variables, separated and ended with a semicolon, or use GAMES to ignore the value diff --git a/lgsm/functions/monitor_gsquery.sh b/lgsm/functions/monitor_gsquery.sh index 2c8b2902b..dc24aaee3 100644 --- a/lgsm/functions/monitor_gsquery.sh +++ b/lgsm/functions/monitor_gsquery.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM monitor_gsquery.sh function +# LinuxGSM monitor_gsquery.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Uses gsquery.py to query the server port. diff --git a/lgsm/functions/update_factorio.sh b/lgsm/functions/update_factorio.sh index c3e16d802..cbb39ef18 100644 --- a/lgsm/functions/update_factorio.sh +++ b/lgsm/functions/update_factorio.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM update_factorio.sh function +# LinuxGSM update_factorio.sh function # Author: Daniel Gibbs # Contributor: Kristian Polso # Website: https://gameservermanagers.com diff --git a/lgsm/functions/update_minecraft.sh b/lgsm/functions/update_minecraft.sh index 746ddfb2e..cf45946b0 100644 --- a/lgsm/functions/update_minecraft.sh +++ b/lgsm/functions/update_minecraft.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM update_minecraft.sh function +# LinuxGSM update_minecraft.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Handles updating of Minecraft servers. diff --git a/lgsm/functions/update_mta.sh b/lgsm/functions/update_mta.sh index fff189ca7..0fcd7936c 100644 --- a/lgsm/functions/update_mta.sh +++ b/lgsm/functions/update_mta.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM update_mta.sh function +# LinuxGSM update_mta.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Handles updating of Multi Theft Auto servers. diff --git a/lgsm/functions/update_mumble.sh b/lgsm/functions/update_mumble.sh index 6f5c35a88..b77cb3ac4 100644 --- a/lgsm/functions/update_mumble.sh +++ b/lgsm/functions/update_mumble.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM update_mumble.sh function +# LinuxGSM update_mumble.sh function # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com diff --git a/lgsm/functions/update_steamcmd.sh b/lgsm/functions/update_steamcmd.sh index 167daf5fb..028f843ee 100644 --- a/lgsm/functions/update_steamcmd.sh +++ b/lgsm/functions/update_steamcmd.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM update_steamcmd.sh function +# LinuxGSM update_steamcmd.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Handles updating using SteamCMD. @@ -156,7 +156,7 @@ fn_update_steamcmd_check(){ fi # Gets availablebuild info - availablebuild=$(./steamcmd.sh +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +app_info_print "${appid}" +quit | grep -EA 1000 "^\s+\"branches\"$" | grep -EA 5 "^\s+\"${branchname}\"$" | grep -m 1 -EB 10 "^\s+}$" | grep -E "^\s+\"buildid\"\s+" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -d\ -f3) + availablebuild=$(./steamcmd.sh +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +app_info_print "${appid}" +quit | sed -n '/branch/,$p' | grep -m 1 buildid | tr -cd '[:digit:]') if [ -z "${availablebuild}" ]; then fn_print_fail "Checking for update: SteamCMD" sleep 1 diff --git a/lgsm/functions/update_ts3.sh b/lgsm/functions/update_ts3.sh index b5f403597..f810eb0f4 100644 --- a/lgsm/functions/update_ts3.sh +++ b/lgsm/functions/update_ts3.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_ts3.sh function +# LinuxGSM command_ts3.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Handles updating of teamspeak 3 servers. diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 8fbb910a1..e74fdb6c9 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -17,7 +17,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ######## diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 8e0e54c2e..8a573e048 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170128" +version="170212" ########################## ######## Settings ########