From 111668ce1a4aa261c3c68bfa24be33c39f038b93 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Thu, 27 Oct 2016 22:41:10 +0200 Subject: [PATCH] New gameservers & features (#1158) * Two # is now one block of settings & descriptions * directories comments and logs naming * dgibbs revision and root check * Backup & Layout rework * removed duplicate updateonstart * Fixed missing space on [ERROR ] [ ERROR ] instead of [ERROR ] * Error space wasn't missing Used to fit other comment sizes, i guess * Anonymous login is now an info Since login variable is removed for servers that don't need steam auth, this won't show a failure anymore but a simple info and anonymous login will be used. * update_steamcmd.sh Check is now done out of functions * solves hanging on update if steamuser is not set * New gameserver layout & functionalities * Better way to detect screen As per #1154 and #1156 * Moved to LinuxGSM-DevTools https://github.com/GameServerManagers/LinuxGSM-DevTools/blob/master/GameServer-Template/gameserver --- 7DaysToDie/sdtdserver | 125 +++++++---- ARKSurvivalEvolved/arkserver | 128 ++++++----- ARKSurvivalEvolved/cfg/lgsm-default.ini | 135 ------------ Arma3/arma3server | 147 ++++++++----- Arma3/cfg/lgsm-default.network.cfg | 77 ------- Arma3/cfg/lgsm-default.server.cfg | 133 ------------ Battlefield1942/bf1942server | 97 ++++++--- BlackMesa/bmdmserver | 122 +++++++---- BlackMesa/cfg/lgsm-default.cfg | 24 --- BladeSymphony/bsserver | 119 +++++++---- BladeSymphony/cfg/lgsm-default.cfg | 15 -- BrainBread2/bb2server | 128 +++++++---- BrainBread2/cfg/lgsm-default.cfg | 201 ------------------ CodenameCURE/ccserver | 131 +++++++----- CodenameCURE/cfg/lgsm-default.cfg | 105 --------- CounterStrike/cfg/lgsm-default.cfg | 38 ---- CounterStrike/csserver | 126 +++++++---- .../cfg/lgsm-default.cfg | 38 ---- CounterStrikeConditionZero/csczserver | 128 +++++++---- .../cfg/lgsm-default.cfg | 31 --- CounterStrikeGlobalOffensive/csgoserver | 147 ++++++++----- CounterStrikeSource/cfg/lgsm-default.cfg | 15 -- CounterStrikeSource/cssserver | 132 +++++++----- DayOfDefeat/cfg/lgsm-default.cfg | 38 ---- DayOfDefeat/dodserver | 127 +++++++---- DayOfDefeatSource/cfg/lgsm-default.cfg | 38 ---- DayOfDefeatSource/dodsserver | 131 +++++++----- DayOfInfamy/cfg/lgsm-default.cfg | 16 -- DayOfInfamy/doiserver | 130 ++++++----- DeathmatchClassic/cfg/lgsm-default.cfg | 35 --- DeathmatchClassic/dmcserver | 128 +++++++---- DontStarveTogether/cfg/lgsm-default.ini | 39 ---- DontStarveTogether/dstserver | 131 +++++++----- DoubleActionBoogaloo/cfg/lgsm-default.cfg | 15 -- DoubleActionBoogaloo/dabserver | 131 +++++++----- EmpiresMod/emserver | 130 +++++------ FistfulOfFrags/cfg/lgsm-default.cfg | 126 ----------- FistfulOfFrags/fofserver | 131 +++++++----- GarrysMod/cfg/lgsm-default.cfg | 86 -------- GarrysMod/gmodserver | 143 ++++++++----- GoldenEyeSource/cfg/lgsm-default.cfg | 126 ----------- GoldenEyeSource/gesserver | 124 +++++++---- HalfLife2Deathmatch/cfg/lgsm-default.cfg | 15 -- HalfLife2Deathmatch/hl2dmserver | 126 +++++++---- HalfLifeDeathmatch/cfg/lgsm-default.cfg | 35 --- HalfLifeDeathmatch/hldmserver | 126 +++++++---- HalfLifeDeathmatchSource/cfg/lgsm-default.cfg | 15 -- HalfLifeDeathmatchSource/hldmsserver | 125 +++++++---- Hurtworld/hwserver | 143 ++++++++----- Insurgency/insserver | 130 ++++++----- JustCause2/cfg/config.lua | 180 ---------------- JustCause2/jc2server | 122 +++++++---- KillingFloor/kfserver | 128 +++++++---- Left4Dead/cfg/lgsm-default.cfg | 15 -- Left4Dead/l4dserver | 132 +++++++----- Left4Dead2/cfg/lgsm-default.cfg | 15 -- Left4Dead2/l4d2server | 131 +++++++----- Minecraft/cfg/lgsm-default.ini | 40 ---- Minecraft/mcserver | 105 ++++++--- Mumble/mumbleserver | 102 ++++++--- NS2Combat/ns2cserver | 129 +++++++---- NaturalSelection2/ns2server | 129 +++++++---- NoMoreRoomInHell/cfg/lgsm-default.cfg | 121 ----------- NoMoreRoomInHell/nmrihserver | 133 +++++++----- OpposingForce/cfg/lgsm-default.cfg | 35 --- OpposingForce/opforserver | 128 +++++++---- .../cfg/lgsm-default.cfg | 119 ----------- PiratesVikingandKnightsII/pvkiiserver | 131 +++++++----- ProjectZomboid/cfg/lgsm-default.ini | 66 ------ ProjectZomboid/pzserver | 127 ++++++----- Quake2/cfg/lgsm-default.cfg | 15 -- Quake2/q2server | 100 ++++++--- Quake3/cfg/lgsm-default.cfg | 36 ---- Quake3/q3server | 99 ++++++--- QuakeLive/cfg/lgsm-default.cfg | 103 --------- QuakeLive/qlserver | 131 +++++++----- RedOrchestra/roserver | 123 +++++++---- Ricochet/cfg/lgsm-default.cfg | 35 --- Ricochet/ricochetserver | 150 +++++++++---- Rust/cfg/lgsm-default.cfg | 48 ----- Rust/rustserver | 137 +++++++----- SeriousSam3BFE/cfg/lgsm-default.ini | 49 ----- .../help/DedicatedServer_Readme.txt | 139 ------------ SeriousSam3BFE/ss3sserver | 129 ++++++----- Starbound/cfg/lgsm-default.config | 49 ----- Starbound/sbserver | 128 +++++++---- SvenCoop/cfg/lgsm-default.cfg | 36 ---- SvenCoop/svenserver | 131 +++++++----- TeamFortress2/cfg/lgsm-default.cfg | 15 -- TeamFortress2/tf2server | 131 +++++++----- TeamFortressClassic/cfg/lgsm-default.cfg | 38 ---- TeamFortressClassic/tfcserver | 128 +++++++---- TeamSpeak3/cfg/lgsm-default.ini | 20 -- TeamSpeak3/ts3server | 102 ++++++--- Teeworlds/cfg/ctf.cfg | 7 - Teeworlds/cfg/dm.cfg | 7 - Teeworlds/cfg/duel.cfg | 7 - Teeworlds/cfg/lgsm-default.cfg | 26 --- Teeworlds/cfg/tdm.cfg | 14 -- Teeworlds/twserver | 124 +++++++---- Terraria/cfg/lgsm-default.txt | 68 ------ Terraria/terrariaserver | 124 +++++++---- UnrealTournament/cfg/Engine.ini | 3 - UnrealTournament/cfg/Game.ini | 4 - UnrealTournament/utserver | 108 ++++++---- UnrealTournament2004/ut2k4server | 120 +++++++---- UnrealTournament3/ut3server | 109 ++++++---- UnrealTournament99/ut99server | 106 +++++---- .../cfg/lgsm-default.cfg | 125 ----------- WolfensteinEnemyTerritory/wetserver | 106 ++++++--- lgsm/functions/check_steamcmd.sh | 8 +- lgsm/functions/check_tmuxception.sh | 2 +- lgsm/functions/core_messages.sh | 2 +- lgsm/functions/update_steamcmd.sh | 5 +- 114 files changed, 4622 insertions(+), 5495 deletions(-) delete mode 100644 ARKSurvivalEvolved/cfg/lgsm-default.ini delete mode 100644 Arma3/cfg/lgsm-default.network.cfg delete mode 100644 Arma3/cfg/lgsm-default.server.cfg delete mode 100644 BlackMesa/cfg/lgsm-default.cfg delete mode 100644 BladeSymphony/cfg/lgsm-default.cfg delete mode 100644 BrainBread2/cfg/lgsm-default.cfg delete mode 100644 CodenameCURE/cfg/lgsm-default.cfg delete mode 100644 CounterStrike/cfg/lgsm-default.cfg delete mode 100644 CounterStrikeConditionZero/cfg/lgsm-default.cfg delete mode 100644 CounterStrikeGlobalOffensive/cfg/lgsm-default.cfg delete mode 100644 CounterStrikeSource/cfg/lgsm-default.cfg delete mode 100644 DayOfDefeat/cfg/lgsm-default.cfg delete mode 100644 DayOfDefeatSource/cfg/lgsm-default.cfg delete mode 100644 DayOfInfamy/cfg/lgsm-default.cfg delete mode 100644 DeathmatchClassic/cfg/lgsm-default.cfg delete mode 100644 DontStarveTogether/cfg/lgsm-default.ini delete mode 100644 DoubleActionBoogaloo/cfg/lgsm-default.cfg delete mode 100644 FistfulOfFrags/cfg/lgsm-default.cfg delete mode 100644 GarrysMod/cfg/lgsm-default.cfg delete mode 100644 GoldenEyeSource/cfg/lgsm-default.cfg delete mode 100644 HalfLife2Deathmatch/cfg/lgsm-default.cfg delete mode 100644 HalfLifeDeathmatch/cfg/lgsm-default.cfg delete mode 100644 HalfLifeDeathmatchSource/cfg/lgsm-default.cfg delete mode 100644 JustCause2/cfg/config.lua delete mode 100644 Left4Dead/cfg/lgsm-default.cfg delete mode 100644 Left4Dead2/cfg/lgsm-default.cfg delete mode 100644 Minecraft/cfg/lgsm-default.ini delete mode 100644 NoMoreRoomInHell/cfg/lgsm-default.cfg delete mode 100644 OpposingForce/cfg/lgsm-default.cfg delete mode 100644 PiratesVikingandKnightsII/cfg/lgsm-default.cfg delete mode 100644 ProjectZomboid/cfg/lgsm-default.ini delete mode 100644 Quake2/cfg/lgsm-default.cfg delete mode 100644 Quake3/cfg/lgsm-default.cfg delete mode 100644 QuakeLive/cfg/lgsm-default.cfg delete mode 100644 Ricochet/cfg/lgsm-default.cfg delete mode 100644 Rust/cfg/lgsm-default.cfg delete mode 100644 SeriousSam3BFE/cfg/lgsm-default.ini delete mode 100644 SeriousSam3BFE/help/DedicatedServer_Readme.txt delete mode 100644 Starbound/cfg/lgsm-default.config delete mode 100644 SvenCoop/cfg/lgsm-default.cfg delete mode 100644 TeamFortress2/cfg/lgsm-default.cfg delete mode 100644 TeamFortressClassic/cfg/lgsm-default.cfg delete mode 100644 TeamSpeak3/cfg/lgsm-default.ini delete mode 100644 Teeworlds/cfg/ctf.cfg delete mode 100644 Teeworlds/cfg/dm.cfg delete mode 100644 Teeworlds/cfg/duel.cfg delete mode 100644 Teeworlds/cfg/lgsm-default.cfg delete mode 100644 Teeworlds/cfg/tdm.cfg delete mode 100644 Terraria/cfg/lgsm-default.txt delete mode 100644 UnrealTournament/cfg/Engine.ini delete mode 100644 UnrealTournament/cfg/Game.ini delete mode 100644 WolfensteinEnemyTerritory/cfg/lgsm-default.cfg diff --git a/7DaysToDie/sdtdserver b/7DaysToDie/sdtdserver index 3a2f62064..fe8f3d210 100644 --- a/7DaysToDie/sdtdserver +++ b/7DaysToDie/sdtdserver @@ -1,67 +1,93 @@ #!/bin/bash -# 7 Days To Die -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: 7 Days To Die | 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="211016" - -#### Variables #### +version="161026" -# Notification Alerts -# (on|off) +########################## +######## Settings ######## +########################## -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" - -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" +#### Server Settings #### -# Steam login +## SteamCMD Login | https://github.com/GameServerManagers/LinuxGSM/wiki/SteamCMD#steamcmd-login steamuser="username" steampass="password" -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters ip="0.0.0.0" -updateonstart="off" -# http://7daystodie.gamepedia.com/Server +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | http://7daystodie.gamepedia.com/Server fn_parms(){ parms="-logfile ${gamelogdir}/output_log__`date +%Y-%m-%d__%H-%M-%S`.txt -quit -batchmode -nographics -dedicated -configfile=${servercfgfullpath}" } -#### Advanced Variables #### +#### LinuxGSM 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" +## 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" -# Steam -appid="294420" +## 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="294420" # Steam App Branch Select # Allows to opt into the various Steam app branches. Default branch is "". # Example: "-beta latest_experimental" branch="" -# Server Details -servicename="sdtd-server" +## 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="7 Days To Die" engine="unity3d" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="sdtd-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -70,6 +96,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}" executabledir="${filesdir}" executable="./7DaysToDieServer.x86" @@ -78,29 +106,26 @@ servercfgdefault="serverconfig.xml" servercfgdir="${filesdir}" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${rootdir}/log/server" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - gamelog="${gamelogdir}/${servicename}-game.log" scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -157,8 +182,18 @@ 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 diff --git a/ARKSurvivalEvolved/arkserver b/ARKSurvivalEvolved/arkserver index 940ffee80..cdda3b2f9 100644 --- a/ARKSurvivalEvolved/arkserver +++ b/ARKSurvivalEvolved/arkserver @@ -1,36 +1,28 @@ #!/bin/bash -# ARK: Survivial Evolved -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: ARK: Survival Evolved | 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="211016" - -#### Variables #### - -# Notification Alerts -# (on|off) - -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" +version="161026" -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" +########################## +######## Settings ######## +########################## -# Steam login -steamuser="anonymous" -steampass="" +#### Server Settings #### -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters servername="ark-server" port="7778" queryport="27015" @@ -38,35 +30,66 @@ rconport="32330" rconpassword="" # Set to enable rcon maxplayers="50" ip="0.0.0.0" -updateonstart="off" +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care fn_parms(){ parms="\"TheIsland?listen?MultiHome=${ip}?SessionName=${servername}?MaxPlayers=${maxplayers}?QueryPort=${queryport}?RCONPort=${rconport}?Port=${port}?ServerAdminPassword=${rconpassword}\"" } -#### Advanced Variables #### +#### LinuxGSM 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" +## 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" -# Steam -appid="376030" +## 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="376030" # Steam App Branch Select # Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta beta" +# Example: "-beta latest_experimental" branch="" -# Server Details -servicename="ark-server" +## 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="ARK: Survivial Evolved" engine="unreal4" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="ark-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -75,6 +98,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/ShooterGame" executabledir="${systemdir}/Binaries/Linux" executable="./ShooterGameServer" @@ -83,28 +108,25 @@ servercfg="GameUserSettings.ini" servercfgfullpath="${servercfgdir}/${servercfg}" servercfgdefault="${servercfgdir}/GameUserSettings.ini" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -161,8 +183,18 @@ 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 diff --git a/ARKSurvivalEvolved/cfg/lgsm-default.ini b/ARKSurvivalEvolved/cfg/lgsm-default.ini deleted file mode 100644 index e14a10c6f..000000000 --- a/ARKSurvivalEvolved/cfg/lgsm-default.ini +++ /dev/null @@ -1,135 +0,0 @@ -[ServerSettings] -AllowFlyerCarryPvE=False -AllowThirdPersonPlayer=False -AlwaysNotifyPlayerLeft=False -AutoSavePeriodMinutes=15.000000 -ClampResourceHarvestDamage=False -DayCycleSpeedScale=1.000000 -DayTimeSpeedScale=1.000000 -DifficultyOffset=0.200000 -DinoCharacterFoodDrainMultiplier=1.000000 -DinoCharacterHealthRecoveryMultiplier=1.000000 -DinoCharacterStaminaDrainMultiplier=1.000000 -DinoCountMultiplier=1.000000 -DinoDamageMultiplier=1.000000 -DinoResistanceMultiplier=1.000000 -DisableStructureDecayPvE=False -DontAlwaysNotifyPlayerJoined=False -EnablePvPGamma=False -GlobalVoiceChat=False -HarvestAmountMultiplier=1.000000 -HarvestHealthMultiplier=1.000000 -KickIdlePlayersPeriod=2400.000000 -NewMaxStructuresInRange=6000.000000 -NightTimeSpeedScale=1.000000 -NoTributeDownloads=False -PlayerCharacterFoodDrainMultiplier=1.000000 -PlayerCharacterHealthRecoveryMultiplier=1.000000 -PlayerCharacterStaminaDrainMultiplier=1.000000 -PlayerCharacterWaterDrainMultiplier=1.000000 -PlayerDamageMultiplier=1.000000 -PlayerResistanceMultiplier=1.000000 -ProximityChat=False -ProximityVoiceChat=False -PvEStructureDecayDestructionPeriod=0.000000 -PvEStructureDecayPeriodMultiplier=1.000000 -RCONEnabled=True -RCONPort=32330 -ResourcesRespawnPeriodMultiplier=1.000000 -ServerAdminPassword=adminpassword -ServerCrosshair=False -ServerForceNoHUD=False -ServerHardcore=False -ServerPassword= -ServerPVE=False -ShowMapPlayerLocation=False -StructureDamageMultiplier=1.000000 -StructureResistanceMultiplier=1.000000 -TamedDinoDamageMultiplier=1.000000 -TamedDinoResistanceMultiplier=1.000000 -TamingSpeedMultiplier=1.000000 -XPMultiplier=1.000000 - -[/Script/ShooterGame.ShooterGameUserSettings] -MasterAudioVolume=1.000000 -MusicAudioVolume=1.000000 -SFXAudioVolume=1.000000 -VoiceAudioVolume=1.000000 -CameraShakeScale=1.000000 -bFirstPersonRiding=False -bThirdPersonPlayer=False -bShowStatusNotificationMessages=True -TrueSkyQuality=0.270000 -FOVMultiplier=1.000000 -GroundClutterDensity=1.000000 -bFilmGrain=False -bMotionBlur=True -bUseDFAO=True -bUseSSAO=True -bShowChatBox=True -bCameraViewBob=True -bInvertLookY=False -bFloatingNames=True -bChatBubbles=True -bHideServerInfo=False -bJoinNotifications=False -bCraftablesShowAllItems=True -LookLeftRightSensitivity=1.000000 -LookUpDownSensitivity=1.000000 -GraphicsQuality=2 -ActiveLingeringWorldTiles=10 -ClientNetQuality=3 -LastServerSearchType=0 -LastServerSearchHideFull=False -LastServerSearchProtected=False -HideItemTextOverlay=False -bDistanceFieldShadowing=True -LODScalar=1.000000 -HighQualityMaterials=True -HighQualitySurfaces=True -bTemperatureF=False -bDisableTorporEffect=False -bChatShowSteamName=False -bChatShowTribeName=True -EmoteKeyBind1=0 -EmoteKeyBind2=0 -bUseVSync=False -ResolutionSizeX=1280 -ResolutionSizeY=720 -LastUserConfirmedResolutionSizeX=1280 -LastUserConfirmedResolutionSizeY=720 -WindowPosX=-1 -WindowPosY=-1 -bUseDesktopResolutionForFullscreen=False -FullscreenMode=2 -LastConfirmedFullscreenMode=2 -Version=5 - -[ScalabilityGroups] -sg.ResolutionQuality=100 -sg.ViewDistanceQuality=3 -sg.AntiAliasingQuality=3 -sg.ShadowQuality=3 -sg.PostProcessQuality=3 -sg.TextureQuality=3 -sg.EffectsQuality=3 -sg.TrueSkyQuality=3 -sg.GroundClutterQuality=3 -sg.IBLQuality=1 -sg.HeightFieldShadowQuality=3 - -[SessionSettings] -SessionName=arkserver -QueryPort=27015 -Port=7777 -;MultiHome=INSERT_IPv4_HERE ;Example:192.168.0.9. If not just remove any line containing MultiHome. - -[/Script/Engine.GameSession] -MaxPlayers=127 - -[MultiHome] -;MultiHome=True ;If MultiHome=IPv4 is filled in. If not just remove any line containing MultiHome. - -[MessageOfTheDay] -Message=Welcome to ARK Server -Duration=5 diff --git a/Arma3/arma3server b/Arma3/arma3server index e09959ef7..fe41a5cf4 100644 --- a/Arma3/arma3server +++ b/Arma3/arma3server @@ -1,83 +1,109 @@ #!/bin/bash -# ARMA 3 -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# Contributor: Scarsz +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: ARMA 3 | 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="211016" - -#### Variables #### - -# Notification Alerts -# (on|off) +version="161026" -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" +########################## +######## Settings ######## +########################## -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" +#### Server Settings #### -# Steam login +## SteamCMD Login | https://github.com/GameServerManagers/LinuxGSM/wiki/SteamCMD#steamcmd-login steamuser="username" steampass="password" -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters ip="0.0.0.0" port="2302" -updateonstart="off" - -fn_parms(){ -parms="-netlog -ip=${ip} -port=${port} -cfg=${networkcfgfullpath} -config=${servercfgfullpath} -mod=${mods} -servermod=${servermods} -bepath=${bepath} -autoinit -loadmissiontomemory" -} -# ARMA 3 Modules -# add mods with relative paths: +## ARMA 3 Modules +# Add mods with relative paths: # mods/@cba_a3 -# to load the "Community Base Addons v3" module found in the +# To load the "Community Base Addons v3" module found in the # directory serverfiles/mods/@cba_a3. Load several mods as: # mods="mods/@ace\;mods/@acex\;mods/@cba_a3" mods="" -# Server-side Mods +## Server-side Mods servermods="" -# Path to BattlEye -# leave empty for default +## Path to BattlEye +# Leave empty for default bepath="" -#### Advanced Variables #### +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care +fn_parms(){ +parms="-netlog -ip=${ip} -port=${port} -cfg=${networkcfgfullpath} -config=${servercfgfullpath} -mod=${mods} -servermod=${servermods} -bepath=${bepath} -autoinit -loadmissiontomemory" +} + +#### LinuxGSM 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" +## 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" -# Steam -appid="233780" +## 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="233780" # Steam App Branch Select # Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta development" +# Example: "-beta latest_experimental" branch="" -# Server Details -servicename="arma3-server" +## 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="ARMA 3" engine="realvirtuality" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="arma3-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -86,6 +112,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}" executabledir="${filesdir}" executable="./arma3server" @@ -97,28 +125,25 @@ servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" networkcfgfullpath="${servercfgdir}/${networkcfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories #gamelogdir="" # No server logs available scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -175,8 +200,18 @@ 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 diff --git a/Arma3/cfg/lgsm-default.network.cfg b/Arma3/cfg/lgsm-default.network.cfg deleted file mode 100644 index 5bba89f8d..000000000 --- a/Arma3/cfg/lgsm-default.network.cfg +++ /dev/null @@ -1,77 +0,0 @@ -// -// network.cfg - Defines network tuning parameters -// -// This file is to be passed to the -cfg parameter on the command line for the server -// See http://community.bistudio.com/wiki/basic.cfg -// The following settings are the suggested settings - -// BANDWIDTH SETTINGS - -// Bandwidth the server is guaranteed to have (in bps) -// General guideline is NumberOfPlayers * 256kb -// Default: 131072 -MinBandwidth=5120000; -// Bandwidth the server can never go above (in bps) -// For a single server, use full network speed; decrease when running multiple servers -MaxBandwidth=10240000; - -// PACKET SETTINGS - -// Maximum number of packets per frame. -// Increasing the value potentially decreases lag, but increases desync -// Default: 128 -MaxMsgSend=2048; -// Maximum payload of guaranteed packet (in b) -// Small messages are packed to larger packets -// Guaranteed packets are used for non-repetitive events, like shooting -// Lower value means more packets are sent, so less events will get combined -// Default: 512 -MaxSizeGuaranteed=512; -// Maximum payload of non-guaranteed packet (in b) -// Increasing this value may improve bandwidth requirement, but may also increase lag -// Largest factor in desync -// Guidance is half of MaxSizeGuaranteed -// Default: 256 -MaxSizeNonguaranteed=256; -// Maximal size of a packet sent over the network -// Only necessary if ISP forces lower packet size and there are connectivity issues -// Default: 1400 -// class sockets{maxPacketSize=1400}; - -// SMOOTHNESS SETTINGS - -// Minimal error required to send network updates for far units -// Smaller values will make for smoother movement at long ranges, but will increase network traffic -// Default: 0.003 -MinErrorToSend=0.01; -// Minimal error required to send network updates for near units -// Using larger value can reduce traffic sent for near units -// Also controls client to server traffic -// Default: 0.01 -MinErrorToSendNear=0.02; - -// GEOLOCATION SETTINGS - -// Server latitude -serverLatitude=52; -serverLatitudeAuto=52; - -// Server Longitude -serverLongitude=0; -serverLongitudeAuto=0; -// MISC -// View Distance (not sure if this actually works) -viewDistance=10000; - -// Maximum size (in b) for custom face or sound files -// Default: 0 -MaxCustomFileSize=0; -// Server language -language="English"; -steamLanguage="English"; -// Adapter -adapter=-1; -// Windowed mode -Windowed=0; - -3D_Performance=1.000000; \ No newline at end of file diff --git a/Arma3/cfg/lgsm-default.server.cfg b/Arma3/cfg/lgsm-default.server.cfg deleted file mode 100644 index 51b2c26e6..000000000 --- a/Arma3/cfg/lgsm-default.server.cfg +++ /dev/null @@ -1,133 +0,0 @@ -// ArmA 3 Server Config File -// -// More info about parameters: -// https://community.bistudio.com/wiki/server.cfg - - -// PORTS -// please specify the serverport as a parameter in arma3server executable -// it will automatically use the serverport including the next 3 for steam query & steam master. -// the fourth port ist not documented in https://community.bistudio.com/wiki/Arma_3_Dedicated_Server#Port_Forwarding -// Server Port -// default: 2302. -// serverport=2302; - -// Steam Master Port -// default: 2304. -// steamport=2304; - -// Steam Query Port -// default: 2303. -//steamqueryport=2303; - - -// GENERAL SETTINGS - -// Server Name -hostname = "arma3server"; - -// Server Password -//password = "arma3pass"; - -// Admin Password -passwordAdmin = "arma3adminpass"; - -// Server Slots -maxPlayers = 32; - -// Logfile -logFile = "arma3server.log"; - -// Minimum Required Client Build -//requiredBuild = 95691 - -// Message of the Day (MOTD) -motd[]={ - "Welcome to My Arma 3 Server", - "TS3 Server: teamspeak.somewhere.com", - "Web: www.example.com" -}; - -// MOTD Interval (Seconds) -motdInterval = 30; - - -// VOTING - -// Server Mission Start -// minimum number of clients before server starts mission -voteMissionPlayers = 1; - -// Accepted Vote Threshold -// 0.33 = 33% clients. -voteThreshold = 0.33; - -// INGAME SETTINGS - -// Disable Voice over Net (VoN) -// 0 = voice enabled. -// 1 = voice disabled. -disableVoN = 0; - -// VoN Codec Quality -// 0-10 = 8kHz (narrowband). -// 11-20 = 16kHz (wideband). -// 21-30 = 32kHz (ultrawideband). -vonCodecQuality = 3; - -//Persistent Battlefield -// 0 = disable. -// 1 = enable. -persistent = 1; - -// Time Stamp Format -// none, short, full -timeStampFormat = "short"; - - -// SERVER SECURITY/ANTI HACK - -// Verify Signitures for Client Addons -// 0 = off. -// 1 = weak protection (depricated). -// 2 = full protection. -verifySignatures = 2; - -// Secure Player ID -// 1 = Server warning message. -// 2 = Kick client. -requiredSecureId = 2; - -// Kick Duplicate Player IDs -kickDuplicate = 1; - -// BattlEye Anti-Cheat -// 0 = disable -// 1 = enable -BattlEye = 1; - -// Allowed File Extentions -allowedLoadFileExtensions[] = {"hpp","sqs","sqf","fsm","cpp","paa","txt","xml","inc","ext","sqm","ods","fxy","lip","csv","kb","bik","bikb","html","htm","biedi"}; -allowedPreprocessFileExtensions[] = {"hpp","sqs","sqf","fsm","cpp","paa","txt","xml","inc","ext","sqm","ods","fxy","lip","csv","kb","bik","bikb","html","htm","biedi"}; -allowedHTMLLoadExtensions[] = {"htm","html","xml","txt"}; - -// SCRIPTING ISSUES -onUserConnected = ""; // -onUserDisconnected = ""; // -doubleIdDetected = ""; // - -// SIGNATURE VERIFICATION -// kick = kick (_this select 0) -// ban = ban (_this select 0) -onUnsignedData = "kick (_this select 0)"; -onHackedData = "kick (_this select 0)"; -onDifferentData = ""; - -// HEADLESS CLIENT SUPPORT -// specify ip-adresses of allowed headless clients -// if more than one: -// headlessClients[]={"127.0.0.1", "192.168.0.1"}; -// localClient[]={"127.0.0.1", "192.168.0.1"}; -headlessClients[]={"127.0.0.1"}; -localClient[]={"127.0.0.1"}; -battleyeLicense=1; diff --git a/Battlefield1942/bf1942server b/Battlefield1942/bf1942server index 07dfccc4b..7e10aa02e 100644 --- a/Battlefield1942/bf1942server +++ b/Battlefield1942/bf1942server @@ -1,36 +1,56 @@ #!/bin/bash -# Battlefield: 1942 -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Battlefield: 1942 | 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="211016" +version="161026" -#### Variables #### +########################## +######## Settings ######## +########################## -# Notification Alerts -# (on|off) +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +fn_parms(){ +parms="+hostServer 1 +dedicated 1" +} + +#### LinuxGSM Settings #### -# Email +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email emailalert="off" email="email@example.com" -#emailfrom="email@example.com" - -# Pushbullet -# https://www.pushbullet.com/#settings +emailfrom="" +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet pushbulletalert="off" pushbullettoken="accesstoken" -# Start Variables +## 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" -fn_parms(){ -parms="+hostServer 1 +dedicated 1" -} #### Advanced Variables #### @@ -41,12 +61,18 @@ githubuser="GameServerManagers" githubrepo="LinuxGSM" githubbranch="master" -# Server Details -servicename="bf1942-server" +## LinuxGSM Server Details +# Do not edit gamename="Battlefield: 1942" engine="refractor" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="bf1942-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -55,6 +81,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}" executabledir="${systemdir}" executable="./start.sh" @@ -63,28 +91,25 @@ servercfgdefault="serversettings.con" servercfgdir="${systemdir}/mods/bf1942/settings" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${filesdir}/Logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -141,8 +166,18 @@ 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 diff --git a/BlackMesa/bmdmserver b/BlackMesa/bmdmserver index 9f458c29b..3f540c12c 100644 --- a/BlackMesa/bmdmserver +++ b/BlackMesa/bmdmserver @@ -1,77 +1,99 @@ #!/bin/bash -# Black Mesa: Deathmatch -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Black Mesa: Deathmatch | 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="211016" - -#### Variables #### - -# Notification Alerts -# (on|off) - -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" +version="161026" -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" +########################## +######## Settings ######## +########################## -# Steam login -steamuser="anonymous" -steampass="" +#### Server Settings #### -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="dm_bounce" maxplayers="16" port="27015" sourcetvport="27020" clientport="27005" ip="0.0.0.0" -updateonstart="off" -# Optional: Game Server Login Token +## Optional: Game Server Login Token # GSLT can be used for running a public server. # More info: https://gameservermanagers.com/gslt gslt="" -# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game bms -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" } -#### Advanced Variables #### +#### 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" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" -# Github Branch Select +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +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" -# Steam +## SteamCMD Settings +# Server appid appid="346680" - # Steam App Branch Select # Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta public-beta" +# Example: "-beta latest_experimental" branch="" -# Server Details -servicename="bmdm-server" +## LinuxGSM Server Details +# Do not edit gamename="Black Mesa: Deathmatch" engine="source" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="bmdm-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -80,6 +102,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/bms" executabledir="${filesdir}" executable="./srcds_run" @@ -88,28 +112,26 @@ servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" + +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directorie gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -166,8 +188,18 @@ 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 diff --git a/BlackMesa/cfg/lgsm-default.cfg b/BlackMesa/cfg/lgsm-default.cfg deleted file mode 100644 index 9a047db15..000000000 --- a/BlackMesa/cfg/lgsm-default.cfg +++ /dev/null @@ -1,24 +0,0 @@ -// Black Mesa server.cfg file -// Server Name -hostname "" - -// RCON Password -rcon_password "" - -// Server Password -sv_password "" - -// Server Logging -log on -sv_logbans 1 -sv_logecho 1 -sv_logfile 1 -sv_log_onefile 0 - -mp_timelimit 900 -mp_warmup_time 30 -// sv_lan 0 -// mp_flashlight 1 -// mp_forcerespawn 0 -// mp_friendlyfire 0 -// mp_fraglimit 45 \ No newline at end of file diff --git a/BladeSymphony/bsserver b/BladeSymphony/bsserver index 67c3f5f1f..21444e0c9 100644 --- a/BladeSymphony/bsserver +++ b/BladeSymphony/bsserver @@ -1,72 +1,91 @@ #!/bin/bash -# Blade Symphony -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Blade Symphony | 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="211016" - -#### Variables #### +version="161026" -# Notification Alerts -# (on|off) +########################## +######## Settings ######## +########################## -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" +#### Server Settings #### -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" - -# Steam login +## SteamCMD Login | https://github.com/GameServerManagers/LinuxGSM/wiki/SteamCMD#steamcmd-login steamuser="username" steampass="password" -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="duel_winter" maxplayers="16" port="27015" sourcetvport="27020" clientport="27005" ip="0.0.0.0" -updateonstart="off" -# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-autoupdate -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" } -#### Advanced Variables #### +#### 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" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" -# Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" -# Steam -appid="228780" +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### +## SteamCMD Settings +# Server appid +appid="228780" # Steam App Branch Select # Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta nightly -betapassword winteriscoming" +# Example: "-beta latest_experimental" branch="" -# Server Details -servicename="bs-server" +## LinuxGSM Server Details +# Do not edit gamename="Blade Symphony" engine="source" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="bs-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -75,6 +94,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/berimbau" executabledir="${filesdir}" executable="./srcds_run.sh" @@ -83,28 +104,24 @@ servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -161,8 +178,18 @@ 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 diff --git a/BladeSymphony/cfg/lgsm-default.cfg b/BladeSymphony/cfg/lgsm-default.cfg deleted file mode 100644 index c2b66dcbc..000000000 --- a/BladeSymphony/cfg/lgsm-default.cfg +++ /dev/null @@ -1,15 +0,0 @@ -// Server Name -hostname "" - -// RCON Password -rcon_password "" - -// Server Password -sv_password "" - -// Server Logging -log on -sv_logbans 1 -sv_logecho 1 -sv_logfile 1 -sv_log_onefile 0 \ No newline at end of file diff --git a/BrainBread2/bb2server b/BrainBread2/bb2server index b2c7c49b1..8900e978a 100644 --- a/BrainBread2/bb2server +++ b/BrainBread2/bb2server @@ -1,77 +1,102 @@ #!/bin/bash -# BrainBread 2 -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: BrainBread 2 | 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="211016" - -#### Variables #### - -# Notification Alerts -# (on|off) - -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" +version="161026" -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" +########################## +######## Settings ######## +########################## +## SteamCMD Login | https://github.com/GameServerManagers/LinuxGSM/wiki/SteamCMD#steamcmd-login # Steam login steamuser="username" steampass="password" -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="bba_barracks" maxplayers="20" port="27015" sourcetvport="27020" clientport="27005" ip="0.0.0.0" -updateonstart="off" -# Optional: Game Server Login Token +## Optional: Game Server Login Token # GSLT can be used for running a public server. # More info: https://gameservermanagers.com/gslt gslt="" -# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game brainbread2 -insecure -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" } -#### Advanced Variables #### +#### LinuxGSM 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" +## 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" -# Steam -appid="475370" +## 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="475370" # Steam App Branch Select # Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta beta_branch" +# Example: "-beta latest_experimental" branch="" -# Server Details -servicename="bb2-server" +## 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="BrainBread 2" engine="source" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="bb2-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -80,6 +105,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/brainbread2" executabledir="${filesdir}" executable="./srcds_run" @@ -88,28 +115,25 @@ servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -166,8 +190,18 @@ 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 diff --git a/BrainBread2/cfg/lgsm-default.cfg b/BrainBread2/cfg/lgsm-default.cfg deleted file mode 100644 index e016e66fb..000000000 --- a/BrainBread2/cfg/lgsm-default.cfg +++ /dev/null @@ -1,201 +0,0 @@ -// **************************************************************************** -// * -// BrainBread 2 - server.cfg * -// Version 080116 * -// * -// **************************************************************************** - -// ............................. Basic Settings ............................. // - -// Hostname for server. -hostname "" - -// RCON - remote console password. -rcon_password "" - -// Server password - for private servers. -sv_password "" - -// Contact email for server sysop. -sv_contact "email@example.com" - -// LAN Mode - If set the server will not show on the internet. -// Default: sv_lan 0 -sv_lan 0 - -// Cheats - Allows cheats on the server. Steam achievements and stats are disabled. -// Default: 0 -sv_cheats 0 - -// Friendly Fire - Allows team members to injure other members of their team. -// 0 = Friendly fire off. -// 1 = Friendly fire on. -// Default: 0 -mp_friendlyfire 0 - -// ........................ Game Specific Commands ........................ // -// info: any commands that only apply to this game. - - -// Mercy Value - Sets how many deaths until the players become human once again. -// Default: bb2_allow_mercy 0 -bb2_allow_mercy 3 - -// Late Joining - Allows players to spawn late. -// default bb2_allow_latejoin 0 -bb2_allow_latejoin 1 - -// Player Spawn Protection - Time in seconds after Spawn. -// default bb2_spawn_protection 1 -bb2_spawn_protection 15 - -// Profile System - Allow players to save and load there skills. -// 0 = Disabled, skills are not saved. -// 1 = Global, players can load there global skills. -// 2 = Server, players save there skills to the server. Steam achievements and stats are disabled. -// Default 1 -bb2_allow_profile_system 1 - -// Allow NPC to score - Allow friendly npcs to affect scoring. For example for quests. -// Default 1 -bb2_allow_npc_to_score 0 - -// Vote Settings - -// Voting: Passing Votes - Percentage of players that are required to pass a vote. -// Minimum: 0 -// Maximum: 100 -// Default 50 -bb2_votes_required 50 - -// Voting: Ban Time - Number of minutes a player be banned if a vaote ban passes. -// minimum: 0 (permanent) -// default 30 -bb2_ban_time 30 - - -// Arena Settings - -// Arena: Respawn Interval Time (Seconds). -// Minimum: 20 -// Default 40 -bb2_arena_respawn_time 25 - -// Arena: Number of Reinforcements. -// Minimum: 0 -// Maximum: 100 -// Default 14 -bb2_arena_reinforcement_count 14 - - -// Classic Mode Settings - -// Classic: Zombie No Team Change. -// 0 = Players can become zombies. -// 1 = Players cannot become zombies. -// Default 0 -bb2_classic_zombie_noteamchange 1 - - -// Elimination Settings - -// Elimination: Team Fraglimit - Number of frags for a team to win a game. -// Minimum: 10 -// Default 200 -bb2_elimination_fraglimit 200 - -// Elimination: Respawn Time (Seconds). -// Minimum: 1 -// Maximum: 30 -// Default 4 -bb2_elimination_respawn_time 5 - -// Elimination: Respawn Time Scale - Increase the respawn timer in seconds when a player joins. -// Example: respawn_timer + (joined_players x time_scale) = new_respawn_timer. 14 + (20 x 2) = 54. -// Minimum: 0 -// Maximum: 10 -// Default 1 -bb2_elimination_respawn_time_scale 1 - -// Elimination: Extermination Score - The score a team should be awarded for exterminating (kill everyone before respawn) the other team. -// Minimum: 0 -// Maximum: 50 -// Default 25 -bb2_elimination_score_from_extermination 25 - -// Elimination: Zombie Score - Number of point a zombie gets for a kill. -// Minimum: 2 -// Maximum: 10 -// Default 5 -bb2_elimination_score_zombies 5 - -// Elimination: Team Perk Duration - Number of seconds a team perk lasts. -// Minimum: 5 -// Maximum: 60 -// Default 30 -bb2_elimination_teamperk_duration 30 - -// Elimination: Team Perk Required Kills - Number of kills a team need to get in order to activate a team perk. -// Minimum: 25 -// Maximum: 500 -// Default 50 -bb2_elimination_teamperk_kills_required 50 - - -// Zombie Settings - -// Zombie Lifespan - Number of minutes a regular zombie will last before dying. -// Minimum: 1 -// Default 5 -bb2_zombie_lifespan 2 - -// Max Zombies - Maximum number of zombies allowed in the game. -// Minimum: 1 -// Maximum: 128 -// Default 50 -bb2_zombie_max 45 - - -// M1A1 Abrams Settings - -// M1A1 Abrams: Main Cannon Damage. -// Minimum: 100 -// Maximum: 10000 -// Default 3000 -bb2_m1a1_damage 200 - -// M1A1 Abrams: Machinegun Damage. -// Minimum: 25 -// Maximum: 1000 -// Default 30 -bb2_m1a1_damage_machinegun 25 - -// M1A1 Abrams: Friendly Fire (Including NPC's). -// Minimum: 0 -// Maximum: 1 -// Default 1 -bb2_m1a1_friendly 1 - -// M1A1 Abrams: Machinegun Rate of Fire. -// Minimum: 0.01 -// Maximum: 1 -// Default 0.08 -bb2_m1a1_machinegun_firerate 1 - -// M1A1 Abrams: Explosion Radius. -// Minimum: 200 -// Maximum: 10000 -// Default 500 -bb2_m1a1_radius 500 - -// M1A1 Abrams: Max Sight Range. -// Minimum: 500 -// Maximum: 10000 -// Default 2000 -bb2_m1a1_range_max 1000 - -// M1A1 Abrams: Min Sight Range. -// Minimum: 250 -// Maximum: 5000 -// Default 400 -bb2_m1a1_range_min 250 \ No newline at end of file diff --git a/CodenameCURE/ccserver b/CodenameCURE/ccserver index 43b726b6a..5120d11d0 100644 --- a/CodenameCURE/ccserver +++ b/CodenameCURE/ccserver @@ -1,72 +1,92 @@ #!/bin/bash -# Codename CURE -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Codename CURE | 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="211016" - -#### Variables #### - -# Notification Alerts -# (on|off) +version="161026" -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" +########################## +######## Settings ######## +########################## -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" - -# Steam login -steamuser="anonymous" -steampass="" - -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="cbe_bunker" maxplayers="6" port="27015" sourcetvport="27020" clientport="27005" ip="0.0.0.0" -updateonstart="off" -# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game cure -insecure -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" } -#### Advanced Variables #### +#### LinuxGSM 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" +## 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" -# Steam -appid="383410" +## 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="383410" # Steam App Branch Select # Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta beta" +# Example: "-beta latest_experimental" branch="" -# Server Details -servicename="cc-server" +## 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="Codename CURE" engine="source" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="cc-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -75,6 +95,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/cure" executabledir="${filesdir}" executable="./srcds_run" @@ -83,28 +105,25 @@ servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -161,8 +180,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/CodenameCURE/cfg/lgsm-default.cfg b/CodenameCURE/cfg/lgsm-default.cfg deleted file mode 100644 index 296c28ec8..000000000 --- a/CodenameCURE/cfg/lgsm-default.cfg +++ /dev/null @@ -1,105 +0,0 @@ -// **************************************************************************** -// * -// CodenameCURE - server.cfg * -// Version 100216 * -// * -// **************************************************************************** - -// ............................. Basic Settings ............................. // - -// Hostname for server. -hostname "" - -// RCON - remote console password. -rcon_password "" - -// Server password - for private servers. -sv_password "" - -// Contact email for server sysop. -sv_contact "email@example.com" - -// LAN Mode - If set the server will not show on the internet. -// Default: sv_lan 0 -sv_lan 0 - -// ............................... Map Cycles ............................... // -// info: There are several predefined mapcycles available that are listed below. -// You can also create your own custom mapcycle. - -// "mapcycle.txt" - all maps -mapcyclefile "mapcycle.txt" - -// ........................ Game Specific Commands ........................ // -// info: any commands that only apply to this game. - -// Difficulty -// 0 - Easy -// 1 - Average -// 2 - Skilled -// 3 - Insane -sv_difficulty "1" - -// Server tags - Tags show up on the in-game server browser. This helps -// users filter servers. -// vanilla - he server runs the default settings. -// custom - the server runs custom gameplay settings or mods. -// example: sv_tags "custom, fastdl" -sv_tags "" - -// ............................. Communication ............................. // - -// Enable communication over voice via microphone. -// Default: sv_voiceenable 1 -sv_voiceenable 1 - -// Players can hear all other players, no team restrictions. -// Default: sv_alltalk 0 -sv_alltalk 1 - -// ............................. Fast Download .............................. // -// info: Allows custom maps to be downloaded to the client. - -// Allows clients to download custom maps and textures etc. from the server at 20 kbps. -// Default: sv_allowdownload 1 -sv_allowdownload 1 - -// Allows clients to download custom maps, textures etc. from a web server with no transfer limit. -// Example: -// server location: maps/custommap.bsp -// web server location: http://example.com/custom/maps/custommap.bsp -// sv_downloadurl "http://example.com/custom" -// Default: sv_downloadurl "" -sv_downloadurl "" - -// ................................ Ban List ............................... // - -// personal banlist based on user IDs. -exec banned_user.cfg - -// personal banlist based on user IPs. -exec banned_ip.cfg - -writeid -writeip - -// ............................. Server Logging ............................. // - -//Enables logging to file, console, and udp < on | off >. -log on - -// Log server bans in the server logs. -// Default: sv_logbans 1 -sv_logbans 1 - -// Echo log information to the console. -// Default: sv_logecho 1 -sv_logecho 1 - -// Log server information in the log file. -// Default: sv_logfile 1 -sv_logfile 1 - -// Log server information to only one file. -// Default: sv_log_onefile 0 -sv_log_onefile 0 diff --git a/CounterStrike/cfg/lgsm-default.cfg b/CounterStrike/cfg/lgsm-default.cfg deleted file mode 100644 index ceb8f9374..000000000 --- a/CounterStrike/cfg/lgsm-default.cfg +++ /dev/null @@ -1,38 +0,0 @@ -// Server Name -hostname "" - -// RCON Password -rcon_password "" - -// Server Password -sv_password "" - -// Server Logging -log on -sv_logbans 1 -sv_logecho 1 -sv_logfile 1 -sv_log_onefile 0 - -// disable autoaim -sv_aim 0 - -// disable clients' ability to pause the server -pausable 0 - -// maximum client movement speed -sv_maxspeed 320 - -// 20 minute timelimit -mp_timelimit 20 - -// cheats off -sv_cheats 0 - -// load ban files -exec listip.cfg -exec banned.cfg - - - - diff --git a/CounterStrike/csserver b/CounterStrike/csserver index 9c75a6aa6..14ff451f3 100644 --- a/CounterStrike/csserver +++ b/CounterStrike/csserver @@ -1,67 +1,94 @@ #!/bin/bash -# Counter-Strike -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Counter-Strike | 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="211016" +version="161026" -#### Variables #### +########################## +######## Settings ######## +########################## -# Notification Alerts -# (on|off) +#### Server Settings #### -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" - -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" - -# Steam login -steamuser="anonymous" -steampass="" - -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="de_dust2" maxplayers="16" port="27015" clientport="27005" ip="0.0.0.0" -updateonstart="off" -# https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2 +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2 fn_parms(){ parms="-game cstrike -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} -maxplayers ${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" + +## 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" + #### Advanced Variables #### -# Github Branch Select +## SteamCMD Settings +# Server appid +appid="90" +appidmod="cstrike" +# 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" -# Steam -appid="90" -appidmod="cstrike" - -# Server Details -servicename="cs-server" +## LinuxGSM Server Details +# Do not edit gamename="Counter-Strike 1.6" engine="goldsource" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="cs-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -70,6 +97,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/cstrike" executabledir="${filesdir}" executable="./hlds_run" @@ -78,28 +107,25 @@ servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -156,8 +182,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/CounterStrikeConditionZero/cfg/lgsm-default.cfg b/CounterStrikeConditionZero/cfg/lgsm-default.cfg deleted file mode 100644 index ceb8f9374..000000000 --- a/CounterStrikeConditionZero/cfg/lgsm-default.cfg +++ /dev/null @@ -1,38 +0,0 @@ -// Server Name -hostname "" - -// RCON Password -rcon_password "" - -// Server Password -sv_password "" - -// Server Logging -log on -sv_logbans 1 -sv_logecho 1 -sv_logfile 1 -sv_log_onefile 0 - -// disable autoaim -sv_aim 0 - -// disable clients' ability to pause the server -pausable 0 - -// maximum client movement speed -sv_maxspeed 320 - -// 20 minute timelimit -mp_timelimit 20 - -// cheats off -sv_cheats 0 - -// load ban files -exec listip.cfg -exec banned.cfg - - - - diff --git a/CounterStrikeConditionZero/csczserver b/CounterStrikeConditionZero/csczserver index 0a6c49e04..5eb1fb83d 100644 --- a/CounterStrikeConditionZero/csczserver +++ b/CounterStrikeConditionZero/csczserver @@ -1,67 +1,94 @@ #!/bin/bash -# Counter-Strike: Condition Zero -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Counter-Strike: Condition Zero | 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="211016" +version="161026" -#### Variables #### +########################## +######## Settings ######## +########################## -# Notification Alerts -# (on|off) +#### Server Settings #### -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" - -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" - -# Steam login -steamuser="anonymous" -steampass="" - -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="de_dust2" maxplayers="16" port="27015" clientport="27005" ip="0.0.0.0" -updateonstart="off" -# https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2 +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2 fn_parms(){ parms="-game czero -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} -maxplayers ${maxplayers}" } -#### Advanced Variables #### +#### 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" + +## 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 #### -# Github Branch Select +## SteamCMD Settings +# Server appid +appid="90" +appidmod="czero" +# 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" -# Steam -appid="90" -appidmod="czero" - -# Server Details -servicename="cscz-server" +## LinuxGSM Server Details +# Do not edit gamename="Counter-Strike: Condition Zero" engine="goldsource" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="cscz-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -70,6 +97,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/czero" executabledir="${filesdir}" executable="./hlds_run" @@ -78,28 +107,25 @@ servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -156,8 +182,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/CounterStrikeGlobalOffensive/cfg/lgsm-default.cfg b/CounterStrikeGlobalOffensive/cfg/lgsm-default.cfg deleted file mode 100644 index d518c8e0d..000000000 --- a/CounterStrikeGlobalOffensive/cfg/lgsm-default.cfg +++ /dev/null @@ -1,31 +0,0 @@ -// Server Name -hostname "" - -// RCON Password -rcon_password "" - -// Server Password -sv_password "" - -// Server Logging -log on -sv_logbans 1 -sv_logecho 1 -sv_logfile 1 -sv_log_onefile 0 - -// Server Hibernation -sv_hibernate_when_empty 1 -sv_hibernate_ms 5 - -// Server Query -// More info at: https://www.gametracker.com/games/csgo/forum.php?thread=91691 -host_name_store 1 -host_info_show 1 -host_players_show 2 - - -exec banned_user.cfg -exec banned_ip.cfg -writeid -writeip diff --git a/CounterStrikeGlobalOffensive/csgoserver b/CounterStrikeGlobalOffensive/csgoserver index 36114ccb3..6ce09436b 100755 --- a/CounterStrikeGlobalOffensive/csgoserver +++ b/CounterStrikeGlobalOffensive/csgoserver @@ -1,43 +1,35 @@ #!/bin/bash -# Counter-Strike: Global Offensive -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Counter-Strike: Global 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="211016" - -#### Variables #### - -# Notification Alerts -# (on|off) - -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" +version="161026" -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" +########################## +######## Settings ######## +########################## -# Steam login -steamuser="anonymous" -steampass="" +#### Server Settings #### -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters # https://developer.valvesoftware.com/wiki/Counter-Strike:_Global_Offensive_Dedicated_Servers#Starting_the_Server -# [Game Modes] gametype gamemode -# Arms Race 1 0 -# Classic Casual 0 0 -# Classic Competitive 0 1 -# Demolition 1 1 -# Deathmatch 1 2 +# [Game Modes] gametype gamemode +# Arms Race 1 0 +# Classic Casual 0 0 +# Classic Competitive 0 1 +# Demolition 1 1 +# Deathmatch 1 2 gametype="0" gamemode="0" defaultmap="de_dust2" @@ -48,48 +40,78 @@ port="27015" sourcetvport="27020" clientport="27005" ip="0.0.0.0" -updateonstart="off" -# Required: Game Server Login Token +## Required: Game Server Login Token # GSLT is required for running a public server. # More info: https://gameservermanagers.com/gslt gslt="" -# Optional: Workshop Parameters +## Optional: Workshop Parameters # https://developer.valvesoftware.com/wiki/CSGO_Workshop_For_Server_Operators # To get an authkey visit - http://steamcommunity.com/dev/apikey # authkey="" # ws_collection_id="" # ws_start_map="" -# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game csgo -usercon -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} -tickrate ${tickrate} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers_override ${maxplayers} +mapgroup ${mapgroup} +game_mode ${gamemode} +game_type ${gametype} +host_workshop_collection ${ws_collection_id} +workshop_start_map ${ws_start_map} -authkey ${authkey}" } -#### Advanced Variables #### +#### LinuxGSM 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" +## 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" -# Steam -appid="740" +## 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 1.35.4.4" +# Example: "-beta latest_experimental" branch="" -# Server Details -servicename="csgo-server" +## 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: Global Offensive" engine="source" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="csgo-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -98,6 +120,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/csgo" executabledir="${filesdir}" executable="./srcds_run" @@ -106,28 +130,25 @@ servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -184,8 +205,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/CounterStrikeSource/cfg/lgsm-default.cfg b/CounterStrikeSource/cfg/lgsm-default.cfg deleted file mode 100644 index c2b66dcbc..000000000 --- a/CounterStrikeSource/cfg/lgsm-default.cfg +++ /dev/null @@ -1,15 +0,0 @@ -// Server Name -hostname "" - -// RCON Password -rcon_password "" - -// Server Password -sv_password "" - -// Server Logging -log on -sv_logbans 1 -sv_logecho 1 -sv_logfile 1 -sv_log_onefile 0 \ No newline at end of file diff --git a/CounterStrikeSource/cssserver b/CounterStrikeSource/cssserver index 12ff1df51..716c9904d 100644 --- a/CounterStrikeSource/cssserver +++ b/CounterStrikeSource/cssserver @@ -1,36 +1,28 @@ #!/bin/bash -# Counter-Strike: Source -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Counter-Strike: Source | 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="211016" - -#### Variables #### - -# Notification Alerts -# (on|off) - -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" +version="161026" -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" +########################## +######## Settings ######## +########################## -# Steam login -steamuser="anonymous" -steampass="" +#### Server Settings #### -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="de_dust2" maxplayers="16" port="27015" @@ -39,39 +31,70 @@ clientport="27005" ip="0.0.0.0" updateonstart="off" -# Required: Game Server Login Token +## Required: Game Server Login Token # GSLT is required for running a public server. # More info: https://gameservermanagers.com/gslt gslt="" -# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game cstrike -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" } -#### Advanced Variables #### +#### LinuxGSM 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" +## 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" -# Steam -appid="232330" +## 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="232330" # Steam App Branch Select # Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta prerelease" +# Example: "-beta latest_experimental" branch="" -# Server Details -servicename="css-server" +## 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: Source" engine="source" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="css-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -80,6 +103,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/cstrike" executabledir="${filesdir}" executable="./srcds_run" @@ -88,28 +113,25 @@ servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -166,8 +188,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/DayOfDefeat/cfg/lgsm-default.cfg b/DayOfDefeat/cfg/lgsm-default.cfg deleted file mode 100644 index ceb8f9374..000000000 --- a/DayOfDefeat/cfg/lgsm-default.cfg +++ /dev/null @@ -1,38 +0,0 @@ -// Server Name -hostname "" - -// RCON Password -rcon_password "" - -// Server Password -sv_password "" - -// Server Logging -log on -sv_logbans 1 -sv_logecho 1 -sv_logfile 1 -sv_log_onefile 0 - -// disable autoaim -sv_aim 0 - -// disable clients' ability to pause the server -pausable 0 - -// maximum client movement speed -sv_maxspeed 320 - -// 20 minute timelimit -mp_timelimit 20 - -// cheats off -sv_cheats 0 - -// load ban files -exec listip.cfg -exec banned.cfg - - - - diff --git a/DayOfDefeat/dodserver b/DayOfDefeat/dodserver index c4e2610fa..5f4787861 100644 --- a/DayOfDefeat/dodserver +++ b/DayOfDefeat/dodserver @@ -1,36 +1,28 @@ #!/bin/bash -# Day of Defeat -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Day of Defeat | 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="211016" +version="161026" -#### Variables #### +########################## +######## Settings ######## +########################## -# Notification Alerts -# (on|off) +#### Server Settings #### -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" - -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" - -# Steam login -steamuser="anonymous" -steampass="" - -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="dod_Anzio" maxplayers="16" port="27015" @@ -38,30 +30,66 @@ clientport="27005" ip="0.0.0.0" updateonstart="off" -# https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2 +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2 fn_parms(){ parms="-game dod -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} -maxplayers ${maxplayers}" } -#### Advanced Variables #### +#### 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" + +## 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 #### -# Github Branch Select +## SteamCMD Settings +# Server appid +appid="90" +appidmod="dod" +# 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" -# Steam -appid="90" -appidmod="dod" - -# Server Details -servicename="dod-server" +## LinuxGSM Server Details +# Do not edit gamename="Day of Defeat" engine="goldsource" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="dod-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -70,6 +98,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/dod" executabledir="${filesdir}" executable="./hlds_run" @@ -78,28 +108,25 @@ servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -156,8 +183,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/DayOfDefeatSource/cfg/lgsm-default.cfg b/DayOfDefeatSource/cfg/lgsm-default.cfg deleted file mode 100644 index ceb8f9374..000000000 --- a/DayOfDefeatSource/cfg/lgsm-default.cfg +++ /dev/null @@ -1,38 +0,0 @@ -// Server Name -hostname "" - -// RCON Password -rcon_password "" - -// Server Password -sv_password "" - -// Server Logging -log on -sv_logbans 1 -sv_logecho 1 -sv_logfile 1 -sv_log_onefile 0 - -// disable autoaim -sv_aim 0 - -// disable clients' ability to pause the server -pausable 0 - -// maximum client movement speed -sv_maxspeed 320 - -// 20 minute timelimit -mp_timelimit 20 - -// cheats off -sv_cheats 0 - -// load ban files -exec listip.cfg -exec banned.cfg - - - - diff --git a/DayOfDefeatSource/dodsserver b/DayOfDefeatSource/dodsserver index f0b8520e0..f212701b9 100644 --- a/DayOfDefeatSource/dodsserver +++ b/DayOfDefeatSource/dodsserver @@ -1,72 +1,94 @@ #!/bin/bash -# Day of Defeat: Source -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Day of Defeat: Source | 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="211016" - -#### Variables #### - -# Notification Alerts -# (on|off) - -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" +version="161026" -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" +########################## +######## Settings ######## +########################## -# Steam login -steamuser="anonymous" -steampass="" +#### Server Settings #### -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="dod_Anzio" maxplayers="16" port="27015" sourcetvport="27020" clientport="27005" ip="0.0.0.0" -updateonstart="off" -# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | ttps://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game dod -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" } -#### Advanced Variables #### +#### LinuxGSM 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" +## 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" -# Steam -appid="232290" +## 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="232290" # Steam App Branch Select # Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta prerelease" +# Example: "-beta latest_experimental" branch="" -# Server Details -servicename="dods-server" +## 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="Day of Defeat: Source" engine="source" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="dods-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -75,6 +97,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/dod" executabledir="${filesdir}" executable="./srcds_run" @@ -83,28 +107,25 @@ servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -161,8 +182,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/DayOfInfamy/cfg/lgsm-default.cfg b/DayOfInfamy/cfg/lgsm-default.cfg deleted file mode 100644 index 364cc1420..000000000 --- a/DayOfInfamy/cfg/lgsm-default.cfg +++ /dev/null @@ -1,16 +0,0 @@ -"hostname" "" -"rcon_password" "" -"mapcyclefile" "mapcycle_tactical_operation.txt" // "tactical operation" mapcycle - firefight, vip, search and destroy -"mp_friendlyfire" "1" // friendly fire -"mp_tkpunish" "1" // How to punish team killing ( 0 = none, 1 = warning, 2 = kill ) -"sv_hud_deathmessages" "0" // death messages -"sv_hud_scoreboard_show_kd" "1" // show k:d on scoreboard -"sv_hud_targetindicator" "1" // show friendly player names when looking at them -"mp_timer_pregame" "10" // timer for the pre-game (before the game starts, usually after map change or on mp_restartgame 1) -"mp_timer_preround" "15" // timer for the pre-round (before the round starts, usually after a previous round ends or on mp_restartround 1) -"mp_timer_postround" "15" // timer for the post-round (after the round starts) -"mp_timer_postgame" "21" // timer for the post-game (at the end of a game / map rotation) -"ins_bot_quota" "0" // if set higher than 0, the server will add this many bots to each team -"sv_deadvoice" "0" // enabling this will allow the dead and living to VOIP each other -"sv_deadchat" "0" // enabling this will allow the dead and living to chat text each other -"sv_deadchat_team" "1" // is deadchat limited to just your team? diff --git a/DayOfInfamy/doiserver b/DayOfInfamy/doiserver index 0decebc06..8f4be1a62 100644 --- a/DayOfInfamy/doiserver +++ b/DayOfInfamy/doiserver @@ -1,36 +1,28 @@ #!/bin/bash -# Day of Infamy -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Day of Infamy | 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="211016" - -#### Variables #### - -# Notification Alerts -# (on|off) - -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" +version="161026" -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" +########################## +######## Settings ######## +########################## -# Steam login -steamuser="anonymous" -steampass="" +#### Server Settings #### -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="bastogne" maxplayers="16" tickrate="64" @@ -38,37 +30,67 @@ port="27015" sourcetvport="27020" clientport="27005" ip="0.0.0.0" -updateonstart="off" workshop="0" -# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game doi -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} -tickrate ${tickrate} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers} +sv_workshop_enabled ${workshop}" } -#### Advanced Variables #### +#### LinuxGSM 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" +## 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" -# Steam -appid="462310" +## 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="462310" # Steam App Branch Select # Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta beta" +# Example: "-beta latest_experimental" branch="" -# Server Details -servicename="doi-server" +## 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="Day of Infamy" engine="source" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="doi-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -77,6 +99,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/doi" executabledir="${filesdir}" executable="./srcds_run" @@ -85,28 +109,26 @@ servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -163,8 +185,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/DeathmatchClassic/cfg/lgsm-default.cfg b/DeathmatchClassic/cfg/lgsm-default.cfg deleted file mode 100644 index 585afb9e2..000000000 --- a/DeathmatchClassic/cfg/lgsm-default.cfg +++ /dev/null @@ -1,35 +0,0 @@ -// Server Name -hostname "" - -// RCON Password -rcon_password "" - -// Server Password -sv_password "" - -// Server Logging -log on -sv_logbans 1 -sv_logecho 1 -sv_logfile 1 -sv_log_onefile 0 - -// disable autoaim -sv_aim 0 - -// disable clients' ability to pause the server -pausable 0 - -// maximum client movement speed -sv_maxspeed 320 - -// 20 minute timelimit -mp_timelimit 20 - -// cheats off -sv_cheats 0 - -// load ban files -exec listip.cfg -exec banned.cfg - diff --git a/DeathmatchClassic/dmcserver b/DeathmatchClassic/dmcserver index c4cb47902..31dda30c3 100644 --- a/DeathmatchClassic/dmcserver +++ b/DeathmatchClassic/dmcserver @@ -1,67 +1,94 @@ #!/bin/bash -# Deathmatch Classic -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Deathmatch Classic | 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="211016" +version="161026" -#### Variables #### +########################## +######## Settings ######## +########################## -# Notification Alerts -# (on|off) +#### Server Settings #### -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" - -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" - -# Steam login -steamuser="anonymous" -steampass="" - -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="dcdm5" maxplayers="16" port="27015" clientport="27005" ip="0.0.0.0" -updateonstart="off" -# https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2 +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2 fn_parms(){ parms="-game dmc -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} -maxplayers ${maxplayers}" } -#### Advanced Variables #### +#### 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" + +## 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 #### -# Github Branch Select +## SteamCMD Settings +# Server appid +appid="90" +appidmod="dmc" +# 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" -# Steam -appid="90" -appidmod="dmc" - -# Server Details -servicename="dmc-server" +## LinuxGSM Server Details +# Do not edit gamename="Deathmatch Classic" engine="goldsource" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="dmc-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -70,6 +97,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/dmc" executabledir="${filesdir}" executable="./hlds_run" @@ -78,28 +107,25 @@ servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -156,8 +182,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/DontStarveTogether/cfg/lgsm-default.ini b/DontStarveTogether/cfg/lgsm-default.ini deleted file mode 100644 index 351a1238c..000000000 --- a/DontStarveTogether/cfg/lgsm-default.ini +++ /dev/null @@ -1,39 +0,0 @@ -[network] -default_server_name = dstserver -default_server_description = Welcome to dstserver -server_port = 10999 -server_password = password - -# max_players = 1 .. 64 -max_players = 16 - -# pvp = true | false -pvp = false - -# game_mode = endless | survival | wilderness -game_mode = endless - -# enable_autosaver = true | false -enable_autosaver = true - -# tick_rate = [ 10 | 15 | 30 | 60 ] -tick_rate = 30 - -connection_timeout = 8000 -server_save_slot = 1 - -# enable_vote_kick = true | false -enable_vote_kick = true - -# pause_when_empty = true | false -pause_when_empty = true - -[account] -dedicated_lan_server = false - -[STEAM] -DISABLECLOUD = true - -[MISC] -CONSOLE_ENABLED = true -autocompiler_enabled = true diff --git a/DontStarveTogether/dstserver b/DontStarveTogether/dstserver index 973f72c16..a2a6a909a 100644 --- a/DontStarveTogether/dstserver +++ b/DontStarveTogether/dstserver @@ -1,70 +1,92 @@ #!/bin/bash -# Dont Starve Together -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Dont Starve Together | 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="211016" - -#### Variables #### - -# Notification Alerts -# (on|off) - -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" +version="161026" -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" +########################## +######## Settings ######## +########################## -# Steam login -steamuser="anonymous" -steampass="" +#### Server Settings #### -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters ip="0.0.0.0" -updateonstart="off" +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | http://dont-starve-game.wikia.com/wiki/Guides/Don%E2%80%99t_Starve_Together_Dedicated_Servers # Overworld: -conf_dir DST_Overworld # Cave: -conf_dir DST_Cave -#http://dont-starve-game.wikia.com/wiki/Guides/Don%E2%80%99t_Starve_Together_Dedicated_Servers fn_parms(){ parms="-console -cluster MyDediServer -shard Master" # -console -cluster MyDediServer -shard Master } -#### Advanced Variables #### +#### LinuxGSM 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" +## 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" -# Steam -appid="343050" +## 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="343050" # Steam App Branch Select # Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta anewreignbeta" +# Example: "-beta latest_experimental" branch="" -# Server Details -servicename="dst-server" +## 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="Don't Starve Together" engine="dontstarve" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="dst-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -73,6 +95,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}" executabledir="${filesdir}/bin" executable="./dontstarve_dedicated_server_nullrenderer" @@ -82,28 +106,25 @@ servercfgdir="${HOME}/.klei/DoNotStarveTogether" servercfgfullpath="${servercfgdir}/${servercfg}" servercfgdefault="${servercfgdir}/lgsm-default.ini" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -160,8 +181,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/DoubleActionBoogaloo/cfg/lgsm-default.cfg b/DoubleActionBoogaloo/cfg/lgsm-default.cfg deleted file mode 100644 index c2b66dcbc..000000000 --- a/DoubleActionBoogaloo/cfg/lgsm-default.cfg +++ /dev/null @@ -1,15 +0,0 @@ -// Server Name -hostname "" - -// RCON Password -rcon_password "" - -// Server Password -sv_password "" - -// Server Logging -log on -sv_logbans 1 -sv_logecho 1 -sv_logfile 1 -sv_log_onefile 0 \ No newline at end of file diff --git a/DoubleActionBoogaloo/dabserver b/DoubleActionBoogaloo/dabserver index 4ee289fb8..9f75798a3 100644 --- a/DoubleActionBoogaloo/dabserver +++ b/DoubleActionBoogaloo/dabserver @@ -1,72 +1,94 @@ #!/bin/bash -# Double Action: Boogaloo -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Double Action: Boogaloo | 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="211016" - -#### Variables #### - -# Notification Alerts -# (on|off) - -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" +version="161026" -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" +########################## +######## Settings ######## +########################## -# Steam login -steamuser="anonymous" -steampass="" +#### Server Settings #### -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="da_rooftops" maxplayers="10" port="27015" sourcetvport="27020" clientport="27005" ip="0.0.0.0" -updateonstart="off" -# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" } -#### Advanced Variables #### +#### LinuxGSM 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" +## 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" -# Steam -appid="317800" +## 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="317800" # Steam App Branch Select # Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta beta" +# Example: "-beta latest_experimental" branch="" -# Server Details -servicename="dab-server" +## 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="Double Action: Boogaloo" engine="source" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="dab-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -75,6 +97,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/dab" executabledir="${filesdir}" executable="./dabds.sh" @@ -83,28 +107,25 @@ servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -161,8 +182,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/EmpiresMod/emserver b/EmpiresMod/emserver index 28ccec4e1..6c2fa539c 100644 --- a/EmpiresMod/emserver +++ b/EmpiresMod/emserver @@ -1,77 +1,78 @@ #!/bin/bash # Empires Mod -# Server Management Script -# Author: Daniel Gibbs -# Website: https://gameservermanagers.com -if [ -f ".dev-debug" ]; then - exec 5>dev-debug.log - BASH_XTRACEFD="5" - set -x -fi - -version="211016" - -#### Variables #### - -# Notification Alerts -# (on|off) - -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" - -# Steam login -steamuser="anonymous" -steampass="" - -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="emp_district" maxplayers="62" port="27015" sourcetvport="27020" clientport="27005" ip="0.0.0.0" -updateonstart="off" -# Optional: Game Server Login Token +## Optional: Game Server Login Token # GSLT can be used for running a public server. # More info: https://gameservermanagers.com/gslt gslt="" -# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game empires -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" } -#### Advanced Variables #### +#### LinuxGSM 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" +## 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" -# Steam -appid="460040" +## 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="460040" # Steam App Branch Select # Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta beta" +# Example: "-beta latest_experimental" branch="" -# Server Details -servicename="em-server" +## 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="Empires Mod" engine="source" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="em-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -80,6 +81,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/empires" executabledir="${filesdir}" executable="./srcds_run" @@ -88,28 +91,25 @@ servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -166,8 +166,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/FistfulOfFrags/cfg/lgsm-default.cfg b/FistfulOfFrags/cfg/lgsm-default.cfg deleted file mode 100644 index 39783e9d8..000000000 --- a/FistfulOfFrags/cfg/lgsm-default.cfg +++ /dev/null @@ -1,126 +0,0 @@ -// **************************************************************************** -// * -// Fistful of Frags - server.cfg * -// Version 240716 * -// * -// **************************************************************************** - -// ............................. Basic Settings ............................. // - -// Hostname for server. -hostname "" - -// RCON - remote console password. -rcon_password "" - -// Server password - for private servers. -sv_password "" - -// Contact email for server sysop. -sv_contact "email@example.com" - -// LAN Mode - If set the server will not show on the internet. -// Default: sv_lan 0 -sv_lan 0 - -// ............................... Map Cycles ............................... // -// info: There are several predefined mapcycles available that are listed below. -// You can also create your own custom mapcycle. - -// "mapcycle.txt" - All Shootout/2 Team Shootout/4 Team Shootout maps -// "mapcycle_12.txt" - All 12 slot maps for Shootout/2 Team Shootout/4 Team Shootout -// "mapcycle_32.txt" - All 32 slot maps for Shootout/2 Team Shootout/4 Team Shootout -// "mapcycle_tp.txt" - All Teamplay maps -// "mapcycle_vs.txt" - All versus mode maps -// "mapcycle_gt.txt" - All Ghost Town maps -mapcyclefile "mapcycle.txt" - -// ....................... Time Limits/Round Settings ....................... // - -// Time spend on a single map (in minutes) before switching to a new one automatically. -// Default: mp_timelimit 0 -mp_timelimit 15 - -// ........................ Game Specific Commands ........................ // -// info: any commands that only apply to this game. - -// Game Modes -// 1 = Shootout/2 Team Shootout/4 Team Shootout/Ghost Town -// 2 = Teamplay -// 3 = Break Bad -// 4 = Elimination -// 5 = Versus -fof_sv_currentmode 1 - -// Teamplay -// 0 = Free-for-all -// 1 = Team Deathmatch or Teamplay mode -mp_teamplay 0 - -// Team numbers -// 2 = Vigilantes & Desperados -// 3 = Vigilantes, Desperados & Bandidos -// 4 = Vigilantes, Desperados, Bandidos & Rangers -fof_sv_maxteams 4 - -// Friendly fire - Allows team members to injure other members of their team. -// 0 = Friendly fire disabled -// 1 = Friendly fire enabled -mp_friendlyfire 0 - -// ............................. Communication ............................. // - -// Enable communication over voice via microphone. -// Default: sv_voiceenable 1 -sv_voiceenable 1 - -// Players can hear all other players, no team restrictions. -// Default: sv_alltalk 0 -sv_alltalk 1 - -// ............................. Fast Download .............................. // -// info: Allows custom maps to be downloaded to the client. - -// Allows clients to download custom maps and textures etc. from the server at 20 kbps. -// Default: sv_allowdownload 1 -sv_allowdownload 1 - -// Allows clients to download custom maps, textures etc. from a web server with no transfer limit. -// Example: -// server location: maps/custommap.bsp -// web server location: http://example.com/custom/maps/custommap.bsp -// sv_downloadurl "http://example.com/custom" -// Default: sv_downloadurl "" -sv_downloadurl "" - -// ................................ Ban List ............................... // - -// personal banlist based on user IDs. -exec banned_user.cfg - -// personal banlist based on user IPs. -exec banned_ip.cfg - -writeid -writeip - -// ............................. Server Logging ............................. // - -//Enables logging to file, console, and udp < on | off >. -log on - -// Log server bans in the server logs. -// Default: sv_logbans 1 -sv_logbans 1 - -// Echo log information to the console. -// Default: sv_logecho 1 -sv_logecho 1 - -// Log server information in the log file. -// Default: sv_logfile 1 -sv_logfile 1 - -// Log server information to only one file. -// Default: sv_log_onefile 0 -sv_log_onefile 0 diff --git a/FistfulOfFrags/fofserver b/FistfulOfFrags/fofserver index 18d0058cf..fdc6e9665 100644 --- a/FistfulOfFrags/fofserver +++ b/FistfulOfFrags/fofserver @@ -1,72 +1,94 @@ #!/bin/bash -# Fistful Of Frags -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Fistful Of Frags | 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="211016" - -#### Variables #### - -# Notification Alerts -# (on|off) - -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" +version="161026" -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" +########################## +######## Settings ######## +########################## -# Steam login -steamuser="anonymous" -steampass="" +#### Server Settings #### -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="fof_depot" maxplayers="16" port="27015" sourcetvport="27020" clientport="27005" ip="0.0.0.0" -updateonstart="off" -# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game fof -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" } -#### Advanced Variables #### +#### LinuxGSM 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" +## 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" -# Steam -appid="295230" +## 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="295230" # Steam App Branch Select # Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta beta" +# Example: "-beta latest_experimental" branch="" -# Server Details -servicename="fof-server" +## 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="Fistful of Frags" engine="source" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="fof-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -75,6 +97,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/fof" executabledir="${filesdir}" executable="./srcds_run" @@ -83,28 +107,25 @@ servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -161,8 +182,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/GarrysMod/cfg/lgsm-default.cfg b/GarrysMod/cfg/lgsm-default.cfg deleted file mode 100644 index a1e2fd4d6..000000000 --- a/GarrysMod/cfg/lgsm-default.cfg +++ /dev/null @@ -1,86 +0,0 @@ -// Server Name -hostname "" - -// RCON Password -rcon_password "" - -// Server Password -sv_password "" - -// Server Logging -log on -sv_logbans 1 -sv_logecho 1 -sv_logfile 1 -sv_log_onefile 0 -lua_log_sv 0 - -sv_rcon_banpenalty 0 -sv_rcon_maxfailures 20 -sv_rcon_minfailures 20 -sv_rcon_minfailuretime 20 - -// Network Settings -sv_downloadurl "" -sv_loadingurl "" -net_maxfilesize 64 -sv_maxrate 40000 -sv_minrate 40000 -sv_maxupdaterate 66 -sv_minupdaterate 10 -sv_maxcmdrate 60 -sv_mincmdrate 10 - -// Server Settings -sv_airaccelerate 100 -sv_gravity 600 -sv_allow_wait_command 0 -sv_allow_voice_from_file 0 -sv_turbophysics 0 -sv_max_usercmd_future_ticks 12 -gmod_physiterations 4 -sv_client_min_interp_ratio 1 -sv_client_max_interp_ratio 2 -think_limit 20 -sv_region 0 -sv_noclipspeed 5 -sv_noclipaccelerate 5 -sv_lan 0 -sv_alltalk 1 -sv_contact youremail@changeme.com -sv_cheats 0 -sv_allowcslua 0 -sv_pausable 0 -sv_filterban 1 -sv_forcepreload 1 -sv_footsteps 1 -sv_voiceenable 1 -sv_voicecodec vaudio_speex -sv_timeout 120 -sv_deltaprint 0 -sv_allowupload 0 -sv_allowdownload 0 - -// Sandbox Settings -sbox_noclip 0 -sbox_godmode 0 -sbox_weapons 0 -sbox_playershurtplayers 0 -sbox_maxprops 100 -sbox_maxragdolls 50 -sbox_maxnpcs 10 -sbox_maxballoons 10 -sbox_maxeffects 0 -sbox_maxdynamite 0 -sbox_maxlamps 5 -sbox_maxthrusters 20 -sbox_maxwheels 20 -sbox_maxhoverballs 20 -sbox_maxvehicles 1 -sbox_maxbuttons 20 -sbox_maxemitters 0 - -// Misc Config -exec banned_user.cfg -exec banned_ip.cfg -heartbeat diff --git a/GarrysMod/gmodserver b/GarrysMod/gmodserver index bd73743ea..50622d1c6 100644 --- a/GarrysMod/gmodserver +++ b/GarrysMod/gmodserver @@ -1,46 +1,32 @@ #!/bin/bash -# Garry's Mod -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Garry's Mod | 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="211016" - -#### Variables #### - -# Notification Alerts -# (on|off) - -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" +version="161026" -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" +########################## +######## Settings ######## +########################## -# Steam login -steamuser="anonymous" -steampass="" +#### Server Settings #### -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta prerelease " -branch="" - -# Workshop Variables -# http://wiki.garrysmod.com/page/Workshop_for_Dedicated_Servers +## Workshop Parameters | http://wiki.garrysmod.com/page/Workshop_for_Dedicated_Servers workshopauth="" workshopcollectionid="" -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="gm_construct" gamemode="sandbox" maxplayers="16" @@ -49,45 +35,75 @@ sourcetvport="27020" clientport="27005" tickrate="66" ip="0.0.0.0" -updateonstart="off" -# Custom Start Parameters +## Custom Start Parameters # Default +r_hunkalloclightmaps 0, fixes a start issue on maps with many lights customparms="+r_hunkalloclightmaps 0" -# Optional: Game Server Login Token +## Optional: Game Server Login Token # GSLT can be used for running a public server. # More info: https://gameservermanagers.com/gslt gslt="" -# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game garrysmod -strictportbind -ip ${ip} -port ${port} -tickrate ${tickrate} +host_workshop_collection ${workshopcollectionid} -authkey ${workshopauth} +clientport ${clientport} +tv_port ${sourcetvport} +gamemode ${gamemode} +map ${defaultmap} +sv_setsteamaccount ${gslt} +servercfgfile ${servercfg} -maxplayers ${maxplayers} ${customparms}" } -#### Advanced Variables #### +#### LinuxGSM 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" +## 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" -# Steam -appid="4020" +## 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="4020" # Steam App Branch Select # Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta dev" +# Example: "-beta latest_experimental" branch="" -# Server Details -servicename="gmod-server" +## 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="Garry's Mod" engine="source" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="gmod-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -96,6 +112,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/garrysmod" addonsdir="${systemdir}/addons" executabledir="${filesdir}" @@ -105,28 +123,25 @@ servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -183,8 +198,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/GoldenEyeSource/cfg/lgsm-default.cfg b/GoldenEyeSource/cfg/lgsm-default.cfg deleted file mode 100644 index db1a2fdd6..000000000 --- a/GoldenEyeSource/cfg/lgsm-default.cfg +++ /dev/null @@ -1,126 +0,0 @@ -// *********** SERVER & PASSWORD INFO *************** -// Change it to 1 if you want a LAN only Server -// NOTE: You must do "changelevel [levelname]" AFTER starting the server for -// a lan-only server to begin broadcasting -sv_lan 0 - -// Change the number to the region you live in! -// 0=US East coast, 1=US West coast, 2= South America, 3=Europe, 4=Asia, 5=Australia, 6=Middle East, 7=Africa and 255=world -sv_region 0 - -// Give your server a name here -hostname "" - -// Rcon password is used to give your server orders by using console, so think of a good password -rcon_password "" - -// If you want your server to be private, fill in a password and delete the // in front of sv_password -// sv_password "mi6" - -// All talk allows clients to talk to each other via voice even if they are dead, -// spectating, or on the other team -sv_alltalk 1 - -// *********** GOLDENEYE: SOURCE SPECIFIC ********* - -// Radar will show on clients if enabled. Some gameplay scenarios -// force the radar to be visible -ge_allowradar 1 -ge_radar_showenemyteam 1 - -// Paintball mode (for fun!) -ge_paintball 0 - -// Teamplay can be overriden by the current gameplay, but -// this sets our "desired" teamplay state -ge_teamplay 0 - -// *********** GAME SETTINGS, YOU CAN CHANGE THESE THE WAY YOU LIKE IT *************** - -// Allow the use of a flashlight (discouraged for GE:S) -mp_flashlight 0 - -// Disable footstep sounds by uncommenting below -// mp_footsteps 0 - -// 1 enables falling damage, 0 disables it -mp_falldamage 1 - -// Map/match time, in minutes -mp_timelimit 15 - -// Round time, in seconds -ge_roundtime 300 - -// 1 = Forces the engine to use light physics for better server preformance -sv_turbophysics 0 - -// Server round, map, and delay times are defined in Valve.rc -// If you want these times to be reset every map change copy them -// to this file instead (Valve.rc is only executed once on server start) - - -// ********************************************************** -// *********** Load Specific Server Type Settings *********** -// ********************************************************** - -// Uncomment ONE server type to load. This takes care of all settings, map cycles, and gameplay types - -//-- Normal server, recommended settings -exec server_normal.cfg - -//-- N64 Classic Mode ( DM|YOLT|MWGG|LD|LTK, NO Jump ) -// **Use with -maxplayers 4 -//exec server_n64_classic.cfg - -//-- For server with > 24 players -//exec server_large.cfg - -//-- For servers with < 10 players -//exec server_small.cfg - -//-- Vanilla DM only w/ auto teamplay -// **Should be used in conjunction with one of the sizes above -//exec server_dm_only.cfg - -//-- Advanced game modes (LALD, LD, CTK) only -// **Should be used in conjunction with one of the sizes above -//exec server_adv_gamemode.cfg - -//-- Teamplay only! (No MWGG or LALD) -// **Should be used in conjunction with one of the sizes above -//exec server_teamplay.cfg - -//-- Tournament Use Only (Tournament DM) -// **Should be used ALONE only! -//exec server_tournament.cfg - -// Load network settings -exec server_netvalues - -// *********** server logging *********** -log on -sv_logbans 0 -sv_logecho 0 -sv_logfile 1 -sv_log_onefile 0 - - -// *********** DOWNLOAD *********** - -// Allow clients to download files -sv_allowdownload 1 - -// Allow clients to upload customizations files -sv_allowupload 1 - -// VOICE enabled, if you want VOICE disabled then change 1 to 0 -sv_voiceenable 1 - -// *********** CHEATS *********** - -// Enables the use of cheats. ex. "impulse 101" "noclip" -sv_cheats 0 - -// disable clients' ability to pause the server -sv_pausable 0 \ No newline at end of file diff --git a/GoldenEyeSource/gesserver b/GoldenEyeSource/gesserver index 12ac8a165..21d2ce14c 100644 --- a/GoldenEyeSource/gesserver +++ b/GoldenEyeSource/gesserver @@ -1,34 +1,26 @@ #!/bin/bash -# GoldenEye: Source -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: GoldenEye: Source | 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="211016" +version="161026" -#### Variables #### +########################## +######## Settings ######## +########################## -# Notification Alerts -# (on|off) - -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" - -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" - -# Steam login -steamuser="anonymous" -steampass="" +#### Server Settings #### # Start Variables defaultmap="ge_archives" @@ -37,31 +29,66 @@ port="27015" sourcetvport="27020" clientport="27005" ip="0.0.0.0" -updateonstart="off" -# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game gesource -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" } -#### Advanced Variables #### +#### 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" + +## 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" -# Github Branch Select +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="310" # Source 2007 SDK +# 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" -# Steam -appid="310" # Source 2007 SDK - -# Server Details -servicename="ges-server" +## LinuxGSM Server Details +# Do not edit gamename="GoldenEye: Source" engine="source" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="ges-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -70,6 +97,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/gesource" executabledir="${filesdir}" executable="./srcds_run" @@ -78,28 +107,25 @@ servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -156,8 +182,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/HalfLife2Deathmatch/cfg/lgsm-default.cfg b/HalfLife2Deathmatch/cfg/lgsm-default.cfg deleted file mode 100644 index c2b66dcbc..000000000 --- a/HalfLife2Deathmatch/cfg/lgsm-default.cfg +++ /dev/null @@ -1,15 +0,0 @@ -// Server Name -hostname "" - -// RCON Password -rcon_password "" - -// Server Password -sv_password "" - -// Server Logging -log on -sv_logbans 1 -sv_logecho 1 -sv_logfile 1 -sv_log_onefile 0 \ No newline at end of file diff --git a/HalfLife2Deathmatch/hl2dmserver b/HalfLife2Deathmatch/hl2dmserver index 77ef2a03d..cb048dd93 100644 --- a/HalfLife2Deathmatch/hl2dmserver +++ b/HalfLife2Deathmatch/hl2dmserver @@ -1,67 +1,94 @@ #!/bin/bash -# Half Life 2: Deathmatch -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Half Life 2: Deathmatch | 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="211016" +version="161026" -#### Variables #### +########################## +######## Settings ######## +########################## -# Notification Alerts -# (on|off) +#### Server Settings #### -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" - -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" - -# Steam login -steamuser="anonymous" -steampass="" - -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="dm_lockdown" maxplayers="16" port="27015" sourcetvport="27020" clientport="27005" ip="0.0.0.0" -updateonstart="off" -# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game hl2mp -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" } -#### Advanced Variables #### +#### 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" + +## 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" -# Github Branch Select +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="232370" +# 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" -# Steam -appid="232370" - -# Server Details -servicename="hl2dm-server" +## LinuxGSM Server Details +# Do not edit gamename="Half Life 2: Deathmatch" engine="source" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="hl2dm-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -70,6 +97,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/hl2mp" executabledir="${filesdir}" executable="./srcds_run" @@ -78,28 +107,25 @@ servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -156,8 +182,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/HalfLifeDeathmatch/cfg/lgsm-default.cfg b/HalfLifeDeathmatch/cfg/lgsm-default.cfg deleted file mode 100644 index 585afb9e2..000000000 --- a/HalfLifeDeathmatch/cfg/lgsm-default.cfg +++ /dev/null @@ -1,35 +0,0 @@ -// Server Name -hostname "" - -// RCON Password -rcon_password "" - -// Server Password -sv_password "" - -// Server Logging -log on -sv_logbans 1 -sv_logecho 1 -sv_logfile 1 -sv_log_onefile 0 - -// disable autoaim -sv_aim 0 - -// disable clients' ability to pause the server -pausable 0 - -// maximum client movement speed -sv_maxspeed 320 - -// 20 minute timelimit -mp_timelimit 20 - -// cheats off -sv_cheats 0 - -// load ban files -exec listip.cfg -exec banned.cfg - diff --git a/HalfLifeDeathmatch/hldmserver b/HalfLifeDeathmatch/hldmserver index 3285f810e..2f0ffc812 100644 --- a/HalfLifeDeathmatch/hldmserver +++ b/HalfLifeDeathmatch/hldmserver @@ -1,66 +1,93 @@ #!/bin/bash -# Half Life: Deathmatch -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Half Life: Deathmatch | 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="211016" +version="161026" -#### Variables #### +########################## +######## Settings ######## +########################## -# Notification Alerts -# (on|off) +#### Server Settings #### -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" - -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" - -# Steam login -steamuser="anonymous" -steampass="" - -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="crossfire" maxplayers="16" port="27015" clientport="27005" ip="0.0.0.0" -updateonstart="off" -# https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2 +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2 fn_parms(){ parms="-game valve -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} -maxplayers ${maxplayers}" } -#### Advanced Variables #### +#### 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" + +## 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" -# Github Branch Select +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="90" +# 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" -# Steam -appid="90" - -# Server Details -servicename="hldm-server" +## LinuxGSM Server Details +# Do not edit gamename="Half Life: Deathmatch" engine="goldsource" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="hldm-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -69,6 +96,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/valve" executabledir="${filesdir}" executable="./hlds_run" @@ -77,28 +106,25 @@ servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -155,8 +181,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/HalfLifeDeathmatchSource/cfg/lgsm-default.cfg b/HalfLifeDeathmatchSource/cfg/lgsm-default.cfg deleted file mode 100644 index c2b66dcbc..000000000 --- a/HalfLifeDeathmatchSource/cfg/lgsm-default.cfg +++ /dev/null @@ -1,15 +0,0 @@ -// Server Name -hostname "" - -// RCON Password -rcon_password "" - -// Server Password -sv_password "" - -// Server Logging -log on -sv_logbans 1 -sv_logecho 1 -sv_logfile 1 -sv_log_onefile 0 \ No newline at end of file diff --git a/HalfLifeDeathmatchSource/hldmsserver b/HalfLifeDeathmatchSource/hldmsserver index 9c1a1040e..286f76824 100644 --- a/HalfLifeDeathmatchSource/hldmsserver +++ b/HalfLifeDeathmatchSource/hldmsserver @@ -1,67 +1,94 @@ #!/bin/bash -# Half-Life Deathmatch: Source -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Half-Life Deathmatch: Source | 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="211016" +version="161026" -#### Variables #### +########################## +######## Settings ######## +########################## -# Notification Alerts -# (on|off) +#### Server Settings #### -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" - -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" - -# Steam login -steamuser="anonymous" -steampass="" - -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="crossfire" maxplayers="16" port="27015" sourcetvport="27020" clientport="27005" ip="0.0.0.0" -updateonstart="off" -# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game hl1mp -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" } -#### Advanced Variables #### +#### 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" + +## 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="255470" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" -# Github Branch Select +## Github Branch Select # Allows for the use of different function files # from a different repo and/or branch. githubuser="GameServerManagers" githubrepo="LinuxGSM" githubbranch="master" -# Steam -appid="255470" - -# Server Details -servicename="hldms-server" +## LinuxGSM Server Details +# Do not edit gamename="Half-Life Deathmatch: Source" engine="source" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="hldms-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -70,6 +97,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/hl1mp" executabledir="${filesdir}" executable="./srcds_run" @@ -78,19 +107,13 @@ servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" @@ -98,8 +121,14 @@ emaillog="${scriptlogdir}/${servicename}-email.log" scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" -##### Script ##### -# Do not edit +## 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(){ @@ -156,8 +185,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/Hurtworld/hwserver b/Hurtworld/hwserver index a72c59e05..126b8c850 100644 --- a/Hurtworld/hwserver +++ b/Hurtworld/hwserver @@ -1,86 +1,106 @@ #!/bin/bash -# Hurtworld -# Server Management Script -# Author: Daniel Gibbs, -# Contributor: UltimateByte +# Project: Game Server Managers - LinuxGSM +# Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Hurtworld | 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="211016" - -#### Variables #### - -# Notification Alerts -# (on|off) +version="161026" -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" +########################## +######## Settings ######## +########################## -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" +#### Server Settings #### -# Steam login -steamuser="anonymous" -steampass="" - -# Server settings -ip="0.0.0.0" -updateonstart="off" +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters servername="Hurtworld LGSM Server" +ip="0.0.0.0" port="12871" queryport="12881" maxplayers="20" map="" #Optional -creativemode="0" #Free Build +creativemode="0" #Free Build: creativemode="1" logfile="gamelog.txt" -# Adding admins using STEAMID64 +## Adding admins using STEAMID64 # Example : addadmin 012345678901234567; addadmin 987654321098765432 admins="" -# Advanced +## Advanced Server Start Settings # Rollback server state (remove after start command) loadsave="" # Use unstable 64 bit server executable (O/1) x64mode="0" - -# http://hurtworld.wikia.com/wiki/Hosting_A_Server +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | http://hurtworld.wikia.com/wiki/Hosting_A_Server fn_parms(){ parms="-batchmode -nographics -exec \"host ${port} ${map} ${loadsave};queryport ${queryport};maxplayers ${maxplayers};servername ${servername};creativemode ${creativemode};${admins}\" -logfile \"${logfile}\" " } -#### Advanced Variables #### +#### LinuxGSM 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" +## 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" -# Steam -appid="405100" +## 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="405100" # Steam App Branch Select # Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta devtest" +# Example: "-beta latest_experimental" branch="" -# Server Details -servicename="hurtworld-server" +## 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="Hurtworld" engine="unity3d" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="hurtworld-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname=$(basename $(readlink -f "${BASH_SOURCE[0]}")) lockselfname=".${servicename}.lock" @@ -89,6 +109,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}" executabledir="${filesdir}" if [ "${x64mode}" == "1" ]; then @@ -97,29 +119,26 @@ else executable="./Hurtworld.x86" fi -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${rootdir}/log/server" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - gamelog="${gamelogdir}/${servicename}-game.log" scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -176,8 +195,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/Insurgency/insserver b/Insurgency/insserver index 77c32f9c5..903511a4a 100644 --- a/Insurgency/insserver +++ b/Insurgency/insserver @@ -1,36 +1,28 @@ #!/bin/bash -# Insurgency -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Insurgency | 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="211016" - -#### Variables #### - -# Notification Alerts -# (on|off) +version="161026" -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" +########################## +######## Settings ######## +########################## -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" +#### Server Settings #### -# Steam login -steamuser="anonymous" -steampass="" - -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="ministry" maxplayers="16" tickrate="64" @@ -38,37 +30,67 @@ port="27015" sourcetvport="27020" clientport="27005" ip="0.0.0.0" -updateonstart="off" workshop="0" -# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game insurgency -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} -tickrate ${tickrate} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers} +sv_workshop_enabled ${workshop} -norestart" } -#### Advanced Variables #### +#### LinuxGSM 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" +## 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" -# Steam -appid="237410" +## 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="237410" # Steam App Branch Select # Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta beta" +# Example: "-beta latest_experimental" branch="" -# Server Details -servicename="ins-server" +## 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="Insurgency" engine="source" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="ins-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -77,6 +99,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/insurgency" executabledir="${filesdir}" executable="./srcds_run" @@ -85,19 +109,13 @@ servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" @@ -105,8 +123,14 @@ emaillog="${scriptlogdir}/${servicename}-email.log" scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" -##### Script ##### -# Do not edit +## 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(){ @@ -163,8 +187,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/JustCause2/cfg/config.lua b/JustCause2/cfg/config.lua deleted file mode 100644 index 1b17103c4..000000000 --- a/JustCause2/cfg/config.lua +++ /dev/null @@ -1,180 +0,0 @@ --- Welcome to the JC2-MP server configuration file! - ---[[ -SERVER OPTIONS - -Server-related options. ---]] -Server = -{ - -- The maximum number of players that can be on the server at any - -- given time. Make sure your connection and server can handle it! - -- Default value: 5000 - MaxPlayers = 5000, - -- Used to control what IP this server binds to. Unless you're a dedicated - -- game host, you don't need to worry about this. - -- Default value: "" - BindIP = "", - -- The port the server uses. - -- Default value: 7777 - BindPort = 7777, - -- The time before a player is timed out after temporarily losing - -- connection, or crashing without properly disconnecting. - -- Default value (in milliseconds): 10000 - Timeout = 10000, - - -- The name of the server, as seen by players and the server browser. - -- Default value: "JC2-MP Server" - Name = "JC2-MP Server", - -- The server description, as seen by players and the server browser. - -- Default value: "No description available" - Description = "No description available.", - -- The server password. - -- Default value: "" - Password = "", - - -- Controls whether the server announces its presence to the master server - -- and therefore to the server browser. - -- Default value: true - Announce = true, - - -- Controls how often synchronization packets are broadcast by the server - -- in milliseconds - -- Default value (in milliseconds): 180 - SyncUpdate = 180, - - -- CAUTION: Setting this variable to true unlocks a number of potentially - -- unsafe operations, which include: - -- * Native Lua packages (.dll, .so) - -- * Execution of Lua from arbitrary paths (Access to loadfile/dofile) - -- * Unbound io functions, allowing for access to the entire file-system - -- Default value: false - IKnowWhatImDoing = false -} - ---[[ -SYNCRATE OPTIONS - -Sync rate options. These values control how often synchronization -packets are sent by the clients, in milliseconds. This lets you -control how frequent the sync comes in, which may result in a -smoother or less laggy experience ---]] -SyncRates = -{ - -- Default value (in milliseconds): 75 - Vehicle = 75, - -- Default value (in milliseconds): 120 - OnFoot = 120, - -- Default value (in milliseconds): 1000 - Passenger = 1000, - -- Default value (in milliseconds): 250 - MountedGun = 250, - -- Default value (in milliseconds): 350 - StuntPosition = 350 -} - ---[[ -STREAMER OPTIONS - -Streamer-related options. The streamer is responsible for controlling the -visibility of objects (including players and vehicles) for other players. - -What this means is that if you want to extend the distance at which objects -remain visible for players, you need to change the StreamDistance. ---]] -Streamer = -{ - -- The default distance before objects are streamed out. - -- Default value (in metres): 500 - StreamDistance = 500 -} - ---[[ -VEHICLE OPTIONS - -Vehicle-related options. ---]] -Vehicle = -{ - -- The number of seconds required for a vehicle to respawn after - -- vehicle death. - -- Default value (in seconds): 10 - -- For instant respawn: 0 - -- For no respawning: nil - DeathRespawnTime = 10, - -- Controls whether to remove the vehicle if respawning is turned off, - -- and the vehicle dies. - -- Default value: false - DeathRemove = false, - - -- The number of seconds required for a vehicle to respawn after it is - -- left unoccupied. - -- Default value (in seconds): 45 - -- For instant respawn: 0 - -- For no respawning: nil - UnoccupiedRespawnTime = 45, - -- Controls whether to remove the vehicle if respawning is turned off, - -- and the vehicle is left unoccupied. - -- Default value: false - UnoccupiedRemove = false, -} - ---[[ -PLAYER OPTIONS - -Player-related options. ---]] -Player = -{ - -- The default spawn position for players. If you do not use a script - -- to handle spawns, such as the freeroam script, then this spawn position - -- will be used. - -- Default value: Vector3( -6550, 209, -3290 ) - SpawnPosition = Vector3( -6550, 209, -3290 ) -} - ---[[ -MODULE OPTIONS - -Lua module-related options. ---]] -Module = -{ - --[[ - To prevent a large number of errors building up, modules are automatically - unloaded after a certain number of errors in a given timespan. Each error - adds to a counter, which is decremented if there has not been an error - in a certain amount of time. - - This allows you to adjust the number of errors before the module is unloaded, - as well as the time since the last error for the counter to be decremented. - --]] - - -- The maximum number of errors before a module is unloaded. - -- Default value: 5 - MaxErrorCount = 5, - -- The time from the last error necessary for the error counter to be decremented. - -- Default value (in milliseconds): 500 - ErrorDecrementTime = 500 -} - ---[[ -WORLD OPTIONS - -Default settings for worlds. ---]] -World = -{ - -- The default time of day at world creation. - -- Default value (in hours): 0.0 - Time = 0.0, - - -- The increment added to the time of day each second. - -- Default value (in minutes): 1 - TimeStep = 1, - - -- The default weather severity at world creation. - -- Default value: 0 - WeatherSeverity = 0 -} diff --git a/JustCause2/jc2server b/JustCause2/jc2server index 2966d9af0..cc2a32d26 100644 --- a/JustCause2/jc2server +++ b/JustCause2/jc2server @@ -1,65 +1,88 @@ #!/bin/bash # Just Cause 2 -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: GAMENAME | 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="211016" +version="161026" -#### Variables #### +########################## +######## Settings ######## +########################## -# Notification Alerts -# (on|off) +#### Server Settings #### +# No settings available for Just Cause 2 + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care +fn_parms(){ +parms="" +} + +#### LinuxGSM Settings #### -# Email +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email emailalert="off" email="email@example.com" -#emailfrom="email@example.com" - -# Pushbullet -# https://www.pushbullet.com/#settings +emailfrom="" +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet pushbulletalert="off" pushbullettoken="accesstoken" -# Steam login -steamuser="anonymous" -steampass="" - -# Start Variables +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update updateonstart="off" -fn_parms(){ -parms="" -} +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" -#### Advanced Variables #### +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" -# 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 Advanced Settings #### -# Steam +## SteamCMD Settings +# Server appid appid="261140" - # Steam App Branch Select # Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta publicbeta" +# Example: "-beta latest_experimental" branch="" -# Server Details -servicename="jc2-server" +## 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="Just Cause 2" engine="avalanche" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="jc2-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -68,6 +91,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}" executabledir="${filesdir}" executable="./Jcmp-Server" @@ -76,28 +101,25 @@ servercfgdefault="config.lua" servercfgdir="${filesdir}" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories #gamelogdir="" # No server logs available scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -154,8 +176,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/KillingFloor/kfserver b/KillingFloor/kfserver index e4dba3329..543178b2c 100644 --- a/KillingFloor/kfserver +++ b/KillingFloor/kfserver @@ -1,39 +1,34 @@ #!/bin/bash -# Killing Floor -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Killing Floor | 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="211016" - -#### Variables #### +version="161026" -# Notification Alerts -# (on|off) +########################## +######## Settings ######## +########################## -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" - -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" +#### Server Settings #### -# Steam login +## SteamCMD Login | https://github.com/GameServerManagers/LinuxGSM/wiki/SteamCMD#steamcmd-login steamuser="username" steampass="password" -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="KF-BioticsLab.rom" ip="0.0.0.0" -updateonstart="off" fn_parms(){ parms="server ${defaultmap}?game=KFmod.KFGameType?VACSecured=true -nohomedir ini=${servercfg} log=${gamelog}" @@ -43,29 +38,59 @@ parms="server ${defaultmap}?game=KFmod.KFGameType?VACSecured=true -nohomedir ini #parms="server ${defaultmap}?Game=KFStoryGame.KFStoryGame?VACSecured=true -nohomedir ini=${servercfg} log=${gamelog}" } -#### Advanced Variables #### +#### LinuxGSM 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" +## 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" -# Steam -appid="215360" +## 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="215360" # Steam App Branch Select # Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta beta" +# Example: "-beta latest_experimental" branch="" -# Server Details -servicename="kf-server" +## 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="Killing Floor" engine="unreal2" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="kf-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -74,6 +99,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/System" executabledir="${systemdir}" executable="./ucc-bin" @@ -83,30 +110,27 @@ servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" compressedmapsdir="${rootdir}/Maps-Compressed" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${rootdir}/log/server" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - gamelog="${gamelogdir}/${servicename}-game.log" scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -gamelogdate="${gamelogdir}/${servicename}-game-$(date '+%d-%m-%Y-%H-%M-%S').log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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" +gamelogdate="${gamelogdir}/${servicename}-game-$(date '+%Y-%m-%d-%H:%M:%S').log" -##### Script ##### -# Do not edit +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -163,8 +187,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/Left4Dead/cfg/lgsm-default.cfg b/Left4Dead/cfg/lgsm-default.cfg deleted file mode 100644 index c2b66dcbc..000000000 --- a/Left4Dead/cfg/lgsm-default.cfg +++ /dev/null @@ -1,15 +0,0 @@ -// Server Name -hostname "" - -// RCON Password -rcon_password "" - -// Server Password -sv_password "" - -// Server Logging -log on -sv_logbans 1 -sv_logecho 1 -sv_logfile 1 -sv_log_onefile 0 \ No newline at end of file diff --git a/Left4Dead/l4dserver b/Left4Dead/l4dserver index 37dc67e5f..79a67cd37 100644 --- a/Left4Dead/l4dserver +++ b/Left4Dead/l4dserver @@ -1,72 +1,93 @@ #!/bin/bash -# Left 4 Dead -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# Contributor: Summit Singh Thakur +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Left 4 Dead | 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="211016" - -#### Variables #### - -# Notification Alerts -# (on|off) - -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" +version="161026" -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" +########################## +######## Settings ######## +########################## -# Steam login -steamuser="anonymous" -steampass="" +#### Server Settings #### -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="l4d_hospital01_apartment" maxplayers="8" port="27015" clientport="27005" ip="0.0.0.0" -updateonstart="off" -# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game left4dead -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} -maxplayers ${maxplayers}" } -#### Advanced Variables #### +#### LinuxGSM 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" +## 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" -# Steam -appid="222840" +## 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="222840" # Steam App Branch Select # Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta beta" +# Example: "-beta latest_experimental" branch="" -# Server Details -servicename="l4d-server" +## 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="Left 4 Dead" engine="source" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="l4d-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -75,6 +96,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/left4dead" executabledir="${filesdir}" executable="./srcds_run" @@ -83,28 +106,25 @@ servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -161,8 +181,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/Left4Dead2/cfg/lgsm-default.cfg b/Left4Dead2/cfg/lgsm-default.cfg deleted file mode 100644 index c2b66dcbc..000000000 --- a/Left4Dead2/cfg/lgsm-default.cfg +++ /dev/null @@ -1,15 +0,0 @@ -// Server Name -hostname "" - -// RCON Password -rcon_password "" - -// Server Password -sv_password "" - -// Server Logging -log on -sv_logbans 1 -sv_logecho 1 -sv_logfile 1 -sv_log_onefile 0 \ No newline at end of file diff --git a/Left4Dead2/l4d2server b/Left4Dead2/l4d2server index 8db8c6638..113e09864 100644 --- a/Left4Dead2/l4d2server +++ b/Left4Dead2/l4d2server @@ -1,71 +1,93 @@ #!/bin/bash -# Left 4 Dead 2 -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Left 4 Dead 2 | 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="211016" - -#### Variables #### - -# Notification Alerts -# (on|off) - -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" +version="161026" -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" +########################## +######## Settings ######## +########################## -# Steam login -steamuser="anonymous" -steampass="" +#### Server Settings #### -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="c5m1_waterfront" maxplayers="8" port="27015" clientport="27005" ip="0.0.0.0" -updateonstart="off" -# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game left4dead2 -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" } -#### Advanced Variables #### +#### LinuxGSM 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" +## 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" -# Steam -appid="222860" +## 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="222860" # Steam App Branch Select # Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta beta" +# Example: "-beta latest_experimental" branch="" -# Server Details -servicename="l4d2-server" +## 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="Left 4 Dead 2" engine="source" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="l4d2-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -74,6 +96,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/left4dead2" executabledir="${filesdir}" executable="./srcds_run" @@ -82,28 +106,25 @@ servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -160,8 +181,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/Minecraft/cfg/lgsm-default.ini b/Minecraft/cfg/lgsm-default.ini deleted file mode 100644 index 8e350192c..000000000 --- a/Minecraft/cfg/lgsm-default.ini +++ /dev/null @@ -1,40 +0,0 @@ -#Minecraft server properties (LGSM 210516) -#Sat Aug 20 17:30:15 CEST 2016 -allow-flight=false -allow-nether=true -announce-player-achievements=true -difficulty=1 -enable-command-block=false -enable-query=false -enable-rcon=false -force-gamemode=false -gamemode=0 -generate-structures=true -generator-settings= -hardcore=false -level-name=world -level-seed= -level-type=DEFAULT -max-build-height=256 -max-players=20 -max-tick-time=60000 -max-world-size=29999984 -motd=A Minecraft Server -network-compression-threshold=256 -online-mode=true -op-permission-level=4 -player-idle-timeout=0 -pvp=true -rcon.password= -rcon.port=25575 -resource-pack-sha1= -resource-pack= -server-ip= -server-port=25565 -snooper-enabled=true -spawn-animals=true -spawn-monsters=true -spawn-npcs=true -use-native-transport=true -view-distance=10 -white-list=false diff --git a/Minecraft/mcserver b/Minecraft/mcserver index 230da0fa3..7fd41c03b 100644 --- a/Minecraft/mcserver +++ b/Minecraft/mcserver @@ -1,60 +1,88 @@ #!/bin/bash -# Minecraft -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Minecraft | 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="211016" +version="161026" -#### Variables #### +########################## +######## Settings ######## +########################## -# Notification Alerts -# (on|off) +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +javaram="1024" # -Xmx$1024M + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care +fn_parms(){ +parms="nogui" +} +#### LinuxGSM Settings #### -# Email +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email emailalert="off" email="email@example.com" -#emailfrom="email@example.com" - -# Pushbullet -# https://www.pushbullet.com/#settings +emailfrom="" +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet pushbulletalert="off" pushbullettoken="accesstoken" -# Start Variables +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update updateonstart="off" -javaram="1024" # -Xmx$1024M -fn_parms(){ -parms="nogui" -} +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" -#### Advanced Variables #### +#### LinuxGSM Advanced Settings #### -# Github Branch Select +## Github Branch Select # Allows for the use of different function files # from a different repo and/or branch. githubuser="GameServerManagers" githubrepo="LinuxGSM" githubbranch="master" -# Server Details -servicename="mc-server" +## LinuxGSM Server Details +# Do not edit gamename="Minecraft" engine="lwjgl2" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="mc-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" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}" executabledir="${filesdir}" executable="java -Xmx${javaram}M -jar minecraft_server.jar" @@ -64,28 +92,25 @@ servercfgdir="${filesdir}" servercfgfullpath="${servercfgdir}/${servercfg}" servercfgdefault="${servercfgdir}/lgsm-default.ini" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -142,8 +167,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/Mumble/mumbleserver b/Mumble/mumbleserver index f0c18a521..99746c3a0 100644 --- a/Mumble/mumbleserver +++ b/Mumble/mumbleserver @@ -1,53 +1,78 @@ #!/bin/bash -# Mumble -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# Contributor: UltimateByte +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Mumble | 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="211016" +version="161026" -#### Variables #### +########################## +######## Settings ######## +########################## -# Notification Alerts -# (on|off) +#### Server Settings #### +# Use .ini config file for Mumble (Murmur) server. -# Email +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care +fn_parms(){ +parms="-fg -ini ${servercfgfullpath}" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email emailalert="off" email="email@example.com" -#emailfrom="email@example.com" - -# Pushbullet -# https://www.pushbullet.com/#settings +emailfrom="" +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet pushbulletalert="off" pushbullettoken="accesstoken" -# Start Variables +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update updateonstart="off" -fn_parms(){ -parms="-fg -ini ${servercfgfullpath}" -} +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" -#### Advanced Variables #### +#### LinuxGSM Advanced Settings #### -# Github Branch Select +## Github Branch Select # Allows for the use of different function files # from a different repo and/or branch. githubuser="GameServerManagers" githubrepo="LinuxGSM" githubbranch="master" -# Server Details +## LinuxGSM Server Details +# Do not edit gamename="Mumble" + +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers servicename="mumble-server" -# Directories +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -56,6 +81,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}" executabledir="${filesdir}" executable="./murmur.x86" @@ -64,28 +91,25 @@ servercfgdefault="murmur.ini" servercfgdir="${filesdir}" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${rootdir}/log" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -142,8 +166,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/NS2Combat/ns2cserver b/NS2Combat/ns2cserver index 4c9dcec4b..74127a45a 100644 --- a/NS2Combat/ns2cserver +++ b/NS2Combat/ns2cserver @@ -1,41 +1,36 @@ #!/bin/bash -# NS2: Combat -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: NS2: Combat | 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="211016" - -#### Variables #### +version="161026" -# Notification Alerts -# (on|off) +########################## +######## Settings ######## +########################## -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" - -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" +#### Server Settings #### -# Steam login +## SteamCMD Login | https://github.com/GameServerManagers/LinuxGSM/wiki/SteamCMD#steamcmd-login steamuser="username" steampass="password" -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="co_core" port="27015" maxplayers="24" ip="0.0.0.0" -updateonstart="off" servername="NS2C Server" webadminuser="admin" webadminpass="admin" @@ -46,34 +41,65 @@ password="" # that the password variable above is not left empty. # -password \"${password}\" -# http://wiki.unknownworlds.com/ns2/Dedicated_Server +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | http://wiki.unknownworlds.com/ns2/Dedicated_Server fn_parms(){ parms="-name \"${servername}\" -port ${port} -webadmin -webdomain ${ip} -webuser ${webadminuser} -webpassword \"${webadminpass}\" -webport ${webadminport} -map ${defaultmap} -limit ${maxplayers} -config_path \"${servercfgdir}\" -modstorage \"${modstoragedir}\" -mods \"${mods}\"" } -#### Advanced Variables #### +#### LinuxGSM 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" +## 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" -# Steam -appid="313900" +## 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="313900" # Steam App Branch Select # Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta beta" +# Example: "-beta latest_experimental" branch="" -# Server Details -servicename="ns2c-server" +## 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="NS2: Combat" engine="spark" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="ns2c-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -82,6 +108,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}" executabledir="${filesdir}/ia32" executable="./ns2combatserver_linux32" @@ -89,28 +117,25 @@ servercfgdir="${rootdir}/server1" servercfgfullpath="${servercfgdir}" modstoragedir="${servercfgdir}/Workshop" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -167,8 +192,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/NaturalSelection2/ns2server b/NaturalSelection2/ns2server index 48f22369f..371f8f3fd 100644 --- a/NaturalSelection2/ns2server +++ b/NaturalSelection2/ns2server @@ -1,41 +1,36 @@ #!/bin/bash -# Natural Selection 2 -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Natural Selection 2 | 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="211016" - -#### Variables #### +version="161026" -# Notification Alerts -# (on|off) +########################## +######## Settings ######## +########################## -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" - -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" +#### Server Settings #### -# Steam login +## SteamCMD Login | https://github.com/GameServerManagers/LinuxGSM/wiki/SteamCMD#steamcmd-login steamuser="username" steampass="password" -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="ns2_summit" port="27015" maxplayers="24" ip="0.0.0.0" -updateonstart="off" servername="NS2 Server" webadminuser="admin" webadminpass="admin" @@ -46,34 +41,65 @@ password="" # that the password variable above is not left empty. # -password \"${password}\" -# http://wiki.unknownworlds.com/ns2/Dedicated_Server +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | http://wiki.unknownworlds.com/ns2/Dedicated_Server fn_parms(){ parms="-name \"${servername}\" -port ${port} -webadmin -webdomain ${ip} -webuser ${webadminuser} -webpassword \"${webadminpass}\" -webport ${webadminport} -map ${defaultmap} -limit ${maxplayers} -config_path \"${servercfgdir}\" -logdir \"${gamelogdir}\" -modstorage \"${modstoragedir}\" -mods \"${mods}\"" } -#### Advanced Variables #### +#### LinuxGSM 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" +## 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" -# Steam -appid="4940" +## 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="4940" # Steam App Branch Select # Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta beta" +# Example: "-beta latest_experimental" branch="" -# Server Details -servicename="ns2-server" +## 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="Natural Selection 2" engine="spark" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="ns2-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -82,6 +108,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}" executabledir="${filesdir}" executable="./server_linux32" @@ -89,28 +117,25 @@ servercfgdir="${rootdir}/server1" servercfgfullpath="${servercfgdir}" modstoragedir="${servercfgdir}/Workshop" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -167,8 +192,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/NoMoreRoomInHell/cfg/lgsm-default.cfg b/NoMoreRoomInHell/cfg/lgsm-default.cfg deleted file mode 100644 index ba48eab5b..000000000 --- a/NoMoreRoomInHell/cfg/lgsm-default.cfg +++ /dev/null @@ -1,121 +0,0 @@ -// **************************************************************************** -// * -// No More Room in Hell - server.cfg * -// Version 100116 * -// * -// **************************************************************************** - -// ............................. Basic Settings ............................. // - -// Hostname for server. -hostname "" - -// RCON - remote console password. -rcon_password "" - -// Server password - for private servers. -sv_password "" - -// Contact email for server sysop. -sv_contact "email@example.com" - -// LAN Mode - If set the server will not show on the internet. -// Default: sv_lan 0 -sv_lan 0 - -// ............................... Map Cycles ............................... // -// info: There are several predefined mapcycles available that are listed below. -// You can also create your own custom mapcycle. - -// "mapcycle.txt" - all maps -// "mapcycle_objective.txt" - objective maps only -// "mapcycle_survival.txt" - survival maps only -// -mapcyclefile "mapcycle.txt" - -// ....................... Time Limits/Round Settings ....................... // - -// Time spend on a single map (in minutes) before switching to a new one automatically. -// Default: mp_timelimit 1 -mp_timelimit 45 - -// Maximum number of rounds to spend on a map before moving to the next one. -// Default: mp_maxrounds 2 -mp_maxrounds 2 - -// ........................ Game Specific Commands ........................ // -// info: any commands that only apply to this game. - -// Difficulty -// info: http://git.io/v35eI -// "casual" - casual difficulty. -// "classic" - classic difficulty. -sv_difficulty "classic" - -// Server tags - Tags show up on the in-game server browser. This helps -// users filter servers. -// vanilla - he server runs the default settings. -// custom - the server runs custom gameplay settings or mods. -// example: sv_tags "custom, fastdl" -sv_tags "" - -// Friendly fire - Allows team members to injure other members of their team. -// Default: mp_friendlyfire 0 -mp_friendlyfire 0 - -// ............................. Communication ............................. // - -// Enable communication over voice via microphone. -// Default: sv_voiceenable 1 -sv_voiceenable 1 - -// Players can hear all other players, no team restrictions. -// Default: sv_alltalk 0 -sv_alltalk 1 - -// ............................. Fast Download .............................. // -// info: Allows custom maps to be downloaded to the client. - -// Allows clients to download custom maps and textures etc. from the server at 20 kbps. -// Default: sv_allowdownload 1 -sv_allowdownload 1 - -// Allows clients to download custom maps, textures etc. from a web server with no transfer limit. -// Example: -// server location: maps/custommap.bsp -// web server location: http://example.com/custom/maps/custommap.bsp -// sv_downloadurl "http://example.com/custom" -// Default: sv_downloadurl "" -sv_downloadurl "" - -// ................................ Ban List ............................... // - -// personal banlist based on user IDs. -exec banned_user.cfg - -// personal banlist based on user IPs. -exec banned_ip.cfg - -writeid -writeip - -// ............................. Server Logging ............................. // - -//Enables logging to file, console, and udp < on | off >. -log on - -// Log server bans in the server logs. -// Default: sv_logbans 1 -sv_logbans 1 - -// Echo log information to the console. -// Default: sv_logecho 1 -sv_logecho 1 - -// Log server information in the log file. -// Default: sv_logfile 1 -sv_logfile 1 - -// Log server information to only one file. -// Default: sv_log_onefile 0 -sv_log_onefile 0 diff --git a/NoMoreRoomInHell/nmrihserver b/NoMoreRoomInHell/nmrihserver index e809b1fa4..449950ce0 100644 --- a/NoMoreRoomInHell/nmrihserver +++ b/NoMoreRoomInHell/nmrihserver @@ -1,77 +1,99 @@ #!/bin/bash -# No More Room in Hell -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: No More Room in Hell | 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="211016" - -#### Variables #### - -# Notification Alerts -# (on|off) - -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" +version="161026" -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" +########################## +######## Settings ######## +########################## -# Steam login -steamuser="anonymous" -steampass="" +#### Server Settings #### -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="nmo_broadway" maxplayers="8" port="27015" sourcetvport="27020" clientport="27005" ip="0.0.0.0" -updateonstart="off" -# Optional: Game Server Login Token +## Optional: Game Server Login Token # GSLT can be used for running a public server. # More info: https://gameservermanagers.com/gslt gslt="" -# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game nmrih -insecure -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +sv_setsteamaccount ${gslt} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" } -#### Advanced Variables #### +#### LinuxGSM 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" +## 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" -# Steam -appid="317670" +## 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="317670" # Steam App Branch Select # Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta beta" +# Example: "-beta latest_experimental" branch="" -# Server Details -servicename="nmrih-server" +## 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="No More Room in Hell" engine="source" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="nmrih-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -80,6 +102,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/nmrih" executabledir="${filesdir}" executable="./srcds_run" @@ -88,28 +112,25 @@ servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -166,8 +187,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/OpposingForce/cfg/lgsm-default.cfg b/OpposingForce/cfg/lgsm-default.cfg deleted file mode 100644 index 585afb9e2..000000000 --- a/OpposingForce/cfg/lgsm-default.cfg +++ /dev/null @@ -1,35 +0,0 @@ -// Server Name -hostname "" - -// RCON Password -rcon_password "" - -// Server Password -sv_password "" - -// Server Logging -log on -sv_logbans 1 -sv_logecho 1 -sv_logfile 1 -sv_log_onefile 0 - -// disable autoaim -sv_aim 0 - -// disable clients' ability to pause the server -pausable 0 - -// maximum client movement speed -sv_maxspeed 320 - -// 20 minute timelimit -mp_timelimit 20 - -// cheats off -sv_cheats 0 - -// load ban files -exec listip.cfg -exec banned.cfg - diff --git a/OpposingForce/opforserver b/OpposingForce/opforserver index 896a7370e..8b3ca6eb5 100644 --- a/OpposingForce/opforserver +++ b/OpposingForce/opforserver @@ -1,67 +1,94 @@ #!/bin/bash -# Half-Life: Opposing Force -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Half-Life: Opposing Force | 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="211016" +version="161026" -#### Variables #### +########################## +######## Settings ######## +########################## -# Notification Alerts -# (on|off) +#### Server Settings #### -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" - -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" - -# Steam login -steamuser="anonymous" -steampass="" - -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="op4_bootcamp" maxplayers="16" port="27015" clientport="27005" ip="0.0.0.0" -updateonstart="off" -# https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2 +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2 fn_parms(){ parms="-game gearbox -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} -maxplayers ${maxplayers}" } -#### Advanced Variables #### +### 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" + +## 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 #### -# Github Branch Select +## SteamCMD Settings +# Server appid +appid="90" +appidmod="gearbox" +# 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" -# Steam -appid="90" -appidmod="gearbox" - -# Server Details -servicename="opfor-server" +## LinuxGSM Server Details +# Do not edit gamename="Half-Life: Opposing Force" engine="goldsource" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="opfor-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -70,6 +97,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/gearbox" executabledir="${filesdir}" executable="./hlds_run" @@ -78,28 +107,25 @@ servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -156,8 +182,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/PiratesVikingandKnightsII/cfg/lgsm-default.cfg b/PiratesVikingandKnightsII/cfg/lgsm-default.cfg deleted file mode 100644 index 48ba5072a..000000000 --- a/PiratesVikingandKnightsII/cfg/lgsm-default.cfg +++ /dev/null @@ -1,119 +0,0 @@ -// **************************************************************************** -// * -// Pirates, Vikings, and Knights II * -// Version 100116 * -// * -// **************************************************************************** - -// ............................. Basic Settings ............................. // - -// Hostname for server. -hostname "" - -// RCON - remote console password. -rcon_password "" - -// Server password - for private servers. -sv_password "" - -// Contact email for server sysop. -sv_contact "email@example.com" - -// LAN Mode - If set the server will not show on the internet. -// Default: sv_lan 0 -sv_lan 0 - -// ............................... Map Cycles ............................... // -// You can create your own custom mapcycle. -mapcyclefile "mapcycle.txt" - -// ....................... Time Limits/Round Settings ....................... // - -// Time spend on a single map (in minutes) before switching to a new one automatically. -// Default: mp_timelimit 0 -mp_timelimit 20 - -// Wait for the end of round before changing map. -// Default: mp_timelimit_waitroundend 0 -mp_timelimit_waitroundend 1 - -// Round duration in minutes. -// Default: mp_roundtime 3 -mp_roundtime 3 - -// Round limit in number of rounds. -// Default: mp_roundlimit 0 - -// Win limit in number of rounds. -// Default: mp_winlimit 0 -mp_winlimit 0 - -// ........................ Game Specific Commands ........................ // - -// Server tags - Tags show up on the in-game server browser. This helps -// users filter servers. -// vanilla - he server runs the default settings. -// custom - the server runs custom gameplay settings or mods. -// example: sv_tags "custom, fastdl" -sv_tags "" - -// Friendly fire - Allows team members to injure other members of their team. -// Default: mp_friendlyfire 0 -mp_friendlyfire 0 - -// ............................. Communication ............................. // - -// Enable communication over voice via microphone. -// Default: sv_voiceenable 1 -sv_voiceenable 1 - -// Players can hear all other players, no team restrictions. -// Default: sv_alltalk 0 -sv_alltalk 0 - -// ............................. Fast Download .............................. // -// info: Allows custom maps to be downloaded to the client. - -// Allows clients to download custom maps and textures etc. from the server at 20 kbps. -// Default: sv_allowdownload 1 -sv_allowdownload 1 - -// Allows clients to download custom maps, textures etc. from a web server with no transfer limit. -// Example: -// server location: maps/custommap.bsp -// web server location: http://example.com/custom/maps/custommap.bsp -// sv_downloadurl "http://example.com/custom" -// Default: sv_downloadurl "" -sv_downloadurl "" - -// ................................ Ban List ............................... // - -// personal banlist based on user IDs. -exec banned_user.cfg - -// personal banlist based on user IPs. -exec banned_ip.cfg - -writeid -writeip - -// ............................. Server Logging ............................. // - -//Enables logging to file, console, and udp < on | off >. -log on - -// Log server bans in the server logs. -// Default: sv_logbans 1 -sv_logbans 1 - -// Echo log information to the console. -// Default: sv_logecho 1 -sv_logecho 1 - -// Log server information in the log file. -// Default: sv_logfile 1 -sv_logfile 1 - -// Log server information to only one file. -// Default: sv_log_onefile 0 -sv_log_onefile 0 diff --git a/PiratesVikingandKnightsII/pvkiiserver b/PiratesVikingandKnightsII/pvkiiserver index 19800bb87..5a9e44c50 100644 --- a/PiratesVikingandKnightsII/pvkiiserver +++ b/PiratesVikingandKnightsII/pvkiiserver @@ -1,72 +1,94 @@ #!/bin/bash -# No More Room in Hell -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: No More Room in Hell | 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="211016" - -#### Variables #### - -# Notification Alerts -# (on|off) - -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" +version="161026" -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" +########################## +######## Settings ######## +########################## -# Steam login -steamuser="anonymous" -steampass="" +#### Server Settings #### -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="bt_island" maxplayers="24" port="27015" sourcetvport="27020" clientport="27005" ip="0.0.0.0" -updateonstart="off" -# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game pvkii -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" } -#### Advanced Variables #### +#### LinuxGSM 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" +## 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" -# Steam -appid="17575" +## 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="17575" # Steam App Branch Select # Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta beta" +# Example: "-beta latest_experimental" branch="" -# Server Details -servicename="pvkii-server" +## 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="Pirates, Vikings, and Knights II" engine="source" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="pvkii-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -75,6 +97,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/pvkii" executabledir="${filesdir}" executable="./srcds_run" @@ -83,28 +107,25 @@ servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -161,8 +182,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/ProjectZomboid/cfg/lgsm-default.ini b/ProjectZomboid/cfg/lgsm-default.ini deleted file mode 100644 index 5ca4fe917..000000000 --- a/ProjectZomboid/cfg/lgsm-default.ini +++ /dev/null @@ -1,66 +0,0 @@ -nightlengthmodifier=1.0 -PVP=true -PauseEmpty=false -GlobalChat=true -Open=true -ServerWelcomeMessage= Welcome to Project Zomboid MP ! to chat locally press "t", to global chat press "y" or add "/all" before chatting Press /help to have a list of server commands -LogLocalChat=false -AutoCreateUserInWhiteList=false -DisplayUserName=true -SpawnPoint=0,0,0 -SafetySystem=true -ShowSafety=true -SafetyToggleTimer=100 -SafetyCooldownTimer=120 -SpawnItems= -DefaultPort=16261 -Mods= -Map=Muldraugh, KY -DoLuaChecksum=true -Public=false -PublicName=pzserver -PublicDescription= -MaxPlayers=64 -PingFrequency=10 -PingLimit=400 -HoursForLootRespawn=0 -MaxItemsForLootRespawn=4 -ConstructionPreventsLootRespawn=true -DropOffWhiteListAfterDeath=false -NoFireSpread=false -NoFire=false -AnnounceDeath=false -MinutesPerPage=1.0 -HoursForCorpseRemoval=0.0 -SaveWorldEveryMinutes=0 -PlayerSafehouse=false -AdminSafehouse=false -SafehouseAllowTrepass=true -SafehouseAllowFire=true -SafehouseAllowLoot=true -SafehouseAllowRespawn=false -SafehouseDaySurvivedToClaim=0 -SafeHouseRemovalTime=144 -AllowDestructionBySledgehammer=true -KickFastPlayers=false -RCONPort=27015 -RCONPassword= -Password= -MaxAccountsPerUser=0 -SleepAllowed=false -SleepNeeded=false -SteamPort1=8766 -SteamPort2=8767 -WorkshopItems= -SteamScoreboard=true -SteamVAC=true -UPnP=true -UPnPLeaseTime=86400 -UPnPZeroLeaseTimeFallback=true -UPnPForce=true -CoopServerLaunchTimeout=20 -CoopMasterPingTimeout=60 -server_browser_announced_ip= -UseTCPForMapDownloads=false -PlayerRespawnWithSelf=false -PlayerRespawnWithOther=false \ No newline at end of file diff --git a/ProjectZomboid/pzserver b/ProjectZomboid/pzserver index 711c406eb..e4f369929 100644 --- a/ProjectZomboid/pzserver +++ b/ProjectZomboid/pzserver @@ -1,68 +1,88 @@ #!/bin/bash -# Project Zomboid -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# Contributions: Bryce Van Dyk (SingingTree) +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Project Zomboid | 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="211016" +version="161026" -#### Variables #### +########################## +######## Settings ######## +########################## -# Notification Alerts -# (on|off) +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +adminpassword="CHANGE_ME" +ip="0.0.0.0" + +fn_parms(){ +parms="-ip ${ip} -adminpassword \"${adminpassword}\"" +} -# Email +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email emailalert="off" email="email@example.com" -#emailfrom="email@example.com" - -# Pushbullet -# https://www.pushbullet.com/#settings +emailfrom="" +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet pushbulletalert="off" pushbullettoken="accesstoken" -# Steam login -steamuser="anonymous" -steampass="" - -# Start Variables -adminpassword="CHANGE_ME" -ip="0.0.0.0" +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update updateonstart="off" -fn_parms(){ -parms="-ip ${ip} -adminpassword \"${adminpassword}\"" -} +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" -#### Advanced Variables #### +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" -# 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 Advanced Settings #### -# Steam +## SteamCMD Settings +# Server appid appid="380870" - # Steam App Branch Select # Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta iwillbackupmysave -betapassword iaccepttheconsequences" +# Example: "-beta latest_experimental" branch="" -# Server Details -servicename="pz-server" +## 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="Project Zomboid" engine="projectzomboid" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="pz-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -71,6 +91,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}" executabledir="${filesdir}" executable="./start-server.sh" @@ -79,28 +101,25 @@ servercfgdefault="server.cfg" servercfgdir="${HOME}/Zomboid/Server" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${HOME}/Zomboid/Logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -157,8 +176,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/Quake2/cfg/lgsm-default.cfg b/Quake2/cfg/lgsm-default.cfg deleted file mode 100644 index d59e3505f..000000000 --- a/Quake2/cfg/lgsm-default.cfg +++ /dev/null @@ -1,15 +0,0 @@ -set hostname "" -set rcon_password "" -set location "The Internet" -set website "https://gameservermanagers.com/" -set deathmatch 1 -set maxclients 8 -set timelimit 30 -set fraglimit 30 - -map q2dm1 - -// to advertise your server to a public "master server" add something -// like this: -//set public 1 -//setmaster master.q2servers.com diff --git a/Quake2/q2server b/Quake2/q2server index 5a7faaab7..f13373320 100644 --- a/Quake2/q2server +++ b/Quake2/q2server @@ -1,54 +1,78 @@ #!/bin/bash -# Quake 2 -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Quake 2 | 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="210516" - -#### Variables #### +version="161026" -# Notification Alerts -# (on|off) +########################## +######## Settings ######## +########################## -# Email -emailalert="off" -email="email@example.com" +#### Server Settings #### -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" - -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="q2dm1" ip="0.0.0.0" port="27910" +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters fn_parms(){ parms="+set dedicated 1 +set ip ${ip} +set port ${port} +exec ${servercfg} +set deathmatch 1 +map ${defaultmap}" } +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" -#### Advanced Variables #### +#### LinuxGSM Advanced Settings #### -# Github Branch Select +## Github Branch Select # Allows for the use of different function files # from a different repo and/or branch. githubuser="GameServerManagers" githubrepo="LinuxGSM" githubbranch="master" -# Server Details -servicename="quake2server" +## LinuxGSM Server Details +# Do not edit gamename="Quake 2" engine="idtech2" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="quake2server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -57,6 +81,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/baseq2" executabledir="${filesdir}" executable="./quake2" @@ -64,24 +90,26 @@ servercfg="${servicename}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${filesdir}/Logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -138,8 +166,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/Quake3/cfg/lgsm-default.cfg b/Quake3/cfg/lgsm-default.cfg deleted file mode 100644 index caccea760..000000000 --- a/Quake3/cfg/lgsm-default.cfg +++ /dev/null @@ -1,36 +0,0 @@ -set sv_hostname "" -set sv_maxclients 16 -set g_motd "LGSM Quake3 Server" -set g_forcerespawn 15 -set rconpassword "" -set g_gametype 0 //- Sets the type of game. 0 - Free for all, 1 - Tournament, 2 - Free for all(again), 3 - Team Deathmatch, 4 - Capture the Flag -set fraglimit 50 -set timelimit 20 - -//Here's the map-cycle. When fraglimit or timelimit is reached, the map is automatically changed. -//Otherwise it would just play the same map again. -set m1 "map q3dm1; set nextmap vstr m2" -set m2 "map q3dm2; set nextmap vstr m3" -set m3 "map q3dm3; set nextmap vstr m4" -set m4 "map q3tourney1; set nextmap vstr m5" -set m5 "map q3dm4; set nextmap vstr m6" -set m6 "map q3dm5; set nextmap vstr m7" -set m7 "map q3dm6; set nextmap vstr m8" -set m8 "map q3tourney2; set nextmap vstr m9" -set m9 "map q3dm7; set nextmap vstr m10" -set m10 "map q3dm8; set nextmap vstr m11" -set m11 "map q3dm9; set nextmap vstr m12" -set m12 "map q3tourney3; set nextmap vstr m13" -set m13 "map q3dm10; set nextmap vstr m14" -set m14 "map q3dm11; set nextmap vstr m15" -set m15 "map q3dm12; set nextmap vstr m16" -set m16 "map q3tourney4; set nextmap vstr m17" -set m17 "map q3dm13; set nextmap vstr m18" -set m18 "map q3dm14; set nextmap vstr m19" -set m19 "map q3dm15; set nextmap vstr m20" -set m20 "map q3tourney5; set nextmap vstr m21" -set m21 "map q3dm16; set nextmap vstr m22" -set m22 "map q3dm17; set nextmap vstr m23" -set m23 "map q3dm18; set nextmap vstr m24" -set m24 "map q3dm19; set nextmap vstr m25" -set m25 "map q3tourney6; set nextmap vstr m1" \ No newline at end of file diff --git a/Quake3/q3server b/Quake3/q3server index 6c2e4d844..388fa9a61 100644 --- a/Quake3/q3server +++ b/Quake3/q3server @@ -1,54 +1,79 @@ #!/bin/bash -# Quake 3: Arena -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Quake 3: Arena | 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="210516" - -#### Variables #### +version="161026" -# Notification Alerts -# (on|off) +########################## +######## Settings ######## +########################## -# Email -emailalert="off" -email="email@example.com" +#### Server Settings #### -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" - -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="q3dm17" ip="0.0.0.0" port="27960" +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters fn_parms(){ parms="+set sv_punkbuster 0 +set fs_basepath ${filesdir} +set dedicated 1 +set com_hunkMegs 32 +set net_ip ${ip} +set net_port ${port} +exec ${servercfg} +map ${defaultmap}" } -#### Advanced Variables #### +#### 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" + +## 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 #### -# Github Branch Select +## Github Branch Select # Allows for the use of different function files # from a different repo and/or branch. githubuser="GameServerManagers" githubrepo="LinuxGSM" githubbranch="master" -# Server Details -servicename="quake3-server" +## LinuxGSM Server Details +# Do not edit gamename="Quake 3: Arena" engine="idtech3" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="quake3-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -57,6 +82,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/baseq3" executabledir="${filesdir}" executable="./q3ded" @@ -64,24 +91,26 @@ servercfg="${servicename}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${filesdir}/Logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -138,8 +167,18 @@ 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/QuakeLive/cfg/lgsm-default.cfg b/QuakeLive/cfg/lgsm-default.cfg deleted file mode 100644 index 6dd87b484..000000000 --- a/QuakeLive/cfg/lgsm-default.cfg +++ /dev/null @@ -1,103 +0,0 @@ -// Servers have the ability to run multiple gametypes, known as "factories." You should not add gameplay related -// cvars in the server config: they may get overwritten by the factory. For creating your own sets of gameplay rules, -// create a file ending in ".factories" inside baseq3/scripts, and refer to "Creating custom gametypes" in the -// server_readme.txt file. - -// Be aware that factories can override any cvar, including ones specified in this config file. - -set sv_hostname "" -set sv_tags "" // Comma delimited field of server tags to show in server browser. - // Will automatically include gametype and some gameplay modifications. - // ex. "crouch slide, classic, space" -set sv_mapPoolFile "mappool.txt" // Map pool that the server will use. See default mapcycle.txt for format. - // Built in map pools: mappool.txt, mappool_ca.txt, mappool_ctf.txt, mappool_duel.txt, - // mappool_ffa.txt, mappool_race.txt, mappool_tdm.txt -set g_accessFile "access.txt" // Used to determine which 64-bit Steam IDs have admin access, or are banned. - -set sv_maxClients "16" // How many players can connect at once. -set g_password "" // Set a server-wide password, and stop all users from connecting without it. -set sv_privateClients "0" // Reserve slots that can be used with sv_privatePassword. -set sv_privatePassword "" // Password to use in conjunction with sv_privateClients. -set com_hunkMegs "60" // May need to be increased for additional players. - -// Flood protection will increment everytime the user sends a client command, ex. dropweapon, changing name, color -// model, or chatting. Set g_floodprot_maxcount to 0 to disable completely, but this will allow uncontrolled spam. -set sv_floodprotect "10" // Kick the player when they reach x commands, decreases by 1 every second -set g_floodprot_maxcount "10" // Kick the player when their userinfo flood counter reaches this level. -set g_floodprot_decay "1000" // Decrease the userinfo flood counter by 1 this often, in milliseconds. - -// Add the below values for which callvotes should be DISABLED: -// map 1 -// map_restart 2 -// nextmap 4 -// gametype 8 (ex: "/callvote map campgrounds" will be allowed, but "/callvote map campgrounds ca" will fail) -// kick 16 -// timelimit 32 -// fraglimit 64 -// shuffle 128 -// teamsize 256 -// cointoss/random 512 -// loadouts 1024 -// end-game voting 2048 -// ammo (global) 4096 -// timers (item) 8192 -set g_voteFlags "0" -set g_allowVote "1" // Turn off all votes -set g_voteDelay "0" // Delay allowing votes for x milliseconds after map load. -set g_voteLimit "0" // Limit users to x votes per map. -set g_allowVoteMidGame "0" // Don't allow callvotes once the map has started -set g_allowSpecVote "0" // Allow spectators to call votes - -set sv_warmupReadyPercentage "0.51" // Ratio of players that must be ready before the match starts. -set g_warmupDelay "15" // Wait x seconds before allowing match to start to allow all players to connect. -set g_warmupReadyDelay "0" // Force the game to start after x seconds after someone readies up. -set g_warmupReadyDelayAction "1" // Set to 1 to force players to spectator after g_warmupReady Delay, 2 to force ready up. - -set g_inactivity "0" // Kick players who are inactive for x amount of seconds. -set g_alltalk "0" // 0: Limit voice comms to teams during match - // 1: Allow all players to talk to each other always - // 2: 1+ send back your own voice to yourself for testing - -// System settings - -// Uncomment and set below to use (server.cfg will override commandline!) -// set net_strict "1" // Quit out immediately if we can't bind the IP and port. -// set net_ip "" // Which IP to bind to. Blank will bind to all interfaces. -// set net_port "55555" // Which UDP port to bind to. Blank will start at 27960 and keep going up, if net_strict is 0. -set sv_serverType "2" // 0 = Offline, 1 = LAN, 2 = Internet -set sv_master "1" // Whether the server should respond to queries. Disable this to stop server from appearing in browser. - // (This will affect the LAN browser!) - -set sv_fps "40" // Change how many frames the server runs per second. WARNING: Has not been tested extensively, and - // will have a direct impact on CPU and network usage! - -// Exit the server if idle (not running a map) for a specified time. This will allow it to automatically restart -// in the case of a game error or other problem. A value of "1" is recommended, but not default, when you are running -// the server detached from the terminal. - -set sv_idleExit "120" - -// Enable remote console, provided through ZeroMQ. See zmq_rcon.py for simple client. -// ZMQ rcon binds on a separate port from the game server, and uses TCP. It must differ from the stats port if used. -// Rcon can not be enabled or disabled after launch, nor can the IP and port change. Password can, however. - -// Uncomment and set below to use (server.cfg will override commandline!) -set zmq_rcon_enable "1" -// set zmq_rcon_ip "" -// set zmq_rcon_port "28960" -set zmq_rcon_password "" - -// Enable ZeroMQ stats socket. This will not be much use without a client listening. -// See zmq_stats_verbose.py for example connect and stats printing. -// If not specified, the stats socket will default to the same IP and port as the game server, but on TCP. - -// Uncomment and set below to use (server.cfg will override commandline!) -// set zmq_stats_enable "1" -// set zmq_stats_ip "" -// set zmq_stats_port "" -// set zmq_stats_password "" - -// The server will run serverstartup when it finishes initializing, so start a random map from the map pool. -set serverstartup "startRandomMap" -// Or, start a map of your choosing (factory is required) -// set serverstartup "map campgrounds ffa" \ No newline at end of file diff --git a/QuakeLive/qlserver b/QuakeLive/qlserver index 8eb822ad3..66ef0d890 100755 --- a/QuakeLive/qlserver +++ b/QuakeLive/qlserver @@ -1,36 +1,28 @@ #!/bin/bash -# Quake Live -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Quake Live | 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="211016" - -#### Variables #### - -# Notification Alerts -# (on|off) - -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" +version="161026" -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" +########################## +######## Settings ######## +########################## -# Steam login -steamuser="anonymous" -steampass="" +#### Server Settings #### -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters arch="x64" # x64 or x86 port="27960" rconport="28960" @@ -39,37 +31,67 @@ statsport="${port}" statspassword="CHANGE_ME" mappool='mappool.txt' ip="0.0.0.0" -updateonstart="off" -# Install/Config Guide : https://steamcommunity.com/sharedfiles/filedetails/?id=542966946 +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | Install/Config Guide : https://steamcommunity.com/sharedfiles/filedetails/?id=542966946 # Console Commands : http://www.regurge.at/ql/ fn_parms(){ parms="+set net_strict 1 +set net_ip ${ip} +set net_port ${port} +set fs_homepath ${filesdir}/${port} +set zmq_rcon_enable 1 +set zmq_rcon_port ${rconport} +set zmq_rcon_password ${rconpassword} +set zmq_stats_enable 1 +set zmq_stats_password ${statspassword} +set zmq_stats_port ${statsport} +set sv_mapPoolFile ${mappool} +exec ${servercfg}" } -#### Advanced Variables #### +#### LinuxGSM 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" +## 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" -# Steam -appid="349090" +## 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="349090" # Steam App Branch Select # Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta beta" +# Example: "-beta latest_experimental" branch="" -# Server Details -servicename="ql-server" +## 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="Quake Live" engine="idtech3_ql" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="ql-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -78,6 +100,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}" executabledir="${filesdir}" executable=$([ "${arch}" == 'x64' ] && echo "./run_server_x64.sh" || echo "./run_server_x86.sh") @@ -86,29 +110,26 @@ servercfgdefault="server.cfg" servercfgdir="${filesdir}/baseq3" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${rootdir}/log/server" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - gamelog="${gamelogdir}/${servicename}-game.log" scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -165,8 +186,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/RedOrchestra/roserver b/RedOrchestra/roserver index 788c7cb7d..1ce9e7af9 100644 --- a/RedOrchestra/roserver +++ b/RedOrchestra/roserver @@ -1,62 +1,94 @@ #!/bin/bash -# Red Orchestra: Ostfront 41-45 -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Red Orchestra: Ostfront 41-45 | 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="211016" - -#### Variables #### - -# Notification Alerts -# (on|off) +version="161026" -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" +########################## +######## Settings ######## +########################## -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" +#### Server Settings #### -# Steam login +## SteamCMD Login | https://github.com/GameServerManagers/LinuxGSM/wiki/SteamCMD#steamcmd-login steamuser="username" steampass="password" -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="RO-Arad.rom" ip="0.0.0.0" -updateonstart="off" +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care fn_parms(){ parms="server ${defaultmap}?game=ROGame.ROTeamGame?VACSecured=true -nohomedir ini=${servercfg} log=${gamelog}" } -#### Advanced Variables #### +#### 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" + +## 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="223250" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" -# Github Branch Select +## Github Branch Select # Allows for the use of different function files # from a different repo and/or branch. githubuser="GameServerManagers" githubrepo="LinuxGSM" githubbranch="master" -# Server Details -servicename="ro-server" +## LinuxGSM Server Details +# Do not edit gamename="Red Orchestra: Ostfront 41-45" engine="unreal2" -# Steam -appid="223250" +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="ro-server" + +#### Directories #### +# Edit with care -# Directories +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -64,6 +96,8 @@ lgsmdir="${rootdir}/lgsm" functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" + +## Server Specific Directories filesdir="${rootdir}/serverfiles" systemdir="${filesdir}/system" executabledir="${systemdir}" @@ -74,30 +108,31 @@ servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" compressedmapsdir="${rootdir}/Maps-Compressed" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${rootdir}/log/server" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - gamelog="${gamelogdir}/${servicename}-game.log" scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -gamelogdate="${gamelogdir}/${servicename}-game-$(date '+%d-%m-%Y-%H-%M-%S').log" + scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" -##### Script ##### -# Do not edit +## 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" +gamelogdate="${gamelogdir}/${servicename}-game-$(date '+%Y-%m-%d-%H:%M:%S').log" + +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -154,8 +189,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/Ricochet/cfg/lgsm-default.cfg b/Ricochet/cfg/lgsm-default.cfg deleted file mode 100644 index 585afb9e2..000000000 --- a/Ricochet/cfg/lgsm-default.cfg +++ /dev/null @@ -1,35 +0,0 @@ -// Server Name -hostname "" - -// RCON Password -rcon_password "" - -// Server Password -sv_password "" - -// Server Logging -log on -sv_logbans 1 -sv_logecho 1 -sv_logfile 1 -sv_log_onefile 0 - -// disable autoaim -sv_aim 0 - -// disable clients' ability to pause the server -pausable 0 - -// maximum client movement speed -sv_maxspeed 320 - -// 20 minute timelimit -mp_timelimit 20 - -// cheats off -sv_cheats 0 - -// load ban files -exec listip.cfg -exec banned.cfg - diff --git a/Ricochet/ricochetserver b/Ricochet/ricochetserver index 60a9a6b19..a38a67bd6 100644 --- a/Ricochet/ricochetserver +++ b/Ricochet/ricochetserver @@ -1,34 +1,26 @@ #!/bin/bash -# Ricochet -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Ricochet | 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="211016" - -#### Variables #### - -# Notification Alerts -# (on|off) +version="161026" -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" +########################## +######## Settings ######## +########################## -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" - -# Steam login -steamuser="anonymous" -steampass="" +#### Server Settings #### # Start Variables defaultmap="rc_arena" @@ -36,32 +28,91 @@ maxplayers="16" port="27015" clientport="27005" ip="0.0.0.0" -updateonstart="off" -# https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2 +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2 fn_parms(){ parms="-game ricochet -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} -maxplayers ${maxplayers}" } -#### Advanced Variables #### +########################## +######## Settings ######## +########################## + +#### Server Settings #### + +## SteamCMD Login | https://github.com/GameServerManagers/LinuxGSM/wiki/SteamCMD#steamcmd-login +steamuser="username" +steampass="password" + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="0.0.0.0" + +## Optional: Game Server Login Token +# GSLT can be used 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 +# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server +fn_parms(){ +parms="" +} + +#### 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" + +## 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="90" +appidmod="ricochet" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" -# Github Branch Select +## Github Branch Select # Allows for the use of different function files # from a different repo and/or branch. githubuser="GameServerManagers" githubrepo="LinuxGSM" githubbranch="master" -# Steam -appid="90" -appidmod="ricochet" - -# Server Details -servicename="ricochet-server" +## LinuxGSM Server Details +# Do not edit gamename="Ricochet" engine="goldsource" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="ricochet-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -70,6 +121,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/ricochet" executabledir="${filesdir}" executable="./hlds_run" @@ -78,28 +131,25 @@ servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -156,8 +206,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/Rust/cfg/lgsm-default.cfg b/Rust/cfg/lgsm-default.cfg deleted file mode 100644 index 225215e01..000000000 --- a/Rust/cfg/lgsm-default.cfg +++ /dev/null @@ -1,48 +0,0 @@ -# This file does not include all possible commands but it includes the most common/useful ones. -# If you want to see all possible comands, in the server console type: find . - -# Before some variables are a # symbol. This means it is disabled. Remove the # symbol to enable them. - -######################################### -# Important Settings You Need To Change # -######################################### - -# A text description of your server. For a new line add: \n -server.description "LGSM Server\nRust support : UltimateByte" - -# A URL to the image which shows up on the server details screen (dimensions are 512x256). -server.headerimage "https://github.com/GameServerManagers/LinuxGSM/raw/master/images/logo/lgsm-full-light.png" - -# The URL to your servers website. -server.url "https://gameservermanagers.com/" - -#################################### -# Optional Settings You Can Change # -#################################### - -# A value of false makes text chat location based only (players need to be close to each other). -# Values: true, false -#server.globalchat true - -# Controls if player vs player damage is allowed. If your server is primarily for building, you'll want to set this to false -# Values: true, false -#server.pve false - -# Controls fall damage. -# Values: true, false -#falldamage.enabled true - -# Helicopter bullet accuracy. Higher numbers are less accurate. -#heli.bulletAccuracy 2 - -################################################ -# Settings That Will Lag Server Is Set Too Low # -################################################ - -# Changes how often resources respawn. -#spawn.min_rate 0.1 -#spawn.max_rate 1 - -# Changes how close resources spawn to each other. -#spawn.min_density 0.1 -#spawn.max_density 1 diff --git a/Rust/rustserver b/Rust/rustserver index 19e3e4723..fb83bd11e 100644 --- a/Rust/rustserver +++ b/Rust/rustserver @@ -1,53 +1,43 @@ #!/bin/bash -# Rust -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# Contributor: UltimateByte (LGSM adaptation), Wulf (Information) +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Rust | 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="211016" - -#### Variables #### - -# Notification Alerts -# (on|off) +version="161026" -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" +########################## +######## Settings ######## +########################## -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" +#### Server Settings #### -# Steam login (not required) -steamuser="anonymous" -steampass="" - -# Server settings +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters # More settings available after install in serverfiles/server/rust-server/server.cfg servername="Rust" ip="0.0.0.0" -updateonstart="off" port="28015" rconport="28016" rconpassword="CHANGE_ME" maxplayers="50" - -# Advanced +# Advanced Start Settings seed="" # default random; range : 1 to 2147483647 ; used to change or reproduce a procedural map worldsize="3000" # default 3000; range : 1000 to 6000 ; map size in meters saveinterval="300" # Auto-save in seconds tickrate="30" # default 30; range : 15 to 100 -# https://developer.valvesoftware.com/wiki/Rust_Dedicated_Server +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | https://developer.valvesoftware.com/wiki/Rust_Dedicated_Server fn_parms(){ parms="-batchmode +server.ip ${ip} +server.port ${port} +server.tickrate ${tickrate} +server.hostname \"${servername}\" +server.identity \"${servicename}\" ${conditionalseed} +server.maxplayers ${maxplayers} +server.worldsize ${worldsize} +server.saveinterval ${saveinterval} +rcon.ip ${ip} +rcon.port ${rconport} +rcon.password \"${rconpassword}\" -logfile ${gamelogfile}" } @@ -61,29 +51,59 @@ else conditionalseed="" fi -#### Advanced Variables #### +#### LinuxGSM 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" +## 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" -# Steam -appid="258550" +## 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="258550" # Steam App Branch Select # Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta prerelease" +# Example: "-beta latest_experimental" branch="" -# Server Details -servicename="rust-server" +## 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="Rust" engine="unity3d" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="rust-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname=$(basename $(readlink -f "${BASH_SOURCE[0]}")) lockselfname=".${servicename}.lock" @@ -92,6 +112,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}" executabledir="${filesdir}" executable="./RustDedicated" @@ -101,30 +123,27 @@ servercfgdefault="server.cfg" servercfgdir="${serveridentitydir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${rootdir}/log/server" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - gamelog="${gamelogdir}/${servicename}-game.log" scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -gamelogfile="\"gamelog-$(date '+%Y-%m-%d-%H-%M-%S').log\"" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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" +gamelogfile="\"gamelog-$(date '+%Y-%m-%d-%H-%M-%S').log\"" -##### Script ##### -# Do not edit +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -181,8 +200,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/SeriousSam3BFE/cfg/lgsm-default.ini b/SeriousSam3BFE/cfg/lgsm-default.ini deleted file mode 100644 index 1bf1a3c90..000000000 --- a/SeriousSam3BFE/cfg/lgsm-default.ini +++ /dev/null @@ -1,49 +0,0 @@ --- Generated with Server GUI 3 --- http://mrag.nl/sgui3/ - --- General -rcts_strWelcomeNote = "Server RCON MOTD"; -rcts_strAdminPassword = "rconpassword"; -prj_strLogFile = ""; -net_strLocalHost = ""; -gam_idGameMode = "Cooperative"; -ser_iMaxClientBPS = 11000; -prj_iDedicatedFPS = 100; -gam_ctMaxPlayers = 12; -prj_uwPort = 27015; -prj_strMultiplayerSessionName = "Serious Sam 3 Server"; - --- Options -gam_bAllowJoinInProgress = 1; -gam_bAllowPowerupItems = 1; -gam_bAllowArmorItems = 1; -gam_bWeaponsStay = 1; -gam_bAmmoStays = 1; -gam_bArmorStays = 1; -gam_bHealthStays = 1; -gam_bAllowHealthItems = 1; -gam_bInfiniteAmmo = 0; - --- Levels -local mapList = ""; -mapList = mapList .. "Content\SeriousSam3\Levels\01_BFE\01_CairoSquare\01_CairoSquare.wld;"; -mapList = mapList .. "Content\SeriousSam3\Levels\01_BFE\02_CairoMuseum\02_CairoMuseum.wld;"; -mapList = mapList .. "Content\SeriousSam3\Levels\01_BFE\03_IbnTulun\03_IbnTulun.wld;"; -mapList = mapList .. "Content\SeriousSam3\Levels\01_BFE\04_IbnTulun\04_Medina.wld;"; -mapList = mapList .. "Content\SeriousSam3\Levels\01_BFE\05_CairoTown\05_CairoTown.wld;"; -mapList = mapList .. "Content\SeriousSam3\Levels\01_BFE\06_Pyramids\06_Pyramids.wld;"; -mapList = mapList .. "Content\SeriousSam3\Levels\01_BFE\07_Karnak1\07_Karnak1.wld;"; -mapList = mapList .. "Content\SeriousSam3\Levels\01_BFE\08_Karnak2\08_Karnak2.wld;"; -mapList = mapList .. "Content\SeriousSam3\Levels\01_BFE\09_Luxor\09_Luxor.wld;"; -mapList = mapList .. "Content\SeriousSam3\Levels\01_BFE\10_LostNubianTemples\10_LostNubianTemples.wld;"; -mapList = mapList .. "Content\SeriousSam3\Levels\01_BFE\11_Ramesseum\11_Ramesseum.wld;"; -mapList = mapList .. "Content\SeriousSam3\Levels\01_BFE\12_HatshepsutTemple\12_HatshepsutTemple.wld;"; -mapList = mapList .. "Content\SeriousSam3\Levels\02_DLC\01_Philae\01_Philae.wld;"; -mapList = mapList .. "Content\SeriousSam3\Levels\02_DLC\02_AbuSimbel\02_AbuSimbel.wld;"; -mapList = mapList .. "Content\SeriousSam3\Levels\02_DLC\03_TempleOfSethirkopshef\03_TempleOfSethirkopshef.wld;"; -prj_StrMapList = mapList; - --- Scripts - --- Custom - diff --git a/SeriousSam3BFE/help/DedicatedServer_Readme.txt b/SeriousSam3BFE/help/DedicatedServer_Readme.txt deleted file mode 100644 index cf5aa8094..000000000 --- a/SeriousSam3BFE/help/DedicatedServer_Readme.txt +++ /dev/null @@ -1,139 +0,0 @@ -Serious Engine Dedicated Server -=============================== - -1. Starting and stopping the dedicated server ---------------------------------------------- - -You can launch the dedicated server either from the Steam client's Tools tab, or by directly starting its executable file. In either case, a Steam client needs to be running on that machine, though the user logged in doesn't have to actually own the game. - -In absence of any further configuration, the server will start the first level of the Coop campaign, with all default settings, on the default port. - -The server will pause immediately after the first level is loaded, and wait for players to join, to conserve the game state. When the first player joins, the game will unpause. - -When all players disconnect, the server will restart its session from the first level again. - -To stop the server, press Ctrl+C in its console window and wait until it shuts down. - -2. Server ports ---------------- - -The server will be immediately visible on your LAN, but to make sure it is also visible on the internet, you need to open the port 27016. Note that this is only game enumeration port, as the game traffic port cannot be specified at the moment, thus this will not alleviate the need for NAT punching. I.e. it is not recommended to run a dedicated server behind a NAT/router that doesn't properly support NAT punching, or otherwise all connections to it will have very high pings. We expect the game traffic port to be specifiable in one of the future updates, but it is not currently possible. - -If you want to allow remote administration (see the section about remote administration below), you need to also forward port 27015 (TCP-only). - -You can change the port that the server is running on using the command-line option "+port". The server will use the given port for Rcon administration and the given port +1 for game enumeration (see above). So, e.g. if you use "+port 25600", game enumeration will work on port 25601 and rcon on port 25600. When game traffic specification becomes possible, it will be on port 25600 in the example, but this is currently not supported. - -You can change the network interface that the server will bind to using the command-line option "+ip". This is used both fr Rcon administration and for game enumeration. When game traffic specification becomes possible, it will also use this, but this is currently not supported (game traffic chooses an interface automatically). - -3. Command line ---------------- - -Command line options can be used to modify any cvar using this format: - -SamHD_DedicatedServer.exe +cvarname1 cvarvalue1 +cvarname2 cvarvalue2 ... +cvarnameN cvarvalueN - -Quotes are needed around values that contain spaces. Cvar names in the command line can be either short names (e.g. +level "Path/Level") where available, or long names (+gam_strLevel "Path/Level"). - -4. Configuration scripts ------------------------- - -When starting, in addition to the command line option, the server will read configuration parameters from the following sources (in this order): - * Content/SeriousSamHD/Config/dedicatedserver.cfg, - * eventual custom script specified via the +exec command line option, - * eventual per-session script specified via the +gameoptions command line option. -The first two are read once on boot, the last one is read on each session start and restart. (When all player's disconnect, the server will load this again before starting the first level.) - -All of those scripts are fully-featured console scripts, i.e. they use the Lua programming language, so you can put ifs, functions and other programming constructs in them. For a full syntax description and other documentation regarding the Lua programming language, please visit: http://www.lua.org . - -Dedicated server does not load or save any .ini files. - -5. Most relevant command line options and cvars ------------------------------------------------ -(long name shown in parentheses) - * +gamemode (gam_idGameMode) - Valid values are: - (cooperative group) - Cooperative (this is the default) - CooperativeCoinOp - TeamSurvival - (versus group) - BeastHunt - CaptureTheFlag - Deathmatch - InstantKill - LastManStanding - LastTeamStanding - MyBurden - TeamBeastHunt - TeamDeathmatch - Note that players can vote to change the game mode, but they cannot switch a server from Cooperative modes to Versus modes or vice versa. - IMPORTANT: Changing this option resets all other gam_ options to defaults for that game mode. If you are also customizing other gam_ options from a script or via Rcon, make sure you change gam_idGameMode first, and then change all others! - * +level (gam_strLevel) - Specifies which level to start. Path is relative to the folder the game was installed in. If not specified, the server will start the default first level. - * +maxplayers (gam_ctMaxPlayers) - Max number of players in the session. Cannot be higher than 16. - * +port (prj_uwPort) - Specifies the port number to start the server on. Default is 27015. - * +ip (net_strLocalHost) - Specifies the network interface to start the server on. Default is empty, meaning automatic. - * +fps (prj_iDedicatedFPS) - Specifies the framerate the dedicated server will run in (min 10). - * +exec (prj_strExecCfg) - Specifies the configuration file to execute when the server first starts. - * +gameoptions (prj_strOptionsScript) - Specifies the game options script to execute. It is executed whenever the server (re)starts the first level. - * +sessionname (prj_strMultiplayerSessionName) - Session name that will be displayed in the server browser. If you don't set this, current username from Windows will be shown. - * +rconpass (rcts_strAdminPassword) - Password used to connect to the server via Rcon (see "Remote administration" above). - * +logfile (prj_strLogFile) - Save the DedicatedServer.log into a different file. Useful if you want to run multiple servers from the same installation. - -NOTE: You can use any of the standard game options like gam_bInifiniteAmmo that customize the gameplay, but note that gam_bCustomizeDifficulty is required for them to take effect! - -6. Some other useful console variables and functions ----------------------------------------------------- - - * gamListPlayers() - print the list of all players to the console in format: 'playerindex: playername' - * gamKickByName() - kick the client with the given player name out of the game - * gamKickByIndex() - kick the client with the given index out of the game - * gamBanByName() - ban the client with the given player name out of the game - * gamBanByIndex() - ban the client with the given index out of the game - - * gamRestartServer() - restarts the dedicated server (disconnects all players) so any changes to game settings or other server options can take effect - * gamRestartGame() - restart game with new session params without disconnecting players - * samRestartMap() - restart the current map (without disconnecting all players) so any changes to game difficulty and similar options can take effect - * gamStop() - stops the current game - * gamStart() - start game with new session params without disconnecting players - * samVotePass() - force the current vote to pass - * samVoteFail() - force the current vote to fail - - * ser_iMaxClientBPS - limit the bandwidth used by each individual client on the server. This caps the cli_iMaxBPS on the server side. - * prj_strMapList - Semicolon separated list of maps used for multiplayer map rotation. - * prj_strMapListFile - Path to the file containing a list of maps used for multiplayer map rotation. - * prj_strDefaultMapDir - Default map folder to use for the map list (specified either by prj_strMapList or prj_strMapListFile). To make it posible to specify map names in a short form, if a '#' prefix is used in a map path, the '#' char will be replaced by the value of this cvar. - -All other cvars and cfuncs can be used, most notable are cvars with "gam_" prefix which can be used to setup difficulty options and similar. To get the list of those or more details about them, use the game client's console with its autocompletion and help. - -7. Remote administration (RCon) -------------------------------- - -Remote administration of Serious Sam HD dedicated servers is implemented via the Telnet protocol. Use any telnet client (e.g. telnet.exe) to connect to the IP and port the server is running on (default is 27015). - -Example: -C:\> telnet my.server.ip 27015 - -(*) NOTE: On Vista and Win7, the telnet command is not installed by default. You need to enable it using the "Turn Windows features on or off" section of the Control Panel. - -You need to specify the rcon password (using the +rconpass "password" command-line option) when starting the server, otherwise it won't allow you to connect to it via Rcon. Also make sure the appropriate port is open, as explained above. - -After entering the correct rcon password, the telnet client will behave similarly to the in-game console (except that SHIFT+TAB combo doesn't work). Additionally you can type a question mark ("?"), followed by a cvar or cfunc to get the help about it. - -8. Example configuration script -------------------------------- - -Here's an example config script. Put that in a text file named "server.cfg" in the root of the game installation (parent of Bin/), and specify "+exec server.cfg" in the command line (without quotes). - ---------8<----- cut here ----------- - -rconpass = "SuperSecretPassword"; -- MAKE SURE YOU CHANGE THIS!!!! -sessionname = "My Server Name" -- set this to the name of your server - -gam_ctMaxPlayers = 8 -gamemode="Deathmatch" -gam_bAutoCycleMaps = 1 - -local prj_strMapList = { - "#SunPalace.wld", -- put a list of map file names for rotation here -} - ---------8<------cut here ---------- \ No newline at end of file diff --git a/SeriousSam3BFE/ss3sserver b/SeriousSam3BFE/ss3sserver index 852c6a518..39f10db0c 100644 --- a/SeriousSam3BFE/ss3sserver +++ b/SeriousSam3BFE/ss3sserver @@ -1,67 +1,89 @@ #!/bin/bash -# Serious Sam 3: BFE -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Sam 3: BFE | 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="211016" +version="161026" -#### Variables #### +########################## +######## Settings ######## +########################## -# Notification Alerts -# (on|off) +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="0.0.0.0" -# Email +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | https://raw.githubusercontent.com/GameServerManagers/Game-Server-Configs/master/SeriousSam3BFE/help/DedicatedServer_Readme.txt +fn_parms(){ +parms="+ip ${ip} +logfile ${gamelog} +exec ${servercfgfullpath}" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email emailalert="off" email="email@example.com" -#emailfrom="email@example.com" - -# Pushbullet -# https://www.pushbullet.com/#settings +emailfrom="" +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet pushbulletalert="off" pushbullettoken="accesstoken" -# Steam login -steamuser="anonymous" -steampass="" - -# Start Variables -ip="0.0.0.0" +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update updateonstart="off" -# https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/master/SeriousSam3BFE/help/DedicatedServer_Readme.txt -fn_parms(){ -parms="+ip ${ip} +logfile ${gamelog} +exec ${servercfgfullpath}" -} +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" -#### Advanced Variables #### +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" -# 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 Advanced Settings #### -# Steam +## SteamCMD Settings +# Server appid appid="41080" - # Steam App Branch Select # Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta publicbeta" +# Example: "-beta latest_experimental" branch="" -# Server Details -servicename="ss3-server" +## 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="Serious Sam 3: BFE" engine="seriousengine35" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="ss3-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -70,6 +92,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/Bin" executable="./runSam3_DedicatedServer.sh" executabledir="${systemdir}" @@ -78,30 +102,27 @@ servercfgdefault="server.ini" servercfgdir="${filesdir}/Content/SeriousSam3/Config" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${rootdir}/log/server" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - gamelog="${gamelogdir}/${servicename}-game.log" scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -gamelogdate="${gamelogdir}/${servicename}-game-$(date '+%d-%m-%Y-%H-%M-%S').log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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" +gamelogdate="${gamelogdir}/${servicename}-game-$(date '+%Y-%m-%d-%H:%M:%S').log" -##### Script ##### -# Do not edit +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -158,8 +179,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/Starbound/cfg/lgsm-default.config b/Starbound/cfg/lgsm-default.config deleted file mode 100644 index 275898d2b..000000000 --- a/Starbound/cfg/lgsm-default.config +++ /dev/null @@ -1,49 +0,0 @@ -{ - "allowAdminCommands" : true, - "allowAdminCommandsFromAnyone" : false, - "allowAnonymousConnections" : true, - "allowAssetsMismatch" : true, - "anonymousConnectionsAreAdmin" : false, - "bannedIPs" : [], - "bannedUuids" : [], - "checkAssetsDigest" : false, - "clearPlayerFiles" : false, - "clearUniverseFiles" : false, - "clientIPJoinable" : false, - "clientP2PJoinable" : true, - "configurationVersion" : { - "basic" : 1, - "server" : 4 - }, - "crafting" : { - "filterHaveMaterials" : false - }, - "gameServerBind" : "::", - "gameServerPort" : 21025, - "interactiveHighlight" : true, - "inventory" : { - "pickupToActionBar" : true - }, - "maxPlayers" : 8, - "maxTeamSize" : 4, - "playerBackupFileCount" : 3, - "queryServerBind" : "::", - "queryServerPort" : 21025, - "rconServerBind" : "::", - "rconServerPassword" : "", - "rconServerPort" : 21026, - "rconServerTimeout" : 1000, - "runQueryServer" : false, - "runRconServer" : false, - "safeScripts" : true, - "scriptInstructionLimit" : 10000000, - "scriptInstructionMeasureInterval" : 10000, - "scriptProfilingEnabled" : false, - "scriptRecursionLimit" : 100, - "serverFidelity" : "automatic", - "serverName" : "", - "serverOverrideAssetsDigest" : null, - "serverUsers" : { - }, - "tutorialMessages" : true -} \ No newline at end of file diff --git a/Starbound/sbserver b/Starbound/sbserver index cbe75f260..b569f0a85 100644 --- a/Starbound/sbserver +++ b/Starbound/sbserver @@ -1,66 +1,93 @@ #!/bin/bash -# Starbound -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Starbound | 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="211016" - -#### Variables #### +version="161026" -# Notification Alerts -# (on|off) +########################## +######## Settings ######## +########################## -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" - -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" +#### Server Settings #### -# Steam login +## SteamCMD Login | https://github.com/GameServerManagers/LinuxGSM/wiki/SteamCMD#steamcmd-login steamuser="username" steampass="password" -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters ip="0.0.0.0" -updateonstart="off" +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care fn_parms(){ parms="" } -#### Advanced Variables #### +#### LinuxGSM 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" +## 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" -# Steam -appid="211820" +## 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="211820" # Steam App Branch Select # Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta beta" +# Example: "-beta latest_experimental" branch="" -# Server Details -servicename="sb-server" +## 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="Starbound" engine="starbound" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="sb-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -69,6 +96,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}" executabledir="${filesdir}/linux" executable="./starbound_server" @@ -77,28 +106,25 @@ servercfgdefault="starbound_server.config" servercfgdir="${filesdir}/storage" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${filesdir}/storage" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -155,8 +181,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/SvenCoop/cfg/lgsm-default.cfg b/SvenCoop/cfg/lgsm-default.cfg deleted file mode 100644 index 6bc0822bc..000000000 --- a/SvenCoop/cfg/lgsm-default.cfg +++ /dev/null @@ -1,36 +0,0 @@ -//---------------------------------------------- -// Sven Co-op v5.0 Default Server CFG -//---------------------------------------------- - -//---------------------------------------------- -// See server_example.cfg for more available -// commands and settings. -//---------------------------------------------- - -hostname "" -log "on" - -rcon_password "" -//sv_password "" - -sys_ticrate 100 -deathmatch 1 -decalfrequency 30 -hpk_maxsize 2 -pausable 0 - -sv_aim 0 -sv_allowdownload 1 -sv_allowupload 1 -sv_region 255 -sv_send_resources 1 -sv_voicecodec "voice_speex" -sv_voiceenable 1 -sv_voicequality 5 - -mp_telefrag 1 -mp_timelimit 99 -mp_weaponstay 1 - -exec banned.cfg -exec listip.cfg \ No newline at end of file diff --git a/SvenCoop/svenserver b/SvenCoop/svenserver index 2e9257204..449c66b47 100644 --- a/SvenCoop/svenserver +++ b/SvenCoop/svenserver @@ -1,71 +1,93 @@ #!/bin/bash -# Sven Co-op -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Sven Co-op | 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="211016" - -#### Variables #### - -# Notification Alerts -# (on|off) - -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" +version="161026" -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" +########################## +######## Settings ######## +########################## -# Steam login -steamuser="anonymous" -steampass="" +#### Server Settings #### -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="svencoop1" maxplayers="16" port="27015" clientport="27005" ip="0.0.0.0" -updateonstart="off" -# https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2 +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2 fn_parms(){ parms="-game svencoop -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} -maxplayers ${maxplayers}" } -#### Advanced Variables #### +#### LinuxGSM 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" +## 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" -# Steam -appid="276060" +## 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="276060" # Steam App Branch Select # Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta release_candidate_public" +# Example: "-beta latest_experimental" branch="" -# Server Details -servicename="svencoop-server" +## 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="Sven Co-op" engine="goldsource" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="svencoop-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -74,6 +96,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/svencoop" executabledir="${filesdir}" executable="./svends_run" @@ -82,28 +106,25 @@ servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -160,8 +181,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/TeamFortress2/cfg/lgsm-default.cfg b/TeamFortress2/cfg/lgsm-default.cfg deleted file mode 100644 index c2b66dcbc..000000000 --- a/TeamFortress2/cfg/lgsm-default.cfg +++ /dev/null @@ -1,15 +0,0 @@ -// Server Name -hostname "" - -// RCON Password -rcon_password "" - -// Server Password -sv_password "" - -// Server Logging -log on -sv_logbans 1 -sv_logecho 1 -sv_logfile 1 -sv_log_onefile 0 \ No newline at end of file diff --git a/TeamFortress2/tf2server b/TeamFortress2/tf2server index 5eb44c96f..bf9519a6e 100644 --- a/TeamFortress2/tf2server +++ b/TeamFortress2/tf2server @@ -1,77 +1,97 @@ #!/bin/bash -# Team Fortress 2 -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Team Fortress 2 | 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="211016" - -#### Variables #### - -# Notification Alerts -# (on|off) - -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" +version="161026" -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" +########################## +######## Settings ######## +########################## -# Steam login -steamuser="anonymous" -steampass="" +#### Server Settings #### -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="cp_badlands" maxplayers="16" port="27015" sourcetvport="27020" clientport="27005" ip="0.0.0.0" -updateonstart="off" -# Optional: Game Server Login Token +## Optional: Game Server Login Token # GSLT can be used for running a public server. # More info: https://gameservermanagers.com/gslt gslt="" -# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game tf -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +sv_setsteamaccount ${gslt} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" } -#### Advanced Variables #### +## 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" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" -# Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" -# Steam -appid="232250" +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="232250" # Steam App Branch Select # Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta beta" +# Example: "-beta latest_experimental" branch="" -# Server Details -servicename="tf2-server" +## 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="Team Fortress 2" engine="source" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="tf2-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -80,6 +100,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/tf" executabledir="${filesdir}" executable="./srcds_run" @@ -88,28 +110,25 @@ servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -166,8 +185,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/TeamFortressClassic/cfg/lgsm-default.cfg b/TeamFortressClassic/cfg/lgsm-default.cfg deleted file mode 100644 index ceb8f9374..000000000 --- a/TeamFortressClassic/cfg/lgsm-default.cfg +++ /dev/null @@ -1,38 +0,0 @@ -// Server Name -hostname "" - -// RCON Password -rcon_password "" - -// Server Password -sv_password "" - -// Server Logging -log on -sv_logbans 1 -sv_logecho 1 -sv_logfile 1 -sv_log_onefile 0 - -// disable autoaim -sv_aim 0 - -// disable clients' ability to pause the server -pausable 0 - -// maximum client movement speed -sv_maxspeed 320 - -// 20 minute timelimit -mp_timelimit 20 - -// cheats off -sv_cheats 0 - -// load ban files -exec listip.cfg -exec banned.cfg - - - - diff --git a/TeamFortressClassic/tfcserver b/TeamFortressClassic/tfcserver index 60b521a4f..4ced5d30a 100644 --- a/TeamFortressClassic/tfcserver +++ b/TeamFortressClassic/tfcserver @@ -1,67 +1,94 @@ #!/bin/bash -# Team Fortress Classic -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Team Fortress Classic | 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="211016" +version="161026" -#### Variables #### +########################## +######## Settings ######## +########################## -# Notification Alerts -# (on|off) +#### Server Settings #### -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" - -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" - -# Steam login -steamuser="anonymous" -steampass="" - -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="dustbowl" maxplayers="16" port="27015" clientport="27005" ip="0.0.0.0" -updateonstart="off" -# https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2 +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2 fn_parms(){ parms="-game tfc -strictportbind _ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} -maxplayers ${maxplayers}" } -#### Advanced Variables #### +#### 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" + +## 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 #### -# Github Branch Select +## SteamCMD Settings +# Server appid +appid="90" +appidmod="tfc" +# 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" -# Steam -appid="90" -appidmod="tfc" - -# Server Details -servicename="tfc-server" +## LinuxGSM Server Details +# Do not edit gamename="Team Fortress Classic" engine="goldsource" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="tfc-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -70,6 +97,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/tfc" executabledir="${filesdir}" executable="./hlds_run" @@ -78,28 +107,25 @@ servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -156,8 +182,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/TeamSpeak3/cfg/lgsm-default.ini b/TeamSpeak3/cfg/lgsm-default.ini deleted file mode 100644 index 0fca88d4d..000000000 --- a/TeamSpeak3/cfg/lgsm-default.ini +++ /dev/null @@ -1,20 +0,0 @@ -machine_id= -default_voice_port=9987 -voice_ip=0.0.0.0, :: -licensepath= -filetransfer_port=30033 -filetransfer_ip=0.0.0.0, :: -query_port=10011 -query_ip=0.0.0.0, :: -query_ip_whitelist=query_ip_whitelist.txt -query_ip_blacklist=query_ip_blacklist.txt -dbplugin=ts3db_sqlite3 -dbpluginparameter= -dbsqlpath=sql/ -dbsqlcreatepath=create_sqlite/ -dbconnections=10 -logpath=logs -logquerycommands=0 -dbclientkeepdays=30 -logappend=0 -query_skipbruteforcecheck=0 diff --git a/TeamSpeak3/ts3server b/TeamSpeak3/ts3server index 5b7180515..5903b184a 100644 --- a/TeamSpeak3/ts3server +++ b/TeamSpeak3/ts3server @@ -1,40 +1,73 @@ #!/bin/bash -# TeamSpeak 3 -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: TeamSpeak 3 | 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="211016" +version="161026" -#### Variables #### +########################## +######## Settings ######## +########################## -# Notification Alerts -# (on|off) +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +# Edit serverfiles/ts3-server.ini after installation + +#### LinuxGSM Settings #### -# Email +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email emailalert="off" email="email@example.com" -#emailfrom="email@example.com" - -# Pushbullet -# https://www.pushbullet.com/#settings +emailfrom="" +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet pushbulletalert="off" pushbullettoken="accesstoken" -# Start Variables +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update updateonstart="off" -# Server Details +## 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 #### + +## 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="TeamSpeak 3" servername="TeamSpeak 3 Server" + +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers servicename="ts3-server" -# Directories +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -43,6 +76,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}" executabledir="${filesdir}" executable="./ts3server_startscript.sh" @@ -51,31 +86,22 @@ servercfgdefault="ts3server.ini" servercfgdir="${filesdir}" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${filesdir}/logs" scriptlogdir="${rootdir}/log/script" - scriptlog="${scriptlogdir}/${servicename}-script.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" - -# Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" +## Logs Naming +scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -##### Script ##### -# Do not edit +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -132,8 +158,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/Teeworlds/cfg/ctf.cfg b/Teeworlds/cfg/ctf.cfg deleted file mode 100644 index a92b1a494..000000000 --- a/Teeworlds/cfg/ctf.cfg +++ /dev/null @@ -1,7 +0,0 @@ -sv_gametype ctf -sv_powerups 1 -sv_scorelimit 500 -sv_spectator_slots 0 -sv_timelimit 0 -sv_tournament_mode 0 -sv_map_reload 1 \ No newline at end of file diff --git a/Teeworlds/cfg/dm.cfg b/Teeworlds/cfg/dm.cfg deleted file mode 100644 index 426386d1d..000000000 --- a/Teeworlds/cfg/dm.cfg +++ /dev/null @@ -1,7 +0,0 @@ -sv_gametype dm -sv_powerups 1 -sv_scorelimit 20 -sv_spectator_slots 0 -sv_timelimit 0 -sv_tournament_mode 0 -sv_map_reload 1 \ No newline at end of file diff --git a/Teeworlds/cfg/duel.cfg b/Teeworlds/cfg/duel.cfg deleted file mode 100644 index b70e632a2..000000000 --- a/Teeworlds/cfg/duel.cfg +++ /dev/null @@ -1,7 +0,0 @@ -sv_gametype tdm -sv_powerups 0 -sv_scorelimit 10 -sv_spectator_slots 10 -sv_timelimit 5 -sv_tournament_mode 1 -sv_map_reload 1 \ No newline at end of file diff --git a/Teeworlds/cfg/lgsm-default.cfg b/Teeworlds/cfg/lgsm-default.cfg deleted file mode 100644 index efefdf149..000000000 --- a/Teeworlds/cfg/lgsm-default.cfg +++ /dev/null @@ -1,26 +0,0 @@ -sv_name "" -sv_rcon_password "" -password "" -sv_max_clients 12 -sv_port 8303 -sv_register 1 -sv_spamprotection 0 -sv_vote_map 1 -sv_warmup 10 -logfile "" -addvote restart 10 -addvote exec dm.cfg -addvote exec ctf.cfg -addvote exec duel.cfg -addvote exec tdm.cfg -addvote "change_map ctf1" -addvote "change_map ctf2" -addvote "change_map ctf3" -addvote "change_map ctf4" -addvote "change_map ctf5" -addvote "change_map dm1" -addvote "change_map dm2" -addvote "change_map dm6" -addvote "change_map dm7" -addvote "change_map dm8" -addvote "change_map dm9" \ No newline at end of file diff --git a/Teeworlds/cfg/tdm.cfg b/Teeworlds/cfg/tdm.cfg deleted file mode 100644 index 4cde3cd33..000000000 --- a/Teeworlds/cfg/tdm.cfg +++ /dev/null @@ -1,14 +0,0 @@ -// **************************************************************************** -// * -// Teeworlds - tdm.cfg * -// Version 281015 * -// * -// **************************************************************************** - -sv_gametype tdm -sv_powerups 1 -sv_scorelimit 50 -sv_spectator_slots 0 -sv_timelimit 0 -sv_tournament_mode 0 -sv_map_reload 1 \ No newline at end of file diff --git a/Teeworlds/twserver b/Teeworlds/twserver index 7ad17233a..37f846f9f 100644 --- a/Teeworlds/twserver +++ b/Teeworlds/twserver @@ -1,62 +1,93 @@ #!/bin/bash -# Teeworlds -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# Contributor: Bryce Van Dyk (SingingTree) +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Teeworlds | 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="211016" - -#### Variables #### - -# Notification Alerts -# (on|off) +version="161026" -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" +########################## +######## Settings ######## +########################## -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" +#### Server Settings #### -# Steam login +## SteamCMD Login | https://github.com/GameServerManagers/LinuxGSM/wiki/SteamCMD#steamcmd-login steamuser="username" steampass="password" -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters ip="0.0.0.0" -updateonstart="off" +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care fn_parms(){ parms="-f ${servercfgfullpath}" } -#### Advanced Variables #### +#### 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" + +## 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="380840" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" -# Github Branch Select +## Github Branch Select # Allows for the use of different function files # from a different repo and/or branch. githubuser="GameServerManagers" githubrepo="LinuxGSM" githubbranch="master" -# Steam -appid="380840" - -# Server Details -servicename="tw-server" +## LinuxGSM Server Details +# Do not edit gamename="Teeworlds" engine="teeworlds" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="tw-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -65,6 +96,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}" executabledir="${filesdir}" executable="./teeworlds_srv" @@ -73,29 +106,26 @@ servercfgdefault="server.cfg" servercfgdir="${filesdir}" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${rootdir}/log/server" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - gamelog="${gamelogdir}/${servicename}-game.log" scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -152,8 +182,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/Terraria/cfg/lgsm-default.txt b/Terraria/cfg/lgsm-default.txt deleted file mode 100644 index 9a907e61d..000000000 --- a/Terraria/cfg/lgsm-default.txt +++ /dev/null @@ -1,68 +0,0 @@ -#this is an example config file for TerrariaServer.exe -#use the command 'TerrariaServer.exe -config serverconfig.txt' to use this configuration or run start-server.bat -#please report crashes by emailing crashlog.txt to support@terraria.org - -#the following is a list of available command line parameters: - -#-config Specifies the configuration file to use. -#-port Specifies the port to listen on. -#-players / -maxplayers Sets the max number of players -#-pass / -password Sets the server password -#-world Load a world and automatically start the server. -#-autocreate <#> Creates a world if none is found in the path specified by -world. World size is specified by: 1(small), 2(medium), and 3(large). -#-banlist Specifies the location of the banlist. Defaults to "banlist.txt" in the working directory. -#-worldname Sets the name of the world when using -autocreate. -#-secure Adds addition cheat protection to the server. -#-noupnp Disables automatic port forwarding -#-steam Enables Steam Support -#-lobby or Allows friends to join the server or sets it to private if Steam is enabled -#-ip Sets the IP address for the server to listen on -#-forcepriority Sets the process priority for this task. If this is used the "priority" setting below will be ignored. - -#remove the # in front of commands to enable them. - -#Load a world and automatically start the server. -world=~/.local/share/Terraria/Worlds/world1.wld - -#Creates a new world if none is found. World size is specified by: 1(small), 2(medium), and 3(large). -autocreate=1 - -#Sets the name of the world when using autocreate -worldname=Terraria - -#Sets the difficulty of the world when using autocreate 0(normal), 1(expert) -difficulty=0 - -#Sets the max number of players allowed on a server. Value must be between 1 and 255 -maxplayers=8 - -#Set the port number -port=7777 - -#Set the server password -password=p@55w0rd - -#Set the message of the day -motd=Please don’t cut the purple trees! - -#Sets the folder where world files will be stored -worldpath=~/.local/share/Terraria/Worlds/ - -#The location of the banlist. Defaults to "banlist.txt" in the working directory. -banlist=banlist.txt - -#Adds addition cheat protection. -secure=1 - -#Sets the server language 1:English, 2:German, 3:Italian, 4:French, 5:Spanish -lang=1 - -#Automatically forward ports with uPNP -#upnp=1 - -#Reduces enemy skipping but increases bandwidth usage. The lower the number the less skipping will happen, but more data is sent. 0 is off. -#npcstream=60 - -#Default system priority 0:Realtime, 1:High, 2:AboveNormal, 3:Normal, 4:BelowNormal, 5:Idle -#priority=1 - diff --git a/Terraria/terrariaserver b/Terraria/terrariaserver index db4bba201..e1d9ca028 100644 --- a/Terraria/terrariaserver +++ b/Terraria/terrariaserver @@ -1,62 +1,93 @@ #!/bin/bash -# Terraria -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# Contributor: Bryce Van Dyk (SingingTree) +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Terraria | 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="211016" - -#### Variables #### - -# Notification Alerts -# (on|off) +version="161026" -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" +########################## +######## Settings ######## +########################## -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" +#### Server Settings #### -# Steam login +## SteamCMD Login | https://github.com/GameServerManagers/LinuxGSM/wiki/SteamCMD#steamcmd-login steamuser="username" steampass="password" -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters ip="0.0.0.0" -updateonstart="off" +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care fn_parms(){ parms="-config ${servercfgfullpath}" } -#### Advanced Variables #### +#### 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" + +## 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="105600" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" -# Github Branch Select +## Github Branch Select # Allows for the use of different function files # from a different repo and/or branch. githubuser="GameServerManagers" githubrepo="LinuxGSM" githubbranch="master" -# Steam -appid="105600" - -# Server Details -servicename="terraria-server" +## LinuxGSM Server Details +# Do not edit gamename="Terraria" engine="terraria" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="terraria-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -65,6 +96,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}" executabledir="${filesdir}" executable="./TerrariaServer" @@ -73,28 +106,25 @@ servercfgdefault="serverconfig.txt" servercfgdir="${filesdir}" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories #gamelogdir="" # Terraria Doesn't Have a Server Log scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -151,8 +181,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/UnrealTournament/cfg/Engine.ini b/UnrealTournament/cfg/Engine.ini deleted file mode 100644 index 177eaafdb..000000000 --- a/UnrealTournament/cfg/Engine.ini +++ /dev/null @@ -1,3 +0,0 @@ -[/Script/UnrealTournament.UTGameEngine] -bFirstRun=False -RconPassword="" diff --git a/UnrealTournament/cfg/Game.ini b/UnrealTournament/cfg/Game.ini deleted file mode 100644 index 15a1c9159..000000000 --- a/UnrealTournament/cfg/Game.ini +++ /dev/null @@ -1,4 +0,0 @@ -[/Script/UnrealTournament.UTGameState] -ServerName="" -ServerMOTD=WELCOME\n\nHeadshots for everyone. -ServerDescription=This is my server, have fun diff --git a/UnrealTournament/utserver b/UnrealTournament/utserver index 0b60ca9d6..cd4ef02d3 100644 --- a/UnrealTournament/utserver +++ b/UnrealTournament/utserver @@ -1,59 +1,84 @@ #!/bin/bash # Unreal Tournament -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Unreal Tournament | 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="211016" - -#### Variables #### +version="161026" -# Notification Alerts -# (on|off) +########################## +######## Settings ######## +########################## -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" +#### Server Settings #### -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" - -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +# For CTF: defaultmap="CTF-Face" gametype="CTF" defaultmap="DM-Underland" gametype="DM" -#defaultmap="CTF-Face" -#gametype="CTF" timelimit="10" ip="0.0.0.0" port="7777" +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care fn_parms(){ parms="UnrealTournament ${defaultmap}?Game=${gametype}?TimeLimit=${timelimit} -port=${port}" } -#### Advanced Variables #### +#### 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" + +## 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" -# Github Branch Select +#### 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" -# Server Details -servicename="ut-server" +## LinuxGSM Server Details +# Do not edit gamename="Unreal Tournament" engine="unreal4" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="ut-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -62,6 +87,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/LinuxServer" executabledir="${systemdir}/Engine/Binaries/Linux" executable="./UE4Server-Linux-Shipping" @@ -69,28 +96,25 @@ servercfg="Game.ini" servercfgdir="${systemdir}/UnrealTournament/Saved/Config/LinuxServer" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${filesdir}/Logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -147,8 +171,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/UnrealTournament2004/ut2k4server b/UnrealTournament2004/ut2k4server index c841a2199..6de94893e 100644 --- a/UnrealTournament2004/ut2k4server +++ b/UnrealTournament2004/ut2k4server @@ -1,45 +1,79 @@ #!/bin/bash -# Unreal Tournament 2004 -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Unreal Tournament 2004 | 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="211016" - -#### Variables #### +version="161026" -# Notification Alerts -# (on|off) +########################## +######## Settings ######## +########################## -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" - -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" +#### Server Settings #### -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="DM-Rankin" ip="0.0.0.0" +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | fn_parms(){ parms="server ${defaultmap}?game=XGame.xDeathMatch -nohomedir ini=${servercfg} log=${gamelog}" } -# Server Details -servicename="ut2k4-server" +#### 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" + +## 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 #### + +## 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="Unreal Tournament 2004" engine="unreal2" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="ut2k4-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -48,6 +82,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/System" executabledir="${systemdir}" executable="./ucc-bin" @@ -57,37 +93,27 @@ servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" compressedmapsdir="${rootdir}/Maps-Compressed" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${rootdir}/log/server" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - gamelog="${gamelogdir}/${servicename}-game.log" scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -gamelogdate="${gamelogdir}/${servicename}-game-$(date '+%d-%m-%Y-%H-%M-%S').log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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" +gamelogdate="${gamelogdir}/${servicename}-game-$(date '+%Y-%m-%d-%H:%M:%S').log" -# Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -##### Script ##### -# Do not edit +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -144,8 +170,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/UnrealTournament3/ut3server b/UnrealTournament3/ut3server index a094b0daa..5da529d31 100644 --- a/UnrealTournament3/ut3server +++ b/UnrealTournament3/ut3server @@ -1,32 +1,28 @@ #!/bin/bash -# Unreal Tournament 3 -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Unreal Tournament 3 | 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="211016" - -#### Variables #### +version="161026" -# Notification Alerts -# (on|off) +########################## +######## Settings ######## +########################## -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" +#### Server Settings #### -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" - -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters ip="0.0.0.0" port="7777" queryport="25300" @@ -41,26 +37,54 @@ pureserver="1" allowjoininprogress="true" maxplayers="32" -#list of game types and mutators : http://wiki.unrealadmin.org/FAQ:UT3 +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care | List of game types and mutators : http://wiki.unrealadmin.org/FAQ:UT3 fn_parms(){ parms="server ${defaultmap}?Game=${game}?bIsDedicated=${isdedicated}?bIsLanMatch=${islanmatch}?bUsesStats=${usesstats}?bShouldAdvertise=${shouldadvertise}?PureServer=${pureserver}?bAllowJoinInProgress=${allowjoininprogress}?MaxPlayers=${maxplayers}?Mutator=${mutators} -port=${port} -queryport=${queryport} -multihome=${ip} -nohomedir -unattended -log=${gamelog}" } -#### Advanced Variables #### +#### 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" + +## 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" -# Github Branch Select +#### 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" -# Server Details -servicename="ut3-server" +## LinuxGSM Server Details +# Do not edit gamename="Unreal Tournament 3" engine="unreal3" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="ut3-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -69,6 +93,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}" executabledir="${systemdir}/Binaries" executable="./ut3" @@ -77,30 +103,27 @@ servercfgdefault="UTGame.ini" servercfgdir="${systemdir}/UTGame/Config" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${rootdir}/log/server" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - gamelog="${gamelogdir}/${servicename}-game.log" scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -gamelogdate="${gamelogdir}/${servicename}-game-$(date '+%d-%m-%Y-%H-%M-%S').log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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" +gamelogdate="${gamelogdir}/${servicename}-game-$(date '+%Y-%m-%d-%H:%M:%S').log" -##### Script ##### -# Do not edit +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -157,8 +180,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/UnrealTournament99/ut99server b/UnrealTournament99/ut99server index 8fa9f4bae..0ee8afd2d 100644 --- a/UnrealTournament99/ut99server +++ b/UnrealTournament99/ut99server @@ -1,54 +1,79 @@ #!/bin/bash -# Unreal Tournament 99 -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Unreal Tournament 99 | 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="211016" - -#### Variables #### +version="161026" -# Notification Alerts -# (on|off) +########################## +######## Settings ######## +########################## -# Email -emailalert="off" -email="email@example.com" -#emailfrom="email@example.com" +#### Server Settings #### -# Pushbullet -# https://www.pushbullet.com/#settings -pushbulletalert="off" -pushbullettoken="accesstoken" - -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="DM-Deck16][" ip="0.0.0.0" +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care fn_parms(){ parms="server ${defaultmap}.unr ini=${servercfgfullpath}" } -#### Advanced Variables #### +#### 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" + +## 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" -# Github Branch Select +#### 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" -# Server Details -servicename="ut99-server" +## LinuxGSM Server Details +# Do not edit gamename="Unreal Tournament 99" engine="unreal" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="ut99-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -57,6 +82,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}/System" executabledir="${systemdir}" executable="./ucc-bin" @@ -66,28 +93,25 @@ servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" compressedmapsdir="${rootdir}/Maps-Compressed" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${filesdir}/Logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -144,8 +168,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/WolfensteinEnemyTerritory/cfg/lgsm-default.cfg b/WolfensteinEnemyTerritory/cfg/lgsm-default.cfg deleted file mode 100644 index 326e27fc9..000000000 --- a/WolfensteinEnemyTerritory/cfg/lgsm-default.cfg +++ /dev/null @@ -1,125 +0,0 @@ -set dedicated "2" // 1: dedicated server for lan 2: dedicated server for internet -// set net_ip "" // set to override the default IP ET uses -// set net_port "27960" // set to override the default port ET uses - -// PASSWORDS & CLIENTS - -set sv_maxclients "20" // number of players including private slots -set g_password "" // set to password protect the server -set sv_privateclients "4" // if set > 0, then this number of client slots will be reserved for connections -set sv_privatepassword "" // that have "password" set to the value of "sv_privatePassword" -set rconpassword "" // remote console access password -set refereePassword "" // referee status password - -// DL, RATE - -set sv_maxRate "13000" // 10000 standard but poor for ET -set sv_dl_maxRate "42000" // increase/decerease if you have plenty/little spare bandwidth -set sv_allowDownload "0" // global toggle for both legacy download and web download -set sv_wwwDownload "0" // toggle to enable web download -set sv_wwwBaseURL "" // base URL for redirection -set sv_wwwDlDisconnected "0" // tell clients to perform their downloads while disconnected from the server -set sv_wwwFallbackURL "" // URL to send to if an http/ftp fails or is refused client side - -// MOTD ETC - -set sv_hostname "" // name of server here -set server_motd0 " ^NEnemy Territory ^7MOTD " // message in right corner of join screen here -set server_motd1 "" -set server_motd2 "" -set server_motd3 "" -set server_motd4 "" -set server_motd5 "" - -// MISC SETTINGS - -set g_heavyWeaponRestriction "100" -set g_antilag "1" -set g_altStopwatchMode "0" -set g_autofireteams "1" -set g_complaintlimit "6" -set g_ipcomplaintlimit "3" -set g_fastres "0" -set g_friendlyFire "1" -//set g_gametype "4" // Game type should be set from map rotation script -set g_minGameClients "8" -set g_maxlives "0" -set g_alliedmaxlives "0" -set g_axismaxlives "0" -set g_teamforcebalance "1" -set g_noTeamSwitching "0" -set g_voiceChatsAllowed "4" -set g_doWarmup "0" -set g_warmup "30" -set g_spectatorInactivity "0" -set sv_floodProtect "1" -set sv_allowDownload "1" -set sv_pure "1" -set sv_minping "0" -set sv_maxping "0" -set match_latejoin "1" -set match_minplayers "4" -set match_mutespecs "0" -set match_readypercent "100" -set match_timeoutcount "0" -set match_warmupDamage "1" -set team_maxplayers "0" -set team_nocontrols "1" -set pmove_fixed "0" -set pmove_msec "8" - -// LMS ONLY SETTINGS - -set g_lms_teamForceBalance "1" -set g_lms_roundlimit "3" -set g_lms_matchlimit "2" -set g_lms_currentMatch "0" -set g_lms_lockTeams "0" -set g_lms_followTeamOnly "1" - -// VOTING - -set g_allowVote "1" -set vote_limit "5" -set vote_percent "50" -set vote_allow_comp "1" -set vote_allow_gametype "1" -set vote_allow_kick "1" -set vote_allow_map "1" -set vote_allow_matchreset "1" -set vote_allow_mutespecs "1" -set vote_allow_nextmap "1" -set vote_allow_pub "1" -set vote_allow_referee "0" -set vote_allow_shuffleteams "1" -set vote_allow_swapteams "1" -set vote_allow_friendlyfire "1" -set vote_allow_timelimit "0" -set vote_allow_warmupdamage "1" -set vote_allow_antilag "1" -set vote_allow_balancedteams "1" -set vote_allow_muting "1" - -// PUNKBUSTER - -// sv_punkbuster is a readonly variable. Use +set sv_punkbuster on command line or use the command pb_sv_enable in the console -//pb_sv_enable - -// LOGGING - -set g_log "etserver.log" // Game logging -set g_logsync 0 -set logfile 0 // Console logging ( 1: enable 2: enable and sync ) - -// MAP ROTATION - -exec campaigncycle.cfg // Campaign mode -//exec objectivecycle.cfg // Objective mode -//exec lmscycle.cfg // Last Man Standing mode - -// WATCHDOG - -// in case the game dies with an ERR_DROP -// or any situation leading to server running with no map -//set com_watchdog 10 // defaults 60 -set com_watchdog_cmd "exec campaigncycle.cfg" // defaults to quit diff --git a/WolfensteinEnemyTerritory/wetserver b/WolfensteinEnemyTerritory/wetserver index 54815accf..08415a1d4 100644 --- a/WolfensteinEnemyTerritory/wetserver +++ b/WolfensteinEnemyTerritory/wetserver @@ -1,52 +1,81 @@ #!/bin/bash -# Enemy Territory -# Server Management Script +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Enemy Territory | 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="211016" +version="161026" -#### Variables #### +########################## +######## Settings ######## +########################## -# Notification Alerts -# (on|off) +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +# Please use Enemy Territory config file. + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care +fn_parms(){ + parms="+set net_strict 1 +set fs_homepath ${filesdir} +exec ${servercfg}" +} + +#### LinuxGSM Settings #### -# Email +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email emailalert="off" email="email@example.com" -#emailfrom="email@example.com" - -# Pushbullet -# https://www.pushbullet.com/#settings +emailfrom="" +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet pushbulletalert="off" pushbullettoken="accesstoken" -# Start Variables +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" -fn_parms(){ - parms="+set net_strict 1 +set fs_homepath ${filesdir} +exec ${servercfg}" -} +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" -#### Advanced Variables #### +#### LinuxGSM Advanced Settings #### -# Github Branch Select +## Github Branch Select # Allows for the use of different function files # from a different repo and/or branch. githubuser="GameServerManagers" githubrepo="LinuxGSM" githubbranch="master" -# Server Details -servicename="et-server" +## LinuxGSM Server Details +# Do not edit gamename="Wolfenstein: Enemy Territory" engine="idtech3" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="et-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -55,6 +84,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}" executabledir="${systemdir}" executable="./etded" @@ -63,28 +94,25 @@ servercfgdefault="server.cfg" servercfgdir="${systemdir}/etmain" servercfgfullpath="${servercfgdir}/${servercfg}" -# Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories gamelogdir="${filesdir}/Logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## 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 +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -141,8 +169,18 @@ 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 +core_getopt.sh \ No newline at end of file diff --git a/lgsm/functions/check_steamcmd.sh b/lgsm/functions/check_steamcmd.sh index 06e941ff4..b4602a120 100644 --- a/lgsm/functions/check_steamcmd.sh +++ b/lgsm/functions/check_steamcmd.sh @@ -27,13 +27,13 @@ fn_check_steamcmd_user(){ fi # Anonymous user is set if steamuser is missing if [ -z "${steamuser}" ]; then - fn_print_error_nl "Steam login not set. Using anonymous login." + fn_print_info_nl "Steam login not set. Using anonymous login." if [ -d "${scriptlogdir}" ]; then - fn_script_log_error "Steam login not set. Using anonymous login." + fn_script_log_info "Steam login not set. Using anonymous login." fi steamuser="anonymous" steampass="" - sleep 2 + sleep 1 fi } @@ -69,4 +69,4 @@ fn_check_steamcmd_guard(){ fn_check_steamcmd_user fn_check_steamcmd_sh # stdbuf has now replaced unbuffer. This should not longer be required. -#fn_check_steamcmd_guard \ No newline at end of file +#fn_check_steamcmd_guard diff --git a/lgsm/functions/check_tmuxception.sh b/lgsm/functions/check_tmuxception.sh index d23fd88a4..31e7b81d7 100644 --- a/lgsm/functions/check_tmuxception.sh +++ b/lgsm/functions/check_tmuxception.sh @@ -18,7 +18,7 @@ fn_check_is_in_tmux(){ fi } fn_check_is_in_screen(){ - if [ "$TERM" == "screen" ];then + 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." diff --git a/lgsm/functions/core_messages.sh b/lgsm/functions/core_messages.sh index 98814cf03..540729af7 100644 --- a/lgsm/functions/core_messages.sh +++ b/lgsm/functions/core_messages.sh @@ -350,4 +350,4 @@ fn_print_update_eol(){ fn_print_update_eol_nl(){ echo -e "${cyan}UPDATE${default}" -} \ No newline at end of file +} diff --git a/lgsm/functions/update_steamcmd.sh b/lgsm/functions/update_steamcmd.sh index 574fbe2b9..37b48781d 100644 --- a/lgsm/functions/update_steamcmd.sh +++ b/lgsm/functions/update_steamcmd.sh @@ -8,8 +8,9 @@ local commandname="UPDATE" local commandaction="Update" local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" +check.sh + fn_update_steamcmd_dl(){ - check.sh info_config.sh fn_print_dots "SteamCMD" sleep 1 @@ -235,4 +236,4 @@ if [ "${engine}" == "goldsource" ]||[ "${forceupdate}" == "1" ]; then else fn_update_request_log fn_update_steamcmd_check -fi \ No newline at end of file +fi