From c7d848e3e3e9a268a68b759f2ff5cbdbb7112d14 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 8 Apr 2017 22:21:19 +0100 Subject: [PATCH 001/216] Cleared files for new dir structure --- 7DaysToDie/sdtdserver | 200 --------------------- ARKSurvivalEvolved/arkserver | 199 --------------------- Arma3/arma3server | 218 ----------------------- BallisticOverkill/boserver | 198 --------------------- Battlefield1942/bf1942server | 185 -------------------- BlackMesa/bmdmserver | 206 ---------------------- BladeSymphony/bsserver | 203 --------------------- BrainBread2/bb2server | 203 --------------------- CallOfDuty/codserver | 187 -------------------- CallOfDuty2/cod2server | 187 -------------------- CallOfDuty4/cod4server | 187 -------------------- CallOfDutyUnitedOffensive/coduoserver | 187 -------------------- CallOfDutyWorldAtWar/codwawserver | 187 -------------------- CodenameCURE/ccserver | 200 --------------------- CounterStrike/csserver | 200 --------------------- CounterStrikeConditionZero/csczserver | 200 --------------------- CounterStrikeGlobalOffensive/csgoserver | 223 ------------------------ CounterStrikeSource/cssserver | 206 ---------------------- DayOfDefeat/dodserver | 201 --------------------- DayOfDefeatSource/dodsserver | 200 --------------------- DayOfInfamy/doiserver | 203 --------------------- DeathmatchClassic/dmcserver | 200 --------------------- DontStarveTogether/dstserver | 207 ---------------------- DoubleActionBoogaloo/dabserver | 200 --------------------- EmpiresMod/emserver | 205 ---------------------- Factorio/fctrserver | 190 -------------------- FistfulOfFrags/fofserver | 200 --------------------- GarrysMod/gmodserver | 216 ----------------------- GoldenEyeSource/gesserver | 200 --------------------- HalfLife2Deathmatch/hl2dmserver | 200 --------------------- HalfLifeDeathmatch/hldmserver | 199 --------------------- HalfLifeDeathmatchSource/hldmsserver | 203 --------------------- Hurtworld/hwserver | 214 ----------------------- Insurgency/insserver | 205 ---------------------- JustCause2/jc2server | 190 -------------------- KillingFloor/kfserver | 207 ---------------------- Left4Dead/l4dserver | 199 --------------------- Left4Dead2/l4d2server | 199 --------------------- Minecraft/mcserver | 184 ------------------- MultiTheftAuto/mtaserver | 183 ------------------- Mumble/mumbleserver | 184 ------------------- NS2Combat/ns2cserver | 210 ---------------------- NaturalSelection2/ns2server | 210 ---------------------- NoMoreRoomInHell/nmrihserver | 205 ---------------------- OpposingForce/opforserver | 200 --------------------- PiratesVikingandKnightsII/pvkiiserver | 200 --------------------- ProjectCars/pcserver | 193 -------------------- ProjectZomboid/pzserver | 195 --------------------- Quake2/q2server | 185 -------------------- Quake3/q3server | 186 -------------------- QuakeLive/qlserver | 198 --------------------- QuakeWorld/qwserver | 185 -------------------- RedOrchestra/roserver | 207 ---------------------- Ricochet/ricochetserver | 219 ----------------------- Rust/rustserver | 218 ----------------------- SeriousSam3BFE/ss3sserver | 198 --------------------- Starbound/sbserver | 199 --------------------- SvenCoop/svenserver | 199 --------------------- TeamFortress2/tf2server | 203 --------------------- TeamFortressClassic/tfcserver | 200 --------------------- Teeworlds/twserver | 200 --------------------- Terraria/terrariaserver | 199 --------------------- TowerUnite/tuserver | 197 --------------------- UnrealTournament/utserver | 188 -------------------- UnrealTournament2004/ut2k4server | 188 -------------------- UnrealTournament3/ut3server | 199 --------------------- UnrealTournament99/ut99server | 186 -------------------- WolfensteinEnemyTerritory/wetserver | 184 ------------------- TeamSpeak3/ts3server => lgsminstall | 127 ++++++-------- 69 files changed, 51 insertions(+), 13592 deletions(-) delete mode 100644 7DaysToDie/sdtdserver delete mode 100644 ARKSurvivalEvolved/arkserver delete mode 100644 Arma3/arma3server delete mode 100644 BallisticOverkill/boserver delete mode 100644 Battlefield1942/bf1942server delete mode 100644 BlackMesa/bmdmserver delete mode 100644 BladeSymphony/bsserver delete mode 100644 BrainBread2/bb2server delete mode 100755 CallOfDuty/codserver delete mode 100755 CallOfDuty2/cod2server delete mode 100644 CallOfDuty4/cod4server delete mode 100755 CallOfDutyUnitedOffensive/coduoserver delete mode 100755 CallOfDutyWorldAtWar/codwawserver delete mode 100644 CodenameCURE/ccserver delete mode 100644 CounterStrike/csserver delete mode 100644 CounterStrikeConditionZero/csczserver delete mode 100755 CounterStrikeGlobalOffensive/csgoserver delete mode 100644 CounterStrikeSource/cssserver delete mode 100644 DayOfDefeat/dodserver delete mode 100644 DayOfDefeatSource/dodsserver delete mode 100644 DayOfInfamy/doiserver delete mode 100644 DeathmatchClassic/dmcserver delete mode 100644 DontStarveTogether/dstserver delete mode 100644 DoubleActionBoogaloo/dabserver delete mode 100644 EmpiresMod/emserver delete mode 100644 Factorio/fctrserver delete mode 100644 FistfulOfFrags/fofserver delete mode 100644 GarrysMod/gmodserver delete mode 100644 GoldenEyeSource/gesserver delete mode 100644 HalfLife2Deathmatch/hl2dmserver delete mode 100644 HalfLifeDeathmatch/hldmserver delete mode 100644 HalfLifeDeathmatchSource/hldmsserver delete mode 100644 Hurtworld/hwserver delete mode 100644 Insurgency/insserver delete mode 100644 JustCause2/jc2server delete mode 100644 KillingFloor/kfserver delete mode 100644 Left4Dead/l4dserver delete mode 100644 Left4Dead2/l4d2server delete mode 100644 Minecraft/mcserver delete mode 100644 MultiTheftAuto/mtaserver delete mode 100644 Mumble/mumbleserver delete mode 100644 NS2Combat/ns2cserver delete mode 100644 NaturalSelection2/ns2server delete mode 100644 NoMoreRoomInHell/nmrihserver delete mode 100644 OpposingForce/opforserver delete mode 100644 PiratesVikingandKnightsII/pvkiiserver delete mode 100755 ProjectCars/pcserver delete mode 100644 ProjectZomboid/pzserver delete mode 100644 Quake2/q2server delete mode 100644 Quake3/q3server delete mode 100755 QuakeLive/qlserver delete mode 100644 QuakeWorld/qwserver delete mode 100644 RedOrchestra/roserver delete mode 100644 Ricochet/ricochetserver delete mode 100644 Rust/rustserver delete mode 100644 SeriousSam3BFE/ss3sserver delete mode 100644 Starbound/sbserver delete mode 100644 SvenCoop/svenserver delete mode 100644 TeamFortress2/tf2server delete mode 100644 TeamFortressClassic/tfcserver delete mode 100644 Teeworlds/twserver delete mode 100644 Terraria/terrariaserver delete mode 100644 TowerUnite/tuserver delete mode 100644 UnrealTournament/utserver delete mode 100644 UnrealTournament2004/ut2k4server delete mode 100644 UnrealTournament3/ut3server delete mode 100644 UnrealTournament99/ut99server delete mode 100644 WolfensteinEnemyTerritory/wetserver rename TeamSpeak3/ts3server => lgsminstall (56%) diff --git a/7DaysToDie/sdtdserver b/7DaysToDie/sdtdserver deleted file mode 100644 index fe579d3df..000000000 --- a/7DaysToDie/sdtdserver +++ /dev/null @@ -1,200 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## 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" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="-logfile ${gamelogdir}/output_log__`date +%Y-%m-%d__%H-%M-%S`.txt -quit -batchmode -nographics -dedicated -configfile=${servercfgfullpath}" -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="294420" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="7 Days To Die" -engine="unity3d" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" -executable="./7DaysToDieServer.x86" -servercfg="${servicename}.xml" -servercfgdefault="serverconfig.xml" -servercfgdir="${filesdir}" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${rootdir}/log/server" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -gamelog="${gamelogdir}/${servicename}-game.log" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh diff --git a/ARKSurvivalEvolved/arkserver b/ARKSurvivalEvolved/arkserver deleted file mode 100644 index 6770d4128..000000000 --- a/ARKSurvivalEvolved/arkserver +++ /dev/null @@ -1,199 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -port="7777" -queryport="27015" -rconport="27020" -maxplayers="70" -ip="0.0.0.0" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="\"TheIsland?listen?MultiHome=${ip}?MaxPlayers=${maxplayers}?QueryPort=${queryport}?RCONPort=${rconport}?Port=${port}?\"" -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="376030" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="ARK: Survival Evolved" -engine="unreal4" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/ShooterGame" -executabledir="${systemdir}/Binaries/Linux" -executable="./ShooterGameServer" -servercfgdir="${systemdir}/Saved/Config/LinuxServer" -servercfg="GameUserSettings.ini" -servercfgdefault="GameUserSettings.ini" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/Saved/Logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh diff --git a/Arma3/arma3server b/Arma3/arma3server deleted file mode 100644 index 4b7d9e90e..000000000 --- a/Arma3/arma3server +++ /dev/null @@ -1,218 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## 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" -port="2302" - -## ARMA 3 Modules -# Add mods with relative paths: -# mods/@cba_a3 -# 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 -servermods="" - -## Path to BattlEye -# Leave empty for default -bepath="" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="-netlog -ip=${ip} -port=${port} -cfg=${networkcfgfullpath} -config=${servercfgfullpath} -mod=${mods} -servermod=${servermods} -bepath=${bepath} -autoinit -loadmissiontomemory" -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="233780" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="ARMA 3" -engine="realvirtuality" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" -executable="./arma3server" -servercfg="${servicename}.server.cfg" -networkcfg="${servicename}.network.cfg" -servercfgdefault="server.cfg" -networkcfgdefault="network.cfg" -servercfgdir="${systemdir}/cfg" -servercfgfullpath="${servercfgdir}/${servercfg}" -networkcfgfullpath="${servercfgdir}/${networkcfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -#gamelogdir="" # No server logs available -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh diff --git a/BallisticOverkill/boserver b/BallisticOverkill/boserver deleted file mode 100644 index 1f29990be..000000000 --- a/BallisticOverkill/boserver +++ /dev/null @@ -1,198 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 Daniel Gibbs -# Purpose: Ballistic Overkill | 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## Optional: Game Server Login Token -# GSLT can be used for running a public server. -# More info: https://gameservermanagers.com/gslt -gslt="" -ip="" -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms=" -batchmode -nographics -dedicated -configfile=${servercfgfullpath}" -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## SteamCMD Settings -# Server appid -appid="416880" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## LinuxGSM Server Details -# Do not edit -gamename="Ballistic Overkill" -engine="unity3d" - -## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers -servicename="bo-server" - -#### Directories #### -# Edit with care - -## Work Directories -rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" -selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -lockselfname=".${servicename}.lock" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" -executable="./BODS.x86" -servercfg="${servicename}.txt" -servercfgdefault="config.txt" -servercfgdir="${systemdir}" -servercfgfullpath="${servercfgdir}/${servercfg}" - - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directorie -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/Battlefield1942/bf1942server b/Battlefield1942/bf1942server deleted file mode 100644 index efd27a892..000000000 --- a/Battlefield1942/bf1942server +++ /dev/null @@ -1,185 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="+hostServer 1 +dedicated 1" -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - - -#### Advanced Variables #### - -# Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="Battlefield: 1942" -engine="refractor" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}" -executabledir="${systemdir}" -executable="./start.sh" -servercfg="serversettings.con" -servercfgdefault="serversettings.con" -servercfgdir="${systemdir}/mods/bf1942/settings" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${filesdir}/Logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh diff --git a/BlackMesa/bmdmserver b/BlackMesa/bmdmserver deleted file mode 100644 index 29d4cb903..000000000 --- a/BlackMesa/bmdmserver +++ /dev/null @@ -1,206 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## 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" - -## 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 -fn_parms(){ -parms="-game bms -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -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" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## SteamCMD Settings -# Server appid -appid="346680" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## LinuxGSM Server Details -# Do not edit -gamename="Black Mesa: Deathmatch" -engine="source" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/bms" -executabledir="${filesdir}" -executable="./srcds_run" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}/cfg" -servercfgfullpath="${servercfgdir}/${servercfg}" - - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directorie -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh diff --git a/BladeSymphony/bsserver b/BladeSymphony/bsserver deleted file mode 100644 index 96c27899e..000000000 --- a/BladeSymphony/bsserver +++ /dev/null @@ -1,203 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## 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 -defaultmap="duel_winter" -maxplayers="16" -port="27015" -sourcetvport="27020" -clientport="27005" -ip="0.0.0.0" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="-autoupdate -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -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" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="228780" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="Blade Symphony" -engine="source" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/berimbau" -executabledir="${filesdir}" -executable="./srcds_run.sh" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}/cfg" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh diff --git a/BrainBread2/bb2server b/BrainBread2/bb2server deleted file mode 100644 index 3647d5a32..000000000 --- a/BrainBread2/bb2server +++ /dev/null @@ -1,203 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -## 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" - -## 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 -fn_parms(){ -parms="-game brainbread2 -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -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" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="475370" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="BrainBread 2" -engine="source" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/brainbread2" -executabledir="${filesdir}" -executable="./srcds_run" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}/cfg" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh diff --git a/CallOfDuty/codserver b/CallOfDuty/codserver deleted file mode 100755 index f4d092300..000000000 --- a/CallOfDuty/codserver +++ /dev/null @@ -1,187 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 Daniel Gibbs -# Purpose: Call of Duty | 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -defaultmap="mp_neuville" -maxclients="20" -port="28960" -ip="0.0.0.0" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="+set sv_punkbuster 0 +set fs_basepath ${filesdir} +set dedicated 1 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxclients} +exec ${servercfg} +map ${defaultmap}" -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### Advanced Variables #### - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="Call of Duty" -engine="idtech3" - -## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers -servicename="cod-server" - -#### Directories #### -# Edit with care - -## Work Directories -rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" -selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -lockselfname=".${servicename}.lock" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" -executable="./cod_lnxded" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}/main" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${filesdir}/Logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/CallOfDuty2/cod2server b/CallOfDuty2/cod2server deleted file mode 100755 index 9b918fc1b..000000000 --- a/CallOfDuty2/cod2server +++ /dev/null @@ -1,187 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 Daniel Gibbs -# Purpose: Call of Duty 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -defaultmap="mp_leningrad" -maxclients="20" -port="28960" -ip="0.0.0.0" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="+set sv_punkbuster 0 +set fs_basepath ${filesdir} +set dedicated 1 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxclients} +exec ${servercfg} +map ${defaultmap}" -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### Advanced Variables #### - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="Call of Duty 2" -engine="iw2.0" - -## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers -servicename="cod2-server" - -#### Directories #### -# Edit with care - -## Work Directories -rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" -selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -lockselfname=".${servicename}.lock" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" -executable="./cod2_lnxded" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}/main" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${filesdir}/Logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/CallOfDuty4/cod4server b/CallOfDuty4/cod4server deleted file mode 100644 index 50432244f..000000000 --- a/CallOfDuty4/cod4server +++ /dev/null @@ -1,187 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 Daniel Gibbs -# Purpose: Call of Duty 4 | 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -defaultmap="mp_crossfire" -maxclients="32" -port="28960" -ip="0.0.0.0" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="+set sv_punkbuster 0 +set fs_basepath ${filesdir} +set dedicated 1 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxclients} +exec ${servercfg} +map ${defaultmap}" -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### Advanced Variables #### - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="Call of Duty 4" -engine="iw3.0" - -## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers -servicename="cod4-server" - -#### Directories #### -# Edit with care - -## Work Directories -rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" -selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -lockselfname=".${servicename}.lock" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" -executable="./cod4x18_dedrun" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}/main" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${filesdir}/Logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh diff --git a/CallOfDutyUnitedOffensive/coduoserver b/CallOfDutyUnitedOffensive/coduoserver deleted file mode 100755 index 9011ead88..000000000 --- a/CallOfDutyUnitedOffensive/coduoserver +++ /dev/null @@ -1,187 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 Daniel Gibbs -# Purpose: Call of Duty: United 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -defaultmap="mp_cassino" -maxclients="20" -port="28960" -ip="0.0.0.0" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="+set sv_punkbuster 0 +set fs_basepath ${filesdir} +set dedicated 1 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxclients} +exec ${servercfg} +map ${defaultmap}" -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### Advanced Variables #### - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="Call of Duty: United Offensive" -engine="idtech3" - -## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers -servicename="coduo-server" - -#### Directories #### -# Edit with care - -## Work Directories -rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" -selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -lockselfname=".${servicename}.lock" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" -executable="./coduo_lnxded" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}/uo" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${filesdir}/Logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/CallOfDutyWorldAtWar/codwawserver b/CallOfDutyWorldAtWar/codwawserver deleted file mode 100755 index 81bac8ca1..000000000 --- a/CallOfDutyWorldAtWar/codwawserver +++ /dev/null @@ -1,187 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 Daniel Gibbs -# Purpose: Call of Duty: World at War | Server Management Script -# Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors -# Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki -# Website: https://gameservermanagers.com - -# Debugging -if [ -f ".dev-debug" ]; then - exec 5>dev-debug.log - BASH_XTRACEFD="5" - set -x -fi - -version="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -defaultmap="mp_castle" -maxclients="20" -port="28960" -ip="0.0.0.0" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="+set sv_punkbuster 0 +set fs_basepath ${filesdir} +set dedicated 1 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxclients} +exec ${servercfg} +map ${defaultmap}" -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### Advanced Variables #### - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="Call of Duty: World at War" -engine="iw3.0" - -## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers -servicename="codwaw-server" - -#### Directories #### -# Edit with care - -## Work Directories -rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" -selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -lockselfname=".${servicename}.lock" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" -executable="./codwaw_lnxded" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}/main" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${filesdir}/Logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/CodenameCURE/ccserver b/CodenameCURE/ccserver deleted file mode 100644 index 15a57e0af..000000000 --- a/CodenameCURE/ccserver +++ /dev/null @@ -1,200 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## 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" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="-game cure -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -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" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="383410" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="Codename CURE" -engine="source" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/cure" -executabledir="${filesdir}" -executable="./srcds_run" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}/cfg" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/CounterStrike/csserver b/CounterStrike/csserver deleted file mode 100644 index ac18e4e20..000000000 --- a/CounterStrike/csserver +++ /dev/null @@ -1,200 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## 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" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -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" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### Advanced Variables #### - -## 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" - -## LinuxGSM Server Details -# Do not edit -gamename="Counter-Strike 1.6" -engine="goldsource" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/cstrike" -executabledir="${filesdir}" -executable="./hlds_run" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/CounterStrikeConditionZero/csczserver b/CounterStrikeConditionZero/csczserver deleted file mode 100644 index d02caa924..000000000 --- a/CounterStrikeConditionZero/csczserver +++ /dev/null @@ -1,200 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## 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" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="-game czero -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" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="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" - -## LinuxGSM Server Details -# Do not edit -gamename="Counter-Strike: Condition Zero" -engine="goldsource" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/czero" -executabledir="${filesdir}" -executable="./hlds_run" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/CounterStrikeGlobalOffensive/csgoserver b/CounterStrikeGlobalOffensive/csgoserver deleted file mode 100755 index 75ffa7265..000000000 --- a/CounterStrikeGlobalOffensive/csgoserver +++ /dev/null @@ -1,223 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -# https://developer.valvesoftware.com/wiki/Counter-Strike:_Global_Offensive_Dedicated_Servers#Starting_the_Server -# [Game Modes] gametype gamemode -# Arms Race 1 0 -# Classic Casual 0 0 -# Classic Competitive 0 1 -# Demolition 1 1 -# Deathmatch 1 2 -gametype="0" -gamemode="0" -defaultmap="de_mirage" -mapgroup="mg_active" -maxplayers="16" -tickrate="64" -port="27015" -sourcetvport="27020" -clientport="27005" -ip="0.0.0.0" - -## Required: Game Server Login Token -# GSLT is required for running a public server. -# More info: https://gameservermanagers.com/gslt -gslt="" - -## Optional: Workshop Parameters -# https://developer.valvesoftware.com/wiki/CSGO_Workshop_For_Server_Operators -# To get an authkey visit - http://steamcommunity.com/dev/apikey -# authkey="" -# ws_collection_id="" -# ws_start_map="" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="-game 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}" -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="740" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="Counter-Strike: Global Offensive" -engine="source" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/csgo" -executabledir="${filesdir}" -executable="./srcds_run" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}/cfg" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh diff --git a/CounterStrikeSource/cssserver b/CounterStrikeSource/cssserver deleted file mode 100644 index 7ccc2a688..000000000 --- a/CounterStrikeSource/cssserver +++ /dev/null @@ -1,206 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -defaultmap="de_dust2" -maxplayers="16" -port="27015" -sourcetvport="27020" -clientport="27005" -ip="0.0.0.0" -updateonstart="off" - -## Required: Game Server Login Token -# GSLT is required for running a public server. -# More info: https://gameservermanagers.com/gslt -gslt="" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="-game cstrike -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -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" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="232330" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="Counter-Strike: Source" -engine="source" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/cstrike" -executabledir="${filesdir}" -executable="./srcds_run" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}/cfg" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/DayOfDefeat/dodserver b/DayOfDefeat/dodserver deleted file mode 100644 index 17e6bf90a..000000000 --- a/DayOfDefeat/dodserver +++ /dev/null @@ -1,201 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -defaultmap="dod_Anzio" -maxplayers="16" -port="27015" -clientport="27005" -ip="0.0.0.0" -updateonstart="off" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="-game dod -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" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="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" - -## LinuxGSM Server Details -# Do not edit -gamename="Day of Defeat" -engine="goldsource" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/dod" -executabledir="${filesdir}" -executable="./hlds_run" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/DayOfDefeatSource/dodsserver b/DayOfDefeatSource/dodsserver deleted file mode 100644 index 6710ec756..000000000 --- a/DayOfDefeatSource/dodsserver +++ /dev/null @@ -1,200 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## 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" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="-game dod -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -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" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="232290" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="Day of Defeat: Source" -engine="source" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/dod" -executabledir="${filesdir}" -executable="./srcds_run" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}/cfg" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/DayOfInfamy/doiserver b/DayOfInfamy/doiserver deleted file mode 100644 index e26f95010..000000000 --- a/DayOfInfamy/doiserver +++ /dev/null @@ -1,203 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -defaultmap="bastogne" -maxplayers="16" -tickrate="64" -port="27015" -sourcetvport="27020" -clientport="27005" -ip="0.0.0.0" -workshop="0" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -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}" -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="462310" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="Day of Infamy" -engine="source" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/doi" -executabledir="${filesdir}" -executable="./srcds_run" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}/cfg" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" - -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/DeathmatchClassic/dmcserver b/DeathmatchClassic/dmcserver deleted file mode 100644 index 9308ced64..000000000 --- a/DeathmatchClassic/dmcserver +++ /dev/null @@ -1,200 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -defaultmap="dcdm5" -maxplayers="16" -port="27015" -clientport="27005" -ip="0.0.0.0" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="-game dmc -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" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="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" - -## LinuxGSM Server Details -# Do not edit -gamename="Deathmatch Classic" -engine="goldsource" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/dmc" -executabledir="${filesdir}" -executable="./hlds_run" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/DontStarveTogether/dstserver b/DontStarveTogether/dstserver deleted file mode 100644 index d84b8084a..000000000 --- a/DontStarveTogether/dstserver +++ /dev/null @@ -1,207 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## Installation Variables | https://github.com/GameServerManagers/LinuxGSM/wiki/Don't-Starve-Together -sharding="false" -master="true" -shard="Master" -cluster="Cluster_1" -cave="false" - -# Edit with care -persistentstorageroot="${HOME}/.klei" -confdir="DoNotStarveTogether" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="-persistent_storage_root ${persistentstorageroot} -conf_dir ${confdir} -cluster ${cluster} -shard ${shard}" -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="343050" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="Don't Starve Together" -engine="dontstarve" - -## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers -servicename="dst-server-${shard}" - -#### Directories #### -# Edit with care - -## Work Directories -rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" -selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -lockselfname=".${servicename}.lock" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}/bin" -executable="./dontstarve_dedicated_server_nullrenderer" -clustercfg="cluster.ini" -clustercfgdir="${persistentstorageroot}/${confdir}/${cluster}" -clustercfgfullpath="${clustercfgdir}/${clustercfg}" -clustercfgdefault="cluster.ini" -servercfg="server.ini" -servercfgdir="${clustercfgdir}/${shard}" -servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="server.ini" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh diff --git a/DoubleActionBoogaloo/dabserver b/DoubleActionBoogaloo/dabserver deleted file mode 100644 index ab0f3c770..000000000 --- a/DoubleActionBoogaloo/dabserver +++ /dev/null @@ -1,200 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## 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" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="-strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -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" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="317800" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="Double Action: Boogaloo" -engine="source" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/dab" -executabledir="${filesdir}" -executable="./dabds.sh" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}/cfg" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/EmpiresMod/emserver b/EmpiresMod/emserver deleted file mode 100644 index a9b9def1c..000000000 --- a/EmpiresMod/emserver +++ /dev/null @@ -1,205 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 Daniel Gibbs -# Purpose: Empires 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## 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" - -## 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 -fn_parms(){ -parms="-game empires -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -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" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="460040" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="Empires Mod" -engine="source" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/empires" -executabledir="${filesdir}" -executable="./srcds_run" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}/cfg" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/Factorio/fctrserver b/Factorio/fctrserver deleted file mode 100644 index 54e76a5f2..000000000 --- a/Factorio/fctrserver +++ /dev/null @@ -1,190 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 Daniel Gibbs -# Purpose: Factorio | 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -port="34197" -rconport="34198" -rconpassword="CHANGE_ME" -ip="0.0.0.0" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="--start-server ${filesdir}/save1.zip --server-settings ${servercfgfullpath} --port ${port} --rcon-port ${rconport} --rcon-password ${rconpassword}" -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## 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="Factorio" -engine="factorio" - -## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers -servicename="fctr-server" - -#### Directories #### -# Edit with care - -## Work Directories -rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" -selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -lockselfname=".${servicename}.lock" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}/bin/x64" -executable="./factorio" -servercfg="${servicename}.json" -servercfgdefault="server-settings.json" -servercfgdir="${filesdir}/data" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${filesdir}" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/FistfulOfFrags/fofserver b/FistfulOfFrags/fofserver deleted file mode 100644 index aaf73016c..000000000 --- a/FistfulOfFrags/fofserver +++ /dev/null @@ -1,200 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## 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" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="-game fof -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -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" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="295230" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="Fistful of Frags" -engine="source" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/fof" -executabledir="${filesdir}" -executable="./srcds_run" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}/cfg" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/GarrysMod/gmodserver b/GarrysMod/gmodserver deleted file mode 100644 index d9b06c24a..000000000 --- a/GarrysMod/gmodserver +++ /dev/null @@ -1,216 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -defaultmap="gm_construct" -gamemode="sandbox" -maxplayers="16" -port="27015" -sourcetvport="27020" -clientport="27005" -tickrate="66" -ip="0.0.0.0" - -## Workshop Parameters | http://wiki.garrysmod.com/page/Workshop_for_Dedicated_Servers -workshopauth="" -workshopcollectionid="" - -## 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 -# 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 -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}" -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="4020" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="Garry's Mod" -engine="source" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/garrysmod" -addonsdir="${systemdir}/addons" -executabledir="${filesdir}" -executable="./srcds_run" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}/cfg" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh diff --git a/GoldenEyeSource/gesserver b/GoldenEyeSource/gesserver deleted file mode 100644 index 9182365d6..000000000 --- a/GoldenEyeSource/gesserver +++ /dev/null @@ -1,200 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -defaultmap="ge_archives" -maxplayers="16" -port="27015" -sourcetvport="27020" -clientport="27005" -ip="0.0.0.0" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="-game gesource -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -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" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="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" - -## LinuxGSM Server Details -# Do not edit -gamename="GoldenEye: Source" -engine="source" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/gesource" -executabledir="${filesdir}" -executable="./srcds_run" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}/cfg" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/HalfLife2Deathmatch/hl2dmserver b/HalfLife2Deathmatch/hl2dmserver deleted file mode 100644 index a32f50903..000000000 --- a/HalfLife2Deathmatch/hl2dmserver +++ /dev/null @@ -1,200 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## 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" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="-game hl2mp -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -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" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="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" - -## LinuxGSM Server Details -# Do not edit -gamename="Half Life 2: Deathmatch" -engine="source" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/hl2mp" -executabledir="${filesdir}" -executable="./srcds_run" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}/cfg" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/HalfLifeDeathmatch/hldmserver b/HalfLifeDeathmatch/hldmserver deleted file mode 100644 index 701678eb9..000000000 --- a/HalfLifeDeathmatch/hldmserver +++ /dev/null @@ -1,199 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -defaultmap="crossfire" -maxplayers="16" -port="27015" -clientport="27005" -ip="0.0.0.0" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="-game valve -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" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="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" - -## LinuxGSM Server Details -# Do not edit -gamename="Half Life: Deathmatch" -engine="goldsource" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/valve" -executabledir="${filesdir}" -executable="./hlds_run" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/HalfLifeDeathmatchSource/hldmsserver b/HalfLifeDeathmatchSource/hldmsserver deleted file mode 100644 index aa5a19990..000000000 --- a/HalfLifeDeathmatchSource/hldmsserver +++ /dev/null @@ -1,203 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## 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" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="-game hl1mp -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -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" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="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 -# 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="Half-Life Deathmatch: Source" -engine="source" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/hl1mp" -executabledir="${filesdir}" -executable="./srcds_run" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}/cfg" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -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 ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/Hurtworld/hwserver b/Hurtworld/hwserver deleted file mode 100644 index 445551956..000000000 --- a/Hurtworld/hwserver +++ /dev/null @@ -1,214 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -servername="Hurtworld LinuxGSM Server" -ip="0.0.0.0" -port="12871" -queryport="12881" -maxplayers="20" -map="" #Optional -creativemode="0" #Free Build: creativemode="1" -logfile="gamelog.txt" - -## Adding admins using STEAMID64 -# Example : addadmin 012345678901234567; addadmin 987654321098765432 -admins="" - -## Advanced Server Start Settings -# Rollback server state (remove after start command) -loadsave="" -# Use unstable 64 bit server executable (O/1) -x64mode="0" - -## 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}\" " -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="405100" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="Hurtworld" -engine="unity3d" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" -if [ "${x64mode}" == "1" ]; then - executable="./Hurtworld.x86_64" -else - executable="./Hurtworld.x86" -fi - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${rootdir}/log/server" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -gamelog="${gamelogdir}/${servicename}-game.log" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/Insurgency/insserver b/Insurgency/insserver deleted file mode 100644 index 6bf8c6787..000000000 --- a/Insurgency/insserver +++ /dev/null @@ -1,205 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 Daniel Gibbs -# Purpose: 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -defaultmap="ministry" -maxplayers="16" -tickrate="64" -port="27015" -sourcetvport="27020" -clientport="27005" -ip="0.0.0.0" -workshop="0" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -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" -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="237410" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="Insurgency" -engine="source" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/insurgency" -executabledir="${filesdir}" -executable="./srcds_run" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}/cfg" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -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 ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/JustCause2/jc2server b/JustCause2/jc2server deleted file mode 100644 index f6491db66..000000000 --- a/JustCause2/jc2server +++ /dev/null @@ -1,190 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 Daniel Gibbs -# Purpose: Just Cause 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="170305" - -########################## -######## Settings ######## -########################## - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -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" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="261140" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="Just Cause 2" -engine="avalanche" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" -executable="./Jcmp-Server" -servercfg="config.lua" -servercfgdefault="config.lua" -servercfgdir="${filesdir}" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -#gamelogdir="" # No server logs available -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/KillingFloor/kfserver b/KillingFloor/kfserver deleted file mode 100644 index cd3d4c8d8..000000000 --- a/KillingFloor/kfserver +++ /dev/null @@ -1,207 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## 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 -defaultmap="KF-BioticsLab.rom" -ip="0.0.0.0" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="server ${defaultmap}?game=KFmod.KFGameType?VACSecured=true -nohomedir ini=${servercfg} log=${gamelog}" - -# Server Start Command for Objective mode -#defaultmap="KFO-Steamland" -#parms="server ${defaultmap}?Game=KFStoryGame.KFStoryGame?VACSecured=true -nohomedir ini=${servercfg} log=${gamelog}" -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="215360" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="Killing Floor" -engine="unreal2" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/System" -executabledir="${systemdir}" -executable="./ucc-bin" -servercfg="${servicename}.ini" -servercfgdefault="Default.ini" -servercfgdir="${systemdir}" -servercfgfullpath="${servercfgdir}/${servercfg}" -compressedmapsdir="${rootdir}/Maps-Compressed" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${rootdir}/log/server" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -gamelog="${gamelogdir}/${servicename}-game.log" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" -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(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh diff --git a/Left4Dead/l4dserver b/Left4Dead/l4dserver deleted file mode 100644 index fae715724..000000000 --- a/Left4Dead/l4dserver +++ /dev/null @@ -1,199 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## 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" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="-game left4dead -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" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="222840" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="Left 4 Dead" -engine="source" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/left4dead" -executabledir="${filesdir}" -executable="./srcds_run" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}/cfg" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/Left4Dead2/l4d2server b/Left4Dead2/l4d2server deleted file mode 100644 index 8b9761476..000000000 --- a/Left4Dead2/l4d2server +++ /dev/null @@ -1,199 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## 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" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="-game left4dead2 -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -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" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="222860" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="Left 4 Dead 2" -engine="source" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/left4dead2" -executabledir="${filesdir}" -executable="./srcds_run" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}/cfg" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/Minecraft/mcserver b/Minecraft/mcserver deleted file mode 100644 index 5e703eec3..000000000 --- a/Minecraft/mcserver +++ /dev/null @@ -1,184 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### 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 -fn_parms(){ -parms="nogui" -} -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## 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="Minecraft" -engine="lwjgl2" - -## 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 ${filesdir}/minecraft_server.jar" -servercfg="server.properties" -servercfgdefault="server.properties" -servercfgdir="${filesdir}" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh diff --git a/MultiTheftAuto/mtaserver b/MultiTheftAuto/mtaserver deleted file mode 100644 index d82e00754..000000000 --- a/MultiTheftAuto/mtaserver +++ /dev/null @@ -1,183 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 Daniel Gibbs -# Purpose: Multi Theft Auto | Server Management Script -# Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors -# Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki -# Website: https://gameservermanagers.com -if [ -f ".dev-debug" ]; then - exec 5>dev-debug.log - BASH_XTRACEFD="5" - set -x -fi - -version="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -# None Available - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care -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" -channeltag="" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### 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="Multi Theft Auto" -engine="renderware" - -## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers -servicename="mta-server" - -#### Directories #### -# Edit with care - -## Work Directories -rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" -selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -lockselfname=".${servicename}.lock" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}" -resourcesdir="${systemdir}/mods/deathmatch/resources" -executabledir="${systemdir}" -executable="./mta-server64" -servercfg="mtaserver.conf" -servercfgdir="${systemdir}/mods/deathmatch" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${filesdir}/mods/deathmatch/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh diff --git a/Mumble/mumbleserver b/Mumble/mumbleserver deleted file mode 100644 index 369a26206..000000000 --- a/Mumble/mumbleserver +++ /dev/null @@ -1,184 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### -# Use .ini config file for Mumble (Murmur) server. - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -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="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## 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="Mumble" - -## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers -servicename="mumble-server" - -#### Directories #### -# Edit with care - -## Work Directories -rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" -selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -lockselfname=".${servicename}.lock" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" -executable="./murmur.x86" -servercfg="${servicename}.ini" -servercfgdefault="murmur.ini" -servercfgdir="${filesdir}" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${rootdir}/log" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/NS2Combat/ns2cserver b/NS2Combat/ns2cserver deleted file mode 100644 index c5abeb46f..000000000 --- a/NS2Combat/ns2cserver +++ /dev/null @@ -1,210 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## 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 -defaultmap="co_core" -port="27015" -maxplayers="24" -ip="0.0.0.0" -servername="NS2C Server" -webadminuser="admin" -webadminpass="admin" -webadminport="8080" -mods="" -password="" -# Add the following line to the parms if you want a private server. Ensuring -# that the password variable above is not left empty. -# -password \"${password}\" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -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}\"" -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="313900" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="NS2: Combat" -engine="spark" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}/ia32" -executable="./ns2combatserver_linux32" -servercfgdir="${rootdir}/server1" -servercfgfullpath="${servercfgdir}" -modstoragedir="${servercfgdir}/Workshop" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh diff --git a/NaturalSelection2/ns2server b/NaturalSelection2/ns2server deleted file mode 100644 index af5e65d24..000000000 --- a/NaturalSelection2/ns2server +++ /dev/null @@ -1,210 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## 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 -defaultmap="ns2_summit" -port="27015" -maxplayers="24" -ip="0.0.0.0" -servername="NS2 Server" -webadminuser="admin" -webadminpass="admin" -webadminport="8080" -mods="" -password="" -# Add the following line to the parms if you want a private server. Ensuring -# that the password variable above is not left empty. -# -password \"${password}\" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -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}\"" -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="4940" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="Natural Selection 2" -engine="spark" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" -executable="./server_linux32" -servercfgdir="${rootdir}/server1" -servercfgfullpath="${servercfgdir}" -modstoragedir="${servercfgdir}/Workshop" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh diff --git a/NoMoreRoomInHell/nmrihserver b/NoMoreRoomInHell/nmrihserver deleted file mode 100644 index 7aac993bc..000000000 --- a/NoMoreRoomInHell/nmrihserver +++ /dev/null @@ -1,205 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 Daniel Gibbs -# Purpose: 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## 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" - -## 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 -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}" -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="317670" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="No More Room in Hell" -engine="source" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/nmrih" -executabledir="${filesdir}" -executable="./srcds_run" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}/cfg" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/OpposingForce/opforserver b/OpposingForce/opforserver deleted file mode 100644 index 915a6944a..000000000 --- a/OpposingForce/opforserver +++ /dev/null @@ -1,200 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## 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" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="-game gearbox -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" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="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" - -## LinuxGSM Server Details -# Do not edit -gamename="Half-Life: Opposing Force" -engine="goldsource" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/gearbox" -executabledir="${filesdir}" -executable="./hlds_run" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/PiratesVikingandKnightsII/pvkiiserver b/PiratesVikingandKnightsII/pvkiiserver deleted file mode 100644 index 5ab0e2396..000000000 --- a/PiratesVikingandKnightsII/pvkiiserver +++ /dev/null @@ -1,200 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## 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" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="-game pvkii -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -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" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="17575" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="Pirates, Vikings, and Knights II" -engine="source" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/pvkii" -executabledir="${filesdir}" -executable="./srcds_run" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}/cfg" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/ProjectCars/pcserver b/ProjectCars/pcserver deleted file mode 100755 index 64b6bd5e8..000000000 --- a/ProjectCars/pcserver +++ /dev/null @@ -1,193 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 Daniel Gibbs -# Purpose: Project Cars | 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -# Notification Alerts -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="--config ${servercfg}" -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="332670" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="Project Cars" -engine="madness" - -## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers -servicename="pc-server" - -#### Directories #### -# Edit with care - -## Work Directories -rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" -selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -lockselfname=".${servicename}.lock" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" -executable="./DedicatedServerCmd" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/ProjectZomboid/pzserver b/ProjectZomboid/pzserver deleted file mode 100644 index 191505d57..000000000 --- a/ProjectZomboid/pzserver +++ /dev/null @@ -1,195 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### 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}\" -servername ${servicename}" -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="380870" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="Project Zomboid" -engine="projectzomboid" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" -executable="./start-server.sh" -servercfg="${servicename}.ini" -servercfgdefault="server.ini" -servercfgdir="${HOME}/Zomboid/Server" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${HOME}/Zomboid/Logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/Quake2/q2server b/Quake2/q2server deleted file mode 100644 index 601fff1cc..000000000 --- a/Quake2/q2server +++ /dev/null @@ -1,185 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## 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" -channeltag="" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### 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="Quake 2" -engine="idtech2" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/baseq2" -executabledir="${filesdir}" -executable="./quake2" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${filesdir}/Logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/Quake3/q3server b/Quake3/q3server deleted file mode 100644 index 9a0dced71..000000000 --- a/Quake3/q3server +++ /dev/null @@ -1,186 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## 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}" -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### 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="Quake 3: Arena" -engine="idtech3" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/baseq3" -executabledir="${filesdir}" -executable="./q3ded" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${filesdir}/Logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/QuakeLive/qlserver b/QuakeLive/qlserver deleted file mode 100755 index 1fdaec287..000000000 --- a/QuakeLive/qlserver +++ /dev/null @@ -1,198 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -arch="x64" # x64 or x86 - -## 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="+exec ${servercfg}" -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="349090" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="Quake Live" -engine="idtech3_ql" - -## 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" -lgsmdir="${rootdir}/lgsm" -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") -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${filesdir}/baseq3" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${rootdir}/log/server" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -gamelog="${gamelogdir}/${servicename}-game.log" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/QuakeWorld/qwserver b/QuakeWorld/qwserver deleted file mode 100644 index 5d0cb3b8a..000000000 --- a/QuakeWorld/qwserver +++ /dev/null @@ -1,185 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 Daniel Gibbs -# Purpose: Quake World (nQuake) | 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -port="27500" -ip="0.0.0.0" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="-port ${port} -game ktx +exec ${servercfg}" -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### 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="QuakeWorld" -engine="quake" - -## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers -servicename="quakeworld_server" - -#### Directories #### -# Edit with care - -## Work Directories -rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" -selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -lockselfname=".${servicename}.lock" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/ktx" -executabledir="${filesdir}" -executable="./mvdsv" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/RedOrchestra/roserver b/RedOrchestra/roserver deleted file mode 100644 index ea82680d5..000000000 --- a/RedOrchestra/roserver +++ /dev/null @@ -1,207 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## 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 -defaultmap="RO-Arad.rom" -ip="0.0.0.0" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="server ${defaultmap}?game=ROGame.ROTeamGame?VACSecured=true -nohomedir ini=${servercfg} log=${gamelog}" -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="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 -# 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="Red Orchestra: Ostfront 41-45" -engine="unreal2" - -## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers -servicename="ro-server" - -#### Directories #### -# Edit with care - -## Work Directories -rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" -selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -lockselfname=".${servicename}.lock" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" - -## Server Specific Directories -filesdir="${rootdir}/serverfiles" -systemdir="${filesdir}/system" -executabledir="${systemdir}" -executable="./ucc-bin" -servercfg="${servicename}.ini" -servercfgdefault="default.ini" -servercfgdir="${systemdir}" -servercfgfullpath="${servercfgdir}/${servercfg}" -compressedmapsdir="${rootdir}/Maps-Compressed" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${rootdir}/log/server" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -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" -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(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh diff --git a/Ricochet/ricochetserver b/Ricochet/ricochetserver deleted file mode 100644 index 641fc84e1..000000000 --- a/Ricochet/ricochetserver +++ /dev/null @@ -1,219 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -defaultmap="rc_arena" -maxplayers="16" -port="27015" -clientport="27005" -ip="0.0.0.0" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="-game ricochet -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} -maxplayers ${maxplayers}" -} - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## 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 -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" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="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 -# 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="Ricochet" -engine="goldsource" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/ricochet" -executabledir="${filesdir}" -executable="./hlds_run" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/Rust/rustserver b/Rust/rustserver deleted file mode 100644 index 6ac1ac5f9..000000000 --- a/Rust/rustserver +++ /dev/null @@ -1,218 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### 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" -port="28015" -rconport="28016" -rconpassword="CHANGE_ME" -rconweb="1" # Value is: 1 for Facepunch's web panel; 0 for RCON tools like Rusty or Rustadmin -maxplayers="50" -# 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 - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -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.web ${rconweb} +rcon.ip ${ip} +rcon.port ${rconport} +rcon.password \"${rconpassword}\" -logfile \"${gamelogdate}\"" -} - -# Specific to Rust -if [ -n "${seed}" ]; then - # If set, then add to start parms - conditionalseed="+server.seed ${seed}" -else - # Keep randomness of the number if not set - conditionalseed="" -fi - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="258550" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="Rust" -engine="unity3d" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" -executable="./RustDedicated" -serveridentitydir="${systemdir}/server/${servicename}" -servercfg="server.cfg" -servercfgdefault="server.cfg" -servercfgdir="${serveridentitydir}/cfg" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${rootdir}/log/server" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" -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(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh diff --git a/SeriousSam3BFE/ss3sserver b/SeriousSam3BFE/ss3sserver deleted file mode 100644 index a6b4d53f0..000000000 --- a/SeriousSam3BFE/ss3sserver +++ /dev/null @@ -1,198 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -ip="0.0.0.0" - -## 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="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="41080" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="Serious Sam 3: BFE" -engine="seriousengine35" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/Bin" -executable="./runSam3_DedicatedServer.sh" -executabledir="${systemdir}" -servercfg="${servicename}.ini" -servercfgdefault="server.ini" -servercfgdir="${filesdir}/Content/SeriousSam3/Config" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${rootdir}/log/server" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -gamelog="${gamelogdir}/${servicename}-game.log" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" -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(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/Starbound/sbserver b/Starbound/sbserver deleted file mode 100644 index cd7f8c40a..000000000 --- a/Starbound/sbserver +++ /dev/null @@ -1,199 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## 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" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -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" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="211820" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="Starbound" -engine="starbound" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}/linux" -executable="./starbound_server" -servercfg="starbound_server.config" -servercfgdefault="starbound_server.config" -servercfgdir="${filesdir}/storage" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${filesdir}/storage" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh diff --git a/SvenCoop/svenserver b/SvenCoop/svenserver deleted file mode 100644 index 0f6fb9829..000000000 --- a/SvenCoop/svenserver +++ /dev/null @@ -1,199 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -defaultmap="svencoop1" -maxplayers="16" -port="27015" -clientport="27005" -ip="0.0.0.0" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="-game svencoop -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" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="276060" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="Sven Co-op" -engine="goldsource" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/svencoop" -executabledir="${filesdir}" -executable="./svends_run" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/TeamFortress2/tf2server b/TeamFortress2/tf2server deleted file mode 100644 index 25d262dd3..000000000 --- a/TeamFortress2/tf2server +++ /dev/null @@ -1,203 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## 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" - -## 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 -fn_parms(){ -parms="-game tf -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +sv_setsteamaccount ${gslt} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" -} - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="232250" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="Team Fortress 2" -engine="source" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/tf" -executabledir="${filesdir}" -executable="./srcds_run" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}/cfg" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/TeamFortressClassic/tfcserver b/TeamFortressClassic/tfcserver deleted file mode 100644 index 834472249..000000000 --- a/TeamFortressClassic/tfcserver +++ /dev/null @@ -1,200 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -defaultmap="dustbowl" -maxplayers="16" -port="27015" -clientport="27005" -ip="0.0.0.0" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="-game tfc -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" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="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" - -## LinuxGSM Server Details -# Do not edit -gamename="Team Fortress Classic" -engine="goldsource" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/tfc" -executabledir="${filesdir}" -executable="./hlds_run" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/Teeworlds/twserver b/Teeworlds/twserver deleted file mode 100644 index 0325f3889..000000000 --- a/Teeworlds/twserver +++ /dev/null @@ -1,200 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## 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" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="-f ${servercfgfullpath}" -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="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 -# 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="Teeworlds" -engine="teeworlds" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/tw" -executabledir="${systemdir}" -executable="./teeworlds_srv" -servercfg="${servicename}.cfg" # Teeworlds can also auto load any config if an autoexec.cfg file is present in the server dir -servercfgdefault="server.cfg" -servercfgdir="${filesdir}" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${rootdir}/log/server" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -gamelog="${gamelogdir}/${servicename}-game.log" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh diff --git a/Terraria/terrariaserver b/Terraria/terrariaserver deleted file mode 100644 index f0a893134..000000000 --- a/Terraria/terrariaserver +++ /dev/null @@ -1,199 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## 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" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="-config ${servercfgfullpath}" -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="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 -# 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="Terraria" -engine="terraria" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" -executable="./TerrariaServer" -servercfg="${servicename}.txt" -servercfgdefault="serverconfig.txt" -servercfgdir="${filesdir}" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -#gamelogdir="" # Terraria Doesn't Have a Server Log -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh diff --git a/TowerUnite/tuserver b/TowerUnite/tuserver deleted file mode 100644 index eb356d6fd..000000000 --- a/TowerUnite/tuserver +++ /dev/null @@ -1,197 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 Daniel Gibbs -# Purpose: Tower Unite | Server Management Script -# Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors -# Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki -# Website: https://gameservermanagers.com - -# Debugging -if [ -f ".dev-debug" ]; then - exec 5>dev-debug.log - BASH_XTRACEFD="5" - set -x -fi - -version="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -port="7777" -queryport="27015" -ip="0.0.0.0" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="-log -MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -TowerServerINI=${servicename}.ini" -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="439660" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - -## LinuxGSM Server Details -# Do not edit -gamename="Tower Unite" -engine="unreal4" - -## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers -servicename="tu-server" - -#### Directories #### -# Edit with care - -## Work Directories -rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" -selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -lockselfname=".${servicename}.lock" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/Tower" -executabledir="${systemdir}/Binaries/Linux" -executable="./TowerServer-Linux-Shipping" -servercfgdir="${systemdir}/Binaries/Linux" -servercfg="${servicename}.ini" -servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="TowerServer.ini" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${systemdir}/Saved/Logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/UnrealTournament/utserver b/UnrealTournament/utserver deleted file mode 100644 index 055f689bc..000000000 --- a/UnrealTournament/utserver +++ /dev/null @@ -1,188 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -# For CTF: defaultmap="CTF-Face" gametype="CTF" -defaultmap="DM-Underland" -gametype="DM" -timelimit="10" -ip="0.0.0.0" -port="7777" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="UnrealTournament ${defaultmap}?Game=${gametype}?TimeLimit=${timelimit} -port=${port}" -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### 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" -engine="unreal4" - -## 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" -lgsmdir="${rootdir}/lgsm" -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" -servercfg="Game.ini" -servercfgdir="${systemdir}/UnrealTournament/Saved/Config/LinuxServer" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${filesdir}/Logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/UnrealTournament2004/ut2k4server b/UnrealTournament2004/ut2k4server deleted file mode 100644 index 760efbf53..000000000 --- a/UnrealTournament2004/ut2k4server +++ /dev/null @@ -1,188 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## 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 -fn_parms(){ -parms="server ${defaultmap}?game=XGame.xDeathMatch -nohomedir ini=${servercfg} log=${gamelog}" -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### 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" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/System" -executabledir="${systemdir}" -executable="./ucc-bin" -servercfg="${servicename}.ini" -servercfgdefault="UT2004.ini" -servercfgdir="${systemdir}" -servercfgfullpath="${servercfgdir}/${servercfg}" -compressedmapsdir="${rootdir}/Maps-Compressed" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${rootdir}/log/server" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -gamelog="${gamelogdir}/${servicename}-game.log" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" -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(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/UnrealTournament3/ut3server b/UnrealTournament3/ut3server deleted file mode 100644 index 369b7e643..000000000 --- a/UnrealTournament3/ut3server +++ /dev/null @@ -1,199 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -ip="0.0.0.0" -port="7777" -queryport="25300" -defaultmap="VCTF-Suspense" -game="UTGameContent.UTVehicleCTFGame_Content" -mutators="" #"UTGame.UTMutator_Instagib,UTGame.UTMutator_LowGrav" -isdedicated="true" -islanmatch="false" -usesstats="false" -shouldadvertise="true" -pureserver="1" -allowjoininprogress="true" -maxplayers="32" - -## 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}" -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### 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 3" -engine="unreal3" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}" -executabledir="${systemdir}/Binaries" -executable="./ut3" -servercfg="${servicename}.ini" -servercfgdefault="UTGame.ini" -servercfgdir="${systemdir}/UTGame/Config" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${rootdir}/log/server" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -gamelog="${gamelogdir}/${servicename}-game.log" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" -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(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/UnrealTournament99/ut99server b/UnrealTournament99/ut99server deleted file mode 100644 index e1fa68fb3..000000000 --- a/UnrealTournament99/ut99server +++ /dev/null @@ -1,186 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## 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 -fn_parms(){ -parms="server ${defaultmap}.unr ini=${servercfgfullpath}" -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### 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 99" -engine="unreal" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}/System" -executabledir="${systemdir}" -executable="./ucc-bin" -servercfg="${servicename}.ini" -servercfgdefault="Default.ini" -servercfgdir="${systemdir}" -servercfgfullpath="${servercfgdir}/${servercfg}" -compressedmapsdir="${rootdir}/Maps-Compressed" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${filesdir}/Logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/WolfensteinEnemyTerritory/wetserver b/WolfensteinEnemyTerritory/wetserver deleted file mode 100644 index 22ef30bd0..000000000 --- a/WolfensteinEnemyTerritory/wetserver +++ /dev/null @@ -1,184 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2017 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="170305" - -########################## -######## Settings ######## -########################## - -#### Server Settings #### - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ - parms="+set net_strict 1 +set fs_homepath ${filesdir} +exec ${servercfg}" -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## 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="Wolfenstein: Enemy Territory" -engine="idtech3" - -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}" -executabledir="${systemdir}" -executable="./etded" -servercfg="${servicename}.cfg" -servercfgdefault="server.cfg" -servercfgdir="${systemdir}/etmain" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${filesdir}/Logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh \ No newline at end of file diff --git a/TeamSpeak3/ts3server b/lgsminstall similarity index 56% rename from TeamSpeak3/ts3server rename to lgsminstall index f5a39f220..773aa60af 100644 --- a/TeamSpeak3/ts3server +++ b/lgsminstall @@ -2,7 +2,7 @@ # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs # License: MIT License, Copyright (c) 2017 Daniel Gibbs -# Purpose: TeamSpeak 3 | Server Management Script +# 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 @@ -15,90 +15,62 @@ if [ -f ".dev-debug" ]; then fi version="170305" - -########################## -######## Settings ######## -########################## - -## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -# Edit serverfiles/ts3-server.ini after installation - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### +sname="core" +rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" +selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" +servicename="${selfname}" ## Github Branch Select # Allows for the use of different function files # from a different repo and/or branch. githubuser="GameServerManagers" githubrepo="LinuxGSM" -githubbranch="master" +githubbranch="config" -## LinuxGSM Server Details -# Do not edit -gamename="TeamSpeak 3" -servername="TeamSpeak 3 Server" +source lgsm/config/_default.cfg +source lgsm/config/common.cfg +source lgsm/config/${servicename.cfg + +# LinuxGSM installer +if [ "${sname}" == "core" ]; then + userinput=$1 + if [ -z "${userinput}" ]; then + userinput="empty" + fi + serverslist=$(grep "${userinput}" lgsm/data/serverlist.csv|awk -F "," '{print $2}') + echo "USERINPUT: $userinput" + echo "SERVERLIST: $serverslist" + if [ "${userinput}" == "${serverslist}" ]; then + echo "installing" + sname=$(grep $userinput lgsm/data/serverlist.csv|awk -F "," '{print $1}') + servername=$(grep $userinput lgsm/data/serverlist.csv|awk -F "," '{print $2}') + if [ -e "${servername}" ]; then + i=2 + while [ -e "$servername-$i" ] ; do + let i++ + done + servername="${servername}-$i" + fi + cp "${selfname}" "${servername}" + sed -i -e "s/sname=\"core\"/sname=\"${sname}\"/g" "${servername}" + exit + elif [ "$userinput" == "list" ]; then + { + awk -F "," '{print $2 "\t" $3}' "lgsm/data/serverlist.csv" + } | column -s $'\t' -t + exit + else + echo "Usage: ./${selfname} list" + echo "For a complete list of available servers" + echo "" + echo "Usage: ./${selfname} [servername]" + echo "To install a server" + exit + fi +fi -## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers -servicename="ts3-server" -#### Directories #### -# Edit with care -## Work Directories -rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" -selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -lockselfname=".${servicename}.lock" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - -## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" -executable="./ts3server_startscript.sh" -servercfg="${servicename}.ini" -servercfgdefault="ts3server.ini" -servercfgdir="${filesdir}" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${rootdir}/backups" - -## Logging Directories -gamelogdir="${filesdir}/logs" -scriptlogdir="${rootdir}/log/script" -scriptlog="${scriptlogdir}/${servicename}-script.log" -emaillog="${scriptlogdir}/${servicename}-email.log" - -## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" ######################## ######## Script ######## @@ -173,5 +145,8 @@ fi core_dl.sh core_functions.sh + + + getopt=$1 -core_getopt.sh \ No newline at end of file +core_getopt.sh From fb21909b0563bd0f33b2bd99bfd204415f78a7f3 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 8 Apr 2017 23:14:10 +0100 Subject: [PATCH 002/216] Adding the new files for testing --- lgsm/config/common-template.cfg | 5 ++ lgsm/config/csgoserver/_default.cfg | 119 ++++++++++++++++++++++++++++ lgsm/config/instance-template.cfg | 5 ++ lgsm/data/serverlist.csv | 68 ++++++++++++++++ lgsm/functions/fn_functions | 20 ----- lgsm/functions/fn_getopt | 15 ---- lgsm/functions/fn_update_functions | 21 ----- lgsminstall => lgsminstall.sh | 0 8 files changed, 197 insertions(+), 56 deletions(-) create mode 100644 lgsm/config/common-template.cfg create mode 100644 lgsm/config/csgoserver/_default.cfg create mode 100644 lgsm/config/instance-template.cfg create mode 100644 lgsm/data/serverlist.csv delete mode 100644 lgsm/functions/fn_functions delete mode 100644 lgsm/functions/fn_getopt delete mode 100644 lgsm/functions/fn_update_functions rename lgsminstall => lgsminstall.sh (100%) diff --git a/lgsm/config/common-template.cfg b/lgsm/config/common-template.cfg new file mode 100644 index 000000000..ddb1ef233 --- /dev/null +++ b/lgsm/config/common-template.cfg @@ -0,0 +1,5 @@ +################################## +######## Common Settings ######### +################################## +# PLACE GLOBAL SETTINGS HERE +## These settings will apply to all instances diff --git a/lgsm/config/csgoserver/_default.cfg b/lgsm/config/csgoserver/_default.cfg new file mode 100644 index 000000000..74c1f69e8 --- /dev/null +++ b/lgsm/config/csgoserver/_default.cfg @@ -0,0 +1,119 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +# https://developer.valvesoftware.com/wiki/Counter-Strike:_Global_Offensive_Dedicated_Servers#Starting_the_Server +# [Game Modes] gametype gamemode +# Arms Race 1 0 +# Classic Casual 0 0 +# Classic Competitive 0 1 +# Demolition 1 1 +# Deathmatch 1 2 +gametype="0" +gamemode="0" +defaultmap="de_mirage" +mapgroup="mg_active" +maxplayers="16" +tickrate="64" +port="27015" +sourcetvport="27016" +clientport="27017" +ip="0.0.0.0" + +## Required: Game Server Login Token +# GSLT is required for running a public server. +# More info: https://gameservermanagers.com/gslt +gslt="" + +## Optional: Workshop Parameters +# https://developer.valvesoftware.com/wiki/CSGO_Workshop_For_Server_Operators +# To get an authkey visit - http://steamcommunity.com/dev/apikey +authkey="" +ws_collection_id="" +ws_start_map="" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="-game 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}" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="740" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Counter-Strike: Global Offensive" +engine="source" + +#### Directories #### +# Edit with care + +## Work Directories + +lockselfname=".${servicename}.lock" +lgsmdir="${rootdir}/lgsm" +functionsdir="${lgsmdir}/functions" +libdir="${lgsmdir}/lib" +tmpdir="${lgsmdir}/tmp" +filesdir="${rootdir}/serverfiles" + +## Server Specific Directories +systemdir="${filesdir}/csgo" +executabledir="${filesdir}" +executable="./srcds_run" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}/cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +gamelogdir="${systemdir}/logs" +scriptlogdir="${rootdir}/log/script" +consolelogdir="${rootdir}/log/console" +scriptlog="${scriptlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${scriptlogdir}/${servicename}-email.log" + +## Logs Naming +scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config/instance-template.cfg b/lgsm/config/instance-template.cfg new file mode 100644 index 000000000..69646e3a7 --- /dev/null +++ b/lgsm/config/instance-template.cfg @@ -0,0 +1,5 @@ +################################## +######## Instance Settings ######## +################################## +# PLACE INSTANCE SETTINGS HERE +## These settings will apply to a specific instance \ No newline at end of file diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv new file mode 100644 index 000000000..d9a27de49 --- /dev/null +++ b/lgsm/data/serverlist.csv @@ -0,0 +1,68 @@ +arma3,arma3server,ARMA 3 +sdtd,sdtdserver,7 Days to Die +ark,arkserver,ARK: Survival Evolved +bo,boserver,Ballistic Overkill +bf1942,bf1942server,Battlefield 1942 +bmdm,bmdmserver,Black Mesa: Deathmatch +bs,bsserver,Blade Symphony +bb2,bb2server,BrainBread 2 +cod,codserver,Call of Duty +cod2,cod2server,Call of Duty 2 +cod4,cod4server,Call of Duty 4 +coduo,coduoserver,Call of Duty: United Offensive +codwaw,codwawserver,Call of Duty: World at War +cc,ccserver,Codename CURE +cs,csserver,Counter-Strike 1.6 +cscz,csczserver,Counter-Strike: Condition Zero +csgo,csgoserver,Counter-Strike: Global Offensive +css,cssserver,Counter-Strike: Source +dod,dodserver,Day of Defeat +dods,dodsserver,Day of Defeat: Source +doi,doiserver,Day of Infamy +dmc,dmcserver,Deathmatch Classic +dst,dstserver,Don't Starve Together +dab,dabserver,Double Action: Boogaloo +em,emserver,Empires Mod +fctr,fctrserver,Factorio +fof,fofserver,Fistful of Frags +gmod,gmodserver,Garrys Mod +ges,gesserver,GoldenEye: Source +hl2dm,hl2dmserver,Half-Life 2: Deathmatch +hldms,hldmsserver,Half-Life Deathmatch: Source +hldm,hldmserver,Half-Life: Deathmatch +hw,hwserver,Hurtworld +ins,insserver,Insurgency +jc2,jc2server,Just Cause 2 +kf,kfserver,Killing Floor +l4d,l4dserver,Left 4 Dead +l4d2,l4d2server,Left 4 Dead 2 +mc,mcserver,Minecraft +mta,mtaserver,Multi Theft Auto +mumble,mumbleserver,Mumble +ns2,ns2server,Natural Selection 2 +nmrih,nmrihserver,No More Room in Hell +ns2c,ns2cserver,NS2: Combat +opfor,opforserver,Opposing Force +pvkii,pvkiiserver,"Pirates, Vikings, & Knights II" +pc,pcserver,Project Cars +pz,pzserver,Project Zomboid +q2,q2server,Quake 2 +q3,q3server,Quake 3: Arena +ql,qlserver,Quake Live +qw,qwserver,Quake World +ro,roserver,Red Orchestra: Ostfront 41-45 +ricochet,ricochetserver,Ricochet +rust,rustserver,Rust +ss3,ss3server,Serious Sam 3: BFE +sb,sbserver,Starbound +sven,svenserver,Sven Co-op +tf2,tf2server,Team Fortress 2 +tfc,tfcserver,Team Fortress Classic +ts3,ts3server,Teamspeak 3 +tw,twserver,Teeworlds +terraria,terrariaserver,Terraria +tu,tuserver,Tower Unite +ut2k4,ut2k4server,Unreal Tournament 2004 +ut3,ut3server,Unreal Tournament 3 +ut99,ut99server,Unreal Tournament 99 +wet,wetserver,Wolfenstein: Enemy Territory diff --git a/lgsm/functions/fn_functions b/lgsm/functions/fn_functions deleted file mode 100644 index ca45dd740..000000000 --- a/lgsm/functions/fn_functions +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -# LinuxGSM fn_functions function -# Author: Daniel Gibbs -# Website: https://gameservermanagers.com -lgsm_version="211016" - -# Description: Redirects to new core_functions.sh - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_runfunction -} - -core_getopt.sh(){ -functionfile="${FUNCNAME}" -fn_runfunction -} - -core_functions.sh \ No newline at end of file diff --git a/lgsm/functions/fn_getopt b/lgsm/functions/fn_getopt deleted file mode 100644 index e15a29201..000000000 --- a/lgsm/functions/fn_getopt +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -# LinuxGSM fn_getopt function -# Author: Daniel Gibbs -# Website: https://gameservermanagers.com -lgsm_version="211016" - -# Description: Redirect to new core_getopt.sh - -core_getopt.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_runfunction -} - -core_getopt.sh \ No newline at end of file diff --git a/lgsm/functions/fn_update_functions b/lgsm/functions/fn_update_functions deleted file mode 100644 index 7dbde6694..000000000 --- a/lgsm/functions/fn_update_functions +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -# LinuxGSM fn_update_functions function -# Author: Daniel Gibbs -# Website: https://gameservermanagers.com -lgsm_version="211016" - -# Description: LEGACY FUNCTION Deletes the functions dir to allow re-downloading of functions from GitHub. - -fn_print_dots "Updating functions" -sleep 1 -echo -ne "\n" -rm -rfv "${rootdir}/functions/"* -exitcode=$? -if [ "${exitcode}" == "0" ]; then - fn_print_ok "Updating functions" - fn_script_log "Success! Updating functions" -else - fn_print_fail "Updating functions" - fn_script_log "Failure! Updating functions" -fi -echo -ne "\n" \ No newline at end of file diff --git a/lgsminstall b/lgsminstall.sh similarity index 100% rename from lgsminstall rename to lgsminstall.sh From 6c912930767029e56ca218ab0a1683cdbc3df6d4 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 8 Apr 2017 23:16:16 +0100 Subject: [PATCH 003/216] added moved cfg files --- lgsminstall.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lgsminstall.sh b/lgsminstall.sh index 773aa60af..5b953a53a 100644 --- a/lgsminstall.sh +++ b/lgsminstall.sh @@ -27,10 +27,6 @@ githubuser="GameServerManagers" githubrepo="LinuxGSM" githubbranch="config" -source lgsm/config/_default.cfg -source lgsm/config/common.cfg -source lgsm/config/${servicename.cfg - # LinuxGSM installer if [ "${sname}" == "core" ]; then userinput=$1 @@ -69,7 +65,9 @@ if [ "${sname}" == "core" ]; then fi fi - +source lgsm/config/_default.cfg +source lgsm/config/common.cfg +source lgsm/config/${servicename}.cfg ######################## From 9437b6c2b460d22e02c103c542cba9233a7f453e Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 9 Apr 2017 15:06:44 +0100 Subject: [PATCH 004/216] Config downloading now works --- lgsminstall.sh | 197 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 140 insertions(+), 57 deletions(-) diff --git a/lgsminstall.sh b/lgsminstall.sh index 5b953a53a..b3d882db3 100644 --- a/lgsminstall.sh +++ b/lgsminstall.sh @@ -15,31 +15,45 @@ if [ -f ".dev-debug" ]; then fi version="170305" -sname="core" rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" +lgsmdir="${rootdir}/lgsm" +tmpdir="${lgsmdir}/tmp" servicename="${selfname}" +shortname="core" +shortname="core" +shortname="core" +configdir="${lgsmdir}/config" +gameconfigdir="${configdir}/${servername}" ## Github Branch Select # Allows for the use of different function files # from a different repo and/or branch. githubuser="GameServerManagers" githubrepo="LinuxGSM" -githubbranch="config" +githubbranch="feature/config" + +## Github Branch Select +# Allows for the use of different function files +# from a different repo and/or branch. +githubuser="GameServerManagers" +githubrepo="LinuxGSM" +githubbranch="feature/config" # LinuxGSM installer -if [ "${sname}" == "core" ]; then +if [ "${shortname}" == "core" ]; then userinput=$1 if [ -z "${userinput}" ]; then userinput="empty" fi - serverslist=$(grep "${userinput}" lgsm/data/serverlist.csv|awk -F "," '{print $2}') + serverslist=$(grep "${userinput}" <(curl -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/serverlist.csv")|awk -F "," '{print $2}') echo "USERINPUT: $userinput" echo "SERVERLIST: $serverslist" if [ "${userinput}" == "${serverslist}" ]; then echo "installing" - sname=$(grep $userinput lgsm/data/serverlist.csv|awk -F "," '{print $1}') - servername=$(grep $userinput lgsm/data/serverlist.csv|awk -F "," '{print $2}') + shortname=$(grep ${userinput} <(curl -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/serverlist.csv")|awk -F "," '{print $1}') + servername=$(grep ${userinput} <(curl -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/serverlist.csv")|awk -F "," '{print $2}') + gamename=$(grep ${userinput} <(curl -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/serverlist.csv")|awk -F "," '{print $3}') if [ -e "${servername}" ]; then i=2 while [ -e "$servername-$i" ] ; do @@ -48,11 +62,13 @@ if [ "${sname}" == "core" ]; then servername="${servername}-$i" fi cp "${selfname}" "${servername}" - sed -i -e "s/sname=\"core\"/sname=\"${sname}\"/g" "${servername}" + sed -i -e "s/shortname=\"core\"/shortname=\"${shortname}\"/g" "${servername}" + sed -i -e "s/servername=\"core\"/servername=\"${servername}\"/g" "${servername}" + sed -i -e "s/gamename=\"core\"/gamename=\"${gamename}\"/g" "${gamename}" exit - elif [ "$userinput" == "list" ]; then + elif [ "${userinput}" == "list" ]; then { - awk -F "," '{print $2 "\t" $3}' "lgsm/data/serverlist.csv" + awk -F "," '{print $2 "\t" $3}' <(curl -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/serverlist.csv") } | column -s $'\t' -t exit else @@ -65,74 +81,141 @@ if [ "${sname}" == "core" ]; then fi fi -source lgsm/config/_default.cfg -source lgsm/config/common.cfg -source lgsm/config/${servicename}.cfg - - -######################## -######## Script ######## -###### Do not edit ##### -######################## +# Bootstrap -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break +# Fetches bootstrap files (configs and core functions) +fn_boostrap_fetch_file(){ + fileurl="${1}" + filedir="${2}" + filename="${3}" + executecmd="${4:-0}" + run="${5:-0}" + force="${6:-0}" + # If the file is missing, then download + if [ ! -f "${filedir}/${filename}" ]; then + if [ ! -d "${filedir}" ]; then + mkdir -p "${filedir}" fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then + # Check curl exists and use available path + curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" + for curlcmd in ${curlpaths} + do + if [ -x "${curlcmd}" ]; then + break + fi + done + # If curl exists download file + if [ "$(basename ${curlcmd})" == "curl" ]; then + # trap to remove part downloaded files + echo -ne " fetching ${filename}...\c" + curlcmd=$(${curlcmd} -s --fail -L -o "${filedir}/${filename}" "${fileurl}" 2>&1) + local exitcode=$? + if [ ${exitcode} -ne 0 ]; then + echo -e "\e[0;31mFAIL\e[0m\n" + echo -e "${fileurl}" | tee -a "${scriptlog}" + echo "${curlcmd}" | tee -a "${scriptlog}" + exit 1 + else + echo -e "\e[0;32mOK\e[0m" + fi + else echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" + echo "Curl is not installed!" + echo -e "" exit 1 - else - echo -e "\e[0;32mOK\e[0m" fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 + # make file executecmd if executecmd is set + if [ "${executecmd}" == "executecmd" ]; then + chmod +x "${filedir}/${filename}" + fi fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" + + if [ -f "${filedir}/${filename}" ]; then + # run file if run is set + if [ "${run}" == "run" ]; then + source "${filedir}/${filename}" + fi + fi +} + +fn_boostrap_fetch_function(){ + github_file_url_dir="lgsm/functions" # github dir containing the file + github_file_url_name="${functionfile}" # name of the github file + githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + fileurl="${githuburl}" + filedir="${functionsdir}" + filename="${github_file_url_name}" + executecmd="executecmd" + run="run" + force="noforce" + md5="nomd5" + fn_boostrap_fetch_file "${fileurl}" "${filedir}" "${filename}" "${executecmd}" "${run}" "${force}" "${md5}" } +fn_boostrap_fetch_config(){ + github_file_url_dir="${1}" # github dir containing the file + github_file_url_name="${2}" # name of the github file + githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + fileurl="${githuburl}" + filedir="${3}" + filename="${4}" + executecmd="noexecutecmd" + run="norun" + force="noforce" + md5="nomd5" + fn_boostrap_fetch_file "${fileurl}" "${filedir}" "${filename}" "${executecmd}" "${run}" "${force}" "${md5}" +} + +# Load the default config. If missing download it. If changed reload it. +if [ ! -f "${tmpdir}/config/${servername}/_default.cfg" ];then + fn_boostrap_fetch_config "lgsm/config/${servername}" "_default.cfg" "${tmpdir}/config/${servername}" "_default.cfg" "noexecutecmd" "norun" "noforce" "nomd5" +fi +if [ ! -f "${gameconfigdir}/_default.cfg" ];then + echo "hello" + cp "${tmpdir}/config/${servername}/_default.cfg" "${gameconfigdir}/_default.cfg" +else + function_file_diff=$(diff -q ${tmpdir}/config/${servername}/_default.cfg ${gameconfigdir}/_default.cfg) + if [ "${function_file_diff}" != "" ]; then + echo "config different onverwriting" + cp "${tmpdir}/config/${servername}/_default.cfg" "${gameconfigdir}/_default.cfg" + fi + source lgsm/config/${servername}/_default.cfg +fi + +if [ ! -f "${gameconfigdir}/common.cfg" ];then + fn_boostrap_fetch_config "lgsm/config" "common-template.cfg" "${lgsmdir}/config/${servername}" "common.cfg" "${executecmd}" "noexecutecmd" "norun" "noforce" "nomd5" + source lgsm/config/${servername}/common.cfg +else + source lgsm/config/${servername}/common.cfg +fi + +if [ ! -f "${gameconfigdir}/${servicename}.cfg" ];then + fn_boostrap_fetch_config "lgsm/config" "instance-template.cfg" "${lgsmdir}/config/${servername}" "${servicename}.cfg" "noexecutecmd" "norun" "noforce" "nomd5" + source lgsm/config/${servername}/${servicename}.cfg +else + source lgsm/config/${servername}/${servicename}.cfg +fi + +######################## +######## Script ######## +###### Do not edit ##### +######################## + core_dl.sh(){ # Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" -fn_fetch_core_dl +fn_boostrap_fetch_function } core_functions.sh(){ # Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" -fn_fetch_core_dl +fn_boostrap_fetch_function } # 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 + if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/exit 1" ]; then echo "[ FAIL ] Do NOT run this script as root!" exit 1 else From 9dd8a547d79e9986aa916ee1d7993ee30cbf9656 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 9 Apr 2017 16:26:19 +0100 Subject: [PATCH 005/216] further improvements --- lgsm/config/csgoserver/_default.cfg | 9 --------- lgsminstall.sh | 24 ++++++++++++------------ 2 files changed, 12 insertions(+), 21 deletions(-) diff --git a/lgsm/config/csgoserver/_default.cfg b/lgsm/config/csgoserver/_default.cfg index 74c1f69e8..bb4b5bbba 100644 --- a/lgsm/config/csgoserver/_default.cfg +++ b/lgsm/config/csgoserver/_default.cfg @@ -85,15 +85,6 @@ engine="source" #### Directories #### # Edit with care -## Work Directories - -lockselfname=".${servicename}.lock" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - ## Server Specific Directories systemdir="${filesdir}/csgo" executabledir="${filesdir}" diff --git a/lgsminstall.sh b/lgsminstall.sh index b3d882db3..e9391ecb6 100644 --- a/lgsminstall.sh +++ b/lgsminstall.sh @@ -40,6 +40,18 @@ githubuser="GameServerManagers" githubrepo="LinuxGSM" githubbranch="feature/config" + +# 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}/exit 1" ]; then + echo "[ FAIL ] Do NOT run this script as root!" + exit 1 + else + core_functions.sh + check_root.sh + fi +fi + # LinuxGSM installer if [ "${shortname}" == "core" ]; then userinput=$1 @@ -213,21 +225,9 @@ functionfile="${FUNCNAME}" fn_boostrap_fetch_function } -# 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}/exit 1" ]; 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 From 6fa873ba58ff22f275b81e2893e7f8ff5a6df2d8 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 10 Apr 2017 20:47:34 +0100 Subject: [PATCH 006/216] corrected PVKII --- lgsm/data/serverlist.csv | 2 +- lgsminstall.sh | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index d9a27de49..d21279969 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -43,7 +43,7 @@ ns2,ns2server,Natural Selection 2 nmrih,nmrihserver,No More Room in Hell ns2c,ns2cserver,NS2: Combat opfor,opforserver,Opposing Force -pvkii,pvkiiserver,"Pirates, Vikings, & Knights II" +pvkii,pvkiiserver,Pirates, Vikings, & Knights II pc,pcserver,Project Cars pz,pzserver,Project Zomboid q2,q2server,Quake 2 diff --git a/lgsminstall.sh b/lgsminstall.sh index e9391ecb6..1eebf2c3a 100644 --- a/lgsminstall.sh +++ b/lgsminstall.sh @@ -33,14 +33,6 @@ githubuser="GameServerManagers" githubrepo="LinuxGSM" githubbranch="feature/config" -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="feature/config" - - # 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}/exit 1" ]; then From 8d78b19fbcd959c475a53057dcfbd648851433c2 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 10 Apr 2017 22:09:21 +0100 Subject: [PATCH 007/216] Further work completed. Working on menus currently --- lgsminstall.sh | 184 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 142 insertions(+), 42 deletions(-) diff --git a/lgsminstall.sh b/lgsminstall.sh index 1eebf2c3a..1c0b6d08f 100644 --- a/lgsminstall.sh +++ b/lgsminstall.sh @@ -17,12 +17,16 @@ fi version="170305" rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -lgsmdir="${rootdir}/lgsm" -tmpdir="${lgsmdir}/tmp" servicename="${selfname}" shortname="core" -shortname="core" -shortname="core" +servername="core" +gamename="core" +lockselfname=".${servicename}.lock" +lgsmdir="${rootdir}/lgsm" +functionsdir="${lgsmdir}/functions" +libdir="${lgsmdir}/lib" +tmpdir="${lgsmdir}/tmp" +filesdir="${rootdir}/serverfiles" configdir="${lgsmdir}/config" gameconfigdir="${configdir}/${servername}" @@ -33,55 +37,141 @@ githubuser="GameServerManagers" githubrepo="LinuxGSM" githubbranch="feature/config" -# 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}/exit 1" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 + +fn_print_center() { + columns="$(tput cols)" + line="$@" + printf "%*s\n" $(( (${#line} + columns) / 2)) "$line" +} +# Print horizontal line +fn_print_horizontal(){ + char="${1:-=}" + printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' "${char}" +} + +# Display simple Bash menu +fn_menu_bash() { + local resultvar=$1 + title=$2 + caption=$3 + options=$4 + fn_print_horizontal + fn_print_center $title + fn_print_center $caption + fn_print_horizontal + menu_options=() + while read -r line || [[ -n "$line" ]]; do + var=$(echo $line | awk -F "," '{print $2 " - " $3}') + menu_options+=( "${var}" ) + done < $options + menu_options+=( "Cancel" ) + select option in "${menu_options[@]}"; do + if [ -n "${option}" ] && [ "${option}" != "Cancel" ]; then + eval "$resultvar=\"${option/%\ */}\"" + fi + break + done +} + +fn_menu() { + local resultvar=$1 + local selection="" + title=$2 + caption=$3 + options=$4 + # If this is a list of options as a string, dump it to a file so we can process it + if [ ! -e "${options}" ]; then + echo -ne "${options}\n" > "${cachedir}/menu.options" + options="${cachedir}/menu.options" + fi + + # Get menu command +# for menucmd in whiptail dialog bash; do +# if [ -x $(which $menucmd) ]; then +# menucmd=$(which $menucmd) +# break +# fi +# done + case "$(basename $menucmd)" in + whiptail|dialog) + fn_menu_whiptail "${menucmd}" selection "${title}" "${caption}" "${options}" 40 80 30 + ;; + *) + fn_menu_bash selection "${title}" "${caption}" "${options}" + ;; + esac + eval "$resultvar=\"${selection}\"" + echo "$resultvar" +} + +fn_serverlist(){ + IFS="," + if [ -f "lgsm/data/serverlist.csv" ]; then + serverlist="lgsm/data/serverlist.csv" + server_info_array=($(awk '{ print $2 }' "${serverlist}" | grep "${userinput}" )) else - core_functions.sh - check_root.sh + serverlist="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/serverlist.csv" + server_info_array=($(awk '{ print $2 }' <(curl -s "${serverlist}") | grep "${userinput}")) fi -fi + shortname="${server_info_array[0]}" + servername="${server_info_array[1]}" + gamename="${server_info_array[2]}" + echo "$server_info_array" + echo "shortname: $shortname" + echo "servername: $servername" + echo "gamename: $gamename" +} + +fn_install_getopt(){ + userinput="empty" + echo "Usage: $0 [option]" + echo -e "" + echo "Installer - Linux Game Server Manager - Version ${version}" + echo "https://gameservermanagers.com" + echo -e "" + echo -e "Commands" + echo -e "install |Select server to install." + echo -e "servername |e.g $0 csgoserver. Enter the required servername will install it." + echo -e "list |List all servers available for install." + exit +} # LinuxGSM installer if [ "${shortname}" == "core" ]; then userinput=$1 if [ -z "${userinput}" ]; then - userinput="empty" - fi - serverslist=$(grep "${userinput}" <(curl -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/serverlist.csv")|awk -F "," '{print $2}') - echo "USERINPUT: $userinput" - echo "SERVERLIST: $serverslist" - if [ "${userinput}" == "${serverslist}" ]; then - echo "installing" - shortname=$(grep ${userinput} <(curl -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/serverlist.csv")|awk -F "," '{print $1}') - servername=$(grep ${userinput} <(curl -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/serverlist.csv")|awk -F "," '{print $2}') - gamename=$(grep ${userinput} <(curl -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/serverlist.csv")|awk -F "," '{print $3}') - if [ -e "${servername}" ]; then - i=2 - while [ -e "$servername-$i" ] ; do - let i++ - done - servername="${servername}-$i" - fi - cp "${selfname}" "${servername}" - sed -i -e "s/shortname=\"core\"/shortname=\"${shortname}\"/g" "${servername}" - sed -i -e "s/servername=\"core\"/servername=\"${servername}\"/g" "${servername}" - sed -i -e "s/gamename=\"core\"/gamename=\"${gamename}\"/g" "${gamename}" - exit + fn_install_getopt elif [ "${userinput}" == "list" ]; then + fn_serverlist { - awk -F "," '{print $2 "\t" $3}' <(curl -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/serverlist.csv") - } | column -s $'\t' -t + if [ -f "lgsm/data/serverlist.csv" ]; then + awk -F "," '{print $2 "\t" $3}' "${serverlist}" + else + awk -F "," '{print $2 "\t" $3}' <(curl -s "${serverlist}") + fi + } | column -s $'\t' -t | more exit + elif [ "${userinput}" == "install" ]; then + fn_menu result "Linux Game Server Manager" "Select game to install" "lgsm/data/serverlist.csv" else - echo "Usage: ./${selfname} list" - echo "For a complete list of available servers" - echo "" - echo "Usage: ./${selfname} [servername]" - echo "To install a server" - exit + fn_serverlist + if [ "${userinput}" == "${server_info_array[1]}" ]; then + + if [ -e "${servername}" ]; then + i=2 + while [ -e "$servername-$i" ] ; do + let i++ + done + servername="${servername}-$i" + fi + cp "${selfname}" "${servername}" + sed -i -e "s/shortname=\"core\"/shortname=\"${shortname}\"/g" "${servername}" + sed -i -e "s/servername=\"core\"/servername=\"${servername}\"/g" "${servername}" + sed -i -e "s/gamename=\"core\"/gamename=\"${gamename}\"/g" "${servername}" + exit + else + fn_install_getopt + fi fi fi @@ -217,6 +307,16 @@ functionfile="${FUNCNAME}" fn_boostrap_fetch_function } +# 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}/exit 1" ]; 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 From 6da1a1a4c84ec8bbe2915822b297ae7576d042d6 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 12 Apr 2017 23:44:09 +0100 Subject: [PATCH 008/216] dev Dev update --- lgsminstall.sh | 388 +++++++++++++++++++++++++++---------------------- 1 file changed, 216 insertions(+), 172 deletions(-) diff --git a/lgsminstall.sh b/lgsminstall.sh index 1c0b6d08f..0999334fe 100644 --- a/lgsminstall.sh +++ b/lgsminstall.sh @@ -37,144 +37,6 @@ githubuser="GameServerManagers" githubrepo="LinuxGSM" githubbranch="feature/config" - -fn_print_center() { - columns="$(tput cols)" - line="$@" - printf "%*s\n" $(( (${#line} + columns) / 2)) "$line" -} -# Print horizontal line -fn_print_horizontal(){ - char="${1:-=}" - printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' "${char}" -} - -# Display simple Bash menu -fn_menu_bash() { - local resultvar=$1 - title=$2 - caption=$3 - options=$4 - fn_print_horizontal - fn_print_center $title - fn_print_center $caption - fn_print_horizontal - menu_options=() - while read -r line || [[ -n "$line" ]]; do - var=$(echo $line | awk -F "," '{print $2 " - " $3}') - menu_options+=( "${var}" ) - done < $options - menu_options+=( "Cancel" ) - select option in "${menu_options[@]}"; do - if [ -n "${option}" ] && [ "${option}" != "Cancel" ]; then - eval "$resultvar=\"${option/%\ */}\"" - fi - break - done -} - -fn_menu() { - local resultvar=$1 - local selection="" - title=$2 - caption=$3 - options=$4 - # If this is a list of options as a string, dump it to a file so we can process it - if [ ! -e "${options}" ]; then - echo -ne "${options}\n" > "${cachedir}/menu.options" - options="${cachedir}/menu.options" - fi - - # Get menu command -# for menucmd in whiptail dialog bash; do -# if [ -x $(which $menucmd) ]; then -# menucmd=$(which $menucmd) -# break -# fi -# done - case "$(basename $menucmd)" in - whiptail|dialog) - fn_menu_whiptail "${menucmd}" selection "${title}" "${caption}" "${options}" 40 80 30 - ;; - *) - fn_menu_bash selection "${title}" "${caption}" "${options}" - ;; - esac - eval "$resultvar=\"${selection}\"" - echo "$resultvar" -} - -fn_serverlist(){ - IFS="," - if [ -f "lgsm/data/serverlist.csv" ]; then - serverlist="lgsm/data/serverlist.csv" - server_info_array=($(awk '{ print $2 }' "${serverlist}" | grep "${userinput}" )) - else - serverlist="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/serverlist.csv" - server_info_array=($(awk '{ print $2 }' <(curl -s "${serverlist}") | grep "${userinput}")) - fi - shortname="${server_info_array[0]}" - servername="${server_info_array[1]}" - gamename="${server_info_array[2]}" - echo "$server_info_array" - echo "shortname: $shortname" - echo "servername: $servername" - echo "gamename: $gamename" -} - -fn_install_getopt(){ - userinput="empty" - echo "Usage: $0 [option]" - echo -e "" - echo "Installer - Linux Game Server Manager - Version ${version}" - echo "https://gameservermanagers.com" - echo -e "" - echo -e "Commands" - echo -e "install |Select server to install." - echo -e "servername |e.g $0 csgoserver. Enter the required servername will install it." - echo -e "list |List all servers available for install." - exit -} - -# LinuxGSM installer -if [ "${shortname}" == "core" ]; then - userinput=$1 - if [ -z "${userinput}" ]; then - fn_install_getopt - elif [ "${userinput}" == "list" ]; then - fn_serverlist - { - if [ -f "lgsm/data/serverlist.csv" ]; then - awk -F "," '{print $2 "\t" $3}' "${serverlist}" - else - awk -F "," '{print $2 "\t" $3}' <(curl -s "${serverlist}") - fi - } | column -s $'\t' -t | more - exit - elif [ "${userinput}" == "install" ]; then - fn_menu result "Linux Game Server Manager" "Select game to install" "lgsm/data/serverlist.csv" - else - fn_serverlist - if [ "${userinput}" == "${server_info_array[1]}" ]; then - - if [ -e "${servername}" ]; then - i=2 - while [ -e "$servername-$i" ] ; do - let i++ - done - servername="${servername}-$i" - fi - cp "${selfname}" "${servername}" - sed -i -e "s/shortname=\"core\"/shortname=\"${shortname}\"/g" "${servername}" - sed -i -e "s/servername=\"core\"/servername=\"${servername}\"/g" "${servername}" - sed -i -e "s/gamename=\"core\"/gamename=\"${gamename}\"/g" "${servername}" - exit - else - fn_install_getopt - fi - fi -fi - # Bootstrap # Fetches bootstrap files (configs and core functions) @@ -260,36 +122,227 @@ fn_boostrap_fetch_config(){ fn_boostrap_fetch_file "${fileurl}" "${filedir}" "${filename}" "${executecmd}" "${run}" "${force}" "${md5}" } -# Load the default config. If missing download it. If changed reload it. -if [ ! -f "${tmpdir}/config/${servername}/_default.cfg" ];then - fn_boostrap_fetch_config "lgsm/config/${servername}" "_default.cfg" "${tmpdir}/config/${servername}" "_default.cfg" "noexecutecmd" "norun" "noforce" "nomd5" -fi -if [ ! -f "${gameconfigdir}/_default.cfg" ];then - echo "hello" - cp "${tmpdir}/config/${servername}/_default.cfg" "${gameconfigdir}/_default.cfg" -else - function_file_diff=$(diff -q ${tmpdir}/config/${servername}/_default.cfg ${gameconfigdir}/_default.cfg) - if [ "${function_file_diff}" != "" ]; then - echo "config different onverwriting" - cp "${tmpdir}/config/${servername}/_default.cfg" "${gameconfigdir}/_default.cfg" +fn_print_center() { + columns="$(tput cols)" + line="$@" + printf "%*s\n" $(( (${#line} + columns) / 2)) "${line}" +} +# Print horizontal line +fn_print_horizontal(){ + char="${1:-=}" + printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' "${char}" +} + +# Bash Menu +fn_install_menu_bash() { + local resultvar=$1 + title=$2 + caption=$3 + options=$4 + fn_print_horizontal + fn_print_center $title + fn_print_center $caption + fn_print_horizontal + menu_options=() + while read -r line || [[ -n "${line}" ]]; do + var=$(echo "${line}" | awk -F "," '{print $2 " - " $3}') + menu_options+=( "${var}" ) + done < $options + menu_options+=( "Cancel" ) + select option in "${menu_options[@]}"; do + if [ -n "${option}" ] && [ "${option}" != "Cancel" ]; then + eval "$resultvar=\"${option/%\ */}\"" + fi + break + done +} + +# Whiptail/Dialog Menu +fn_install_menu_whiptail() { + local menucmd=$1 + local resultvar=$2 + title=$3 + caption=$4 + options=$5 + height=${6:-40} + width=${7:-80} + menuheight=${8:-30} + IFS="," + menu_options=() + while read -r line; do + key=$(echo "${line}" | awk -F "," '{print $3}') + val=$(echo "${line}" | awk -F "," '{print $2}') + menu_options+=( ${val//\"} "${key//\"}" ) + done < $options + OPTION=$(${menucmd} --title "${title}" --menu "${caption}" ${height} ${width} ${menuheight} "${menu_options[@]}" 3>&1 1>&2 2>&3) + if [ $? = 0 ]; then + eval "$resultvar=\"${OPTION}\"" + else + eval "$resultvar=" fi - source lgsm/config/${servername}/_default.cfg -fi +} -if [ ! -f "${gameconfigdir}/common.cfg" ];then - fn_boostrap_fetch_config "lgsm/config" "common-template.cfg" "${lgsmdir}/config/${servername}" "common.cfg" "${executecmd}" "noexecutecmd" "norun" "noforce" "nomd5" - source lgsm/config/${servername}/common.cfg -else - source lgsm/config/${servername}/common.cfg +# Menu selector +fn_install_menu() { + local resultvar=$1 + local selection="" + title=$2 + caption=$3 + options=$4 + # Get menu command + for menucmd in whiptail dialog bash; do + if [ -x $(which ${menucmd}) ]; then + menucmd=$(which ${menucmd}) + break + fi + done + case "$(basename ${menucmd})" in + whiptail|dialog) + fn_install_menu_whiptail "${menucmd}" selection "${title}" "${caption}" "${options}" 40 80 30;; + *) + fn_install_menu_bash selection "${title}" "${caption}" "${options}";; + esac + eval "$resultvar=\"${selection}\"" +} + +# Gets server info from serverlist.csv and puts in to array +fn_server_info(){ + IFS="," + server_info_array=($(grep -a "${userinput}" "${serverlist}")) + shortname="${server_info_array[0]}" # csgo + servername="${server_info_array[1]}" # csgoserver + gamename="${server_info_array[2]}" # Counter Strike: Global Offensive + echo "shortname: $shortname" + echo "servername: $servername" + echo "gamename: $gamename" +} + +fn_install_getopt(){ + userinput="empty" + echo "Usage: $0 [option]" + echo -e "" + echo "Installer - Linux Game Server Managers - Version ${version}" + echo "https://gameservermanagers.com" + echo -e "" + echo -e "Commands" + echo -e "install |Select server to install." + echo -e "servername |e.g $0 csgoserver. Enter the required servername will install it." + echo -e "list |List all servers available for install." + exit +} + +fn_install_file(){ + filename="${servername}" + if [ -e "${filename}" ]; then + i=2 + while [ -e "${filename}-${i}" ] ; do + let i++ + done + filename="${filename}-${i}" + fi + cp -R "${selfname}" "${filename}" + sed -i -e "s/shortname=\"core\"/shortname=\"${shortname}\"/g" "${filename}" + sed -i -e "s/servername=\"core\"/servername=\"${servername}\"/g" "${filename}" + sed -i -e "s/gamename=\"core\"/gamename=\"${gamename}\"/g" "${filename}" + exit +} + +# 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" ]; then + echo "[ FAIL ] Do NOT run this script as root!" + exit 1 + else + core_functions.sh + check_root.sh + fi fi -if [ ! -f "${gameconfigdir}/${servicename}.cfg" ];then - fn_boostrap_fetch_config "lgsm/config" "instance-template.cfg" "${lgsmdir}/config/${servername}" "${servicename}.cfg" "noexecutecmd" "norun" "noforce" "nomd5" - source lgsm/config/${servername}/${servicename}.cfg +# LinuxGSM installer mode +if [ "${shortname}" == "core" ]; then + userinput=$1 + datadir="${lgsmdir}/data" + serverlist="${datadir}/serverlist.csv" + serverlist_tmp="${tmpdir}/data/serverlist.csv" + + # Download the serverlist. This is the complete list of all supported servers. + # Download to tmp dir + fn_boostrap_fetch_config "lgsm/data" "serverlist.csv" "${tmpdir}/data" "serverlist.csv" "noexecutecmd" "norun" "noforce" "nomd5" + # if missing in lgsm dir copy it accross + if [ ! -f "${serverlist}" ]; then + mkdir -p "${datadir}" + cp -R "${serverlist_tmp}" "${serverlist}" + # check if the files are different. + else + file_diff=$(diff -q "${serverlist_tmp}" "${serverlist}") + if [ "${file_diff}" != "" ]; then + cp -Rf "${serverlist_tmp}" "${serverlist}" + fi + fi + + if [ ! -f "${serverlist}" ];then + echo "[ FAIL ] serverlist.csv could not be loaded." + exit 1 + fi + + if [ "${userinput}" == "list" ]; then + { + awk -F "," '{print $2 "\t" $3}' "${serverlist}" + } | column -s $'\t' -t | more + exit + elif [ "${userinput}" == "install" ]; then + fn_install_menu result "LinuxGSM" "Select game to install" "lgsm/data/serverlist.csv" + userinput="${result}" + fn_server_info + echo "result is ${result}" + echo "RESULT: ${result}" + echo "VALIDATE: ${servername}" + if [ "${result}" == "${servername}" ]; then + fn_install_file + else + echo "[ FAIL ] menu result does not match servername" + fi + elif [ -n "${userinput}" ]; then + fn_server_info + if [ "${userinput}" == "${servername}" ]; then + fn_install_file + fi + else + fn_install_getopt + fi +# LinuxGSM Server Mode else - source lgsm/config/${servername}/${servicename}.cfg + # Load LinuxGSM configs + # These are required to get all the default variables for the specific server. + # Load the default config. If missing download it. If changed reload it. + if [ ! -f "${tmpdir}/config/${servername}/_default.cfg" ];then + fn_boostrap_fetch_config "lgsm/config/${servername}" "_default.cfg" "${tmpdir}/config/${servername}" "_default.cfg" "noexecutecmd" "norun" "noforce" "nomd5" + fi + if [ ! -f "${gameconfigdir}/_default.cfg" ];then + cp -R "${tmpdir}/config/${servername}/_default.cfg" "${gameconfigdir}/_default.cfg" + else + function_file_diff=$(diff -q ${tmpdir}/config/${servername}/_default.cfg ${gameconfigdir}/_default.cfg) + if [ "${function_file_diff}" != "" ]; then + echo "config different onverwriting" + cp -R "${tmpdir}/config/${servername}/_default.cfg" "${gameconfigdir}/_default.cfg" + fi + source lgsm/config/${servername}/_default.cfg + fi + # Load the common.cfg config. If missing download it + if [ ! -f "${gameconfigdir}/common.cfg" ];then + fn_boostrap_fetch_config "lgsm/config" "common-template.cfg" "${lgsmdir}/config/${servername}" "common.cfg" "${executecmd}" "noexecutecmd" "norun" "noforce" "nomd5" + source lgsm/config/${servername}/common.cfg + else + source lgsm/config/${servername}/common.cfg + fi + # Load the instance.cfg config. If missing download it + if [ ! -f "${gameconfigdir}/${servicename}.cfg" ];then + fn_boostrap_fetch_config "lgsm/config" "instance-template.cfg" "${lgsmdir}/config/${servername}" "${servicename}.cfg" "noexecutecmd" "norun" "noforce" "nomd5" + source lgsm/config/${servername}/${servicename}.cfg + else + source lgsm/config/${servername}/${servicename}.cfg + fi fi - ######################## ######## Script ######## ###### Do not edit ##### @@ -307,16 +360,7 @@ functionfile="${FUNCNAME}" fn_boostrap_fetch_function } -# 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}/exit 1" ]; 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 From b0713945d38e85585a4a789c4d6943d2d2541063 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 13 Apr 2017 20:45:31 +0100 Subject: [PATCH 009/216] dev appears to be a working version of the new config style. Only working with csgoserver currently --- lgsminstall.sh | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/lgsminstall.sh b/lgsminstall.sh index 0999334fe..6260e6946 100644 --- a/lgsminstall.sh +++ b/lgsminstall.sh @@ -212,9 +212,6 @@ fn_server_info(){ shortname="${server_info_array[0]}" # csgo servername="${server_info_array[1]}" # csgoserver gamename="${server_info_array[2]}" # Counter Strike: Global Offensive - echo "shortname: $shortname" - echo "servername: $servername" - echo "gamename: $gamename" } fn_install_getopt(){ @@ -244,6 +241,8 @@ fn_install_file(){ sed -i -e "s/shortname=\"core\"/shortname=\"${shortname}\"/g" "${filename}" sed -i -e "s/servername=\"core\"/servername=\"${servername}\"/g" "${filename}" sed -i -e "s/gamename=\"core\"/gamename=\"${gamename}\"/g" "${filename}" + echo "Installed ${gamename} server as ${filename}" + echo "./${filename} install" exit } @@ -294,9 +293,6 @@ if [ "${shortname}" == "core" ]; then fn_install_menu result "LinuxGSM" "Select game to install" "lgsm/data/serverlist.csv" userinput="${result}" fn_server_info - echo "result is ${result}" - echo "RESULT: ${result}" - echo "VALIDATE: ${servername}" if [ "${result}" == "${servername}" ]; then fn_install_file else @@ -315,16 +311,17 @@ else # Load LinuxGSM configs # These are required to get all the default variables for the specific server. # Load the default config. If missing download it. If changed reload it. - if [ ! -f "${tmpdir}/config/${servername}/_default.cfg" ];then - fn_boostrap_fetch_config "lgsm/config/${servername}" "_default.cfg" "${tmpdir}/config/${servername}" "_default.cfg" "noexecutecmd" "norun" "noforce" "nomd5" + if [ ! -f "${lgsmdir}/default-configs/lgsm-config/${servername}/_default.cfg" ];then + mkdir -p "${lgsmdir}/default-configs/lgsm-config/${servername}" + fn_boostrap_fetch_config "lgsm/config/${servername}" "_default.cfg" "${lgsmdir}/default-configs/lgsm-config/${servername}" "_default.cfg" "noexecutecmd" "norun" "noforce" "nomd5" fi if [ ! -f "${gameconfigdir}/_default.cfg" ];then - cp -R "${tmpdir}/config/${servername}/_default.cfg" "${gameconfigdir}/_default.cfg" + cp -R "${lgsmdir}/default-configs/lgsm-config/${servername}/_default.cfg" "${gameconfigdir}/_default.cfg" else - function_file_diff=$(diff -q ${tmpdir}/config/${servername}/_default.cfg ${gameconfigdir}/_default.cfg) + function_file_diff=$(diff -q ${lgsmdir}/default-configs/lgsm-config/${servername}/_default.cfg ${gameconfigdir}/_default.cfg) if [ "${function_file_diff}" != "" ]; then echo "config different onverwriting" - cp -R "${tmpdir}/config/${servername}/_default.cfg" "${gameconfigdir}/_default.cfg" + cp -R "${lgsmdir}/default-configs/lgsm-config/${servername}/_default.cfg" "${gameconfigdir}/_default.cfg" fi source lgsm/config/${servername}/_default.cfg fi From 1d158880855c5a93784c18c2952fa2c61f3733ac Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 13 Apr 2017 20:46:14 +0100 Subject: [PATCH 010/216] renamed linuxgsm.sh --- lgsminstall.sh => linuxgsm.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename lgsminstall.sh => linuxgsm.sh (100%) diff --git a/lgsminstall.sh b/linuxgsm.sh similarity index 100% rename from lgsminstall.sh rename to linuxgsm.sh From ef56b2eb57a0eea124e6f6052da0585f6a3368da Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 13 Apr 2017 21:14:03 +0100 Subject: [PATCH 011/216] updated description --- lgsm/config/csgoserver/_default.cfg | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lgsm/config/csgoserver/_default.cfg b/lgsm/config/csgoserver/_default.cfg index bb4b5bbba..3c7a1aea8 100644 --- a/lgsm/config/csgoserver/_default.cfg +++ b/lgsm/config/csgoserver/_default.cfg @@ -2,6 +2,9 @@ ######## Default Settings ######## ################################## # DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applys settings to every instance +# [instance].cfg - applys settings to specific instance #### Server Settings #### From 63c6acdb7095885dc724238498db436fa18cb10a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 13 Apr 2017 21:36:11 +0100 Subject: [PATCH 012/216] Added 3 more _default.cfg files --- lgsm/config/arkserver/_default.cfg | 89 ++++++++++++++++++++++++ lgsm/config/arma3server/_default.cfg | 100 +++++++++++++++++++++++++++ lgsm/config/sdtdserver/_default.cfg | 90 ++++++++++++++++++++++++ 3 files changed, 279 insertions(+) create mode 100644 lgsm/config/arkserver/_default.cfg create mode 100644 lgsm/config/arma3server/_default.cfg create mode 100644 lgsm/config/sdtdserver/_default.cfg diff --git a/lgsm/config/arkserver/_default.cfg b/lgsm/config/arkserver/_default.cfg new file mode 100644 index 000000000..6c4d453bf --- /dev/null +++ b/lgsm/config/arkserver/_default.cfg @@ -0,0 +1,89 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applys settings to every instance +# [instance].cfg - applys settings to specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +port="7777" +queryport="27015" +rconport="27020" +maxplayers="70" +ip="0.0.0.0" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="\"TheIsland?listen?MultiHome=${ip}?MaxPlayers=${maxplayers}?QueryPort=${queryport}?RCONPort=${rconport}?Port=${port}?\"" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="376030" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="ARK: Survival Evolved" +engine="unreal4" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}/ShooterGame" +executabledir="${systemdir}/Binaries/Linux" +executable="./ShooterGameServer" +servercfgdir="${systemdir}/Saved/Config/LinuxServer" +servercfg="GameUserSettings.ini" +servercfgdefault="GameUserSettings.ini" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +gamelogdir="${systemdir}/Saved/Logs" +scriptlogdir="${rootdir}/log/script" +consolelogdir="${rootdir}/log/console" +scriptlog="${scriptlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${scriptlogdir}/${servicename}-email.log" + +## Logs Naming +scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/config/arma3server/_default.cfg b/lgsm/config/arma3server/_default.cfg new file mode 100644 index 000000000..f551c8d66 --- /dev/null +++ b/lgsm/config/arma3server/_default.cfg @@ -0,0 +1,100 @@ +#### 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" +port="2302" + +## ARMA 3 Modules +# Add mods with relative paths: +# mods/@cba_a3 +# 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 +servermods="" + +## Path to BattlEye +# Leave empty for default +bepath="" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="-netlog -ip=${ip} -port=${port} -cfg=${networkcfgfullpath} -config=${servercfgfullpath} -mod=${mods} -servermod=${servermods} -bepath=${bepath} -autoinit -loadmissiontomemory" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="233780" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="ARMA 3" +engine="realvirtuality" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}" +executabledir="${filesdir}" +executable="./arma3server" +servercfg="${servicename}.server.cfg" +networkcfg="${servicename}.network.cfg" +servercfgdefault="server.cfg" +networkcfgdefault="network.cfg" +servercfgdir="${systemdir}/cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" +networkcfgfullpath="${servercfgdir}/${networkcfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +#gamelogdir="" # No server logs available +scriptlogdir="${rootdir}/log/script" +consolelogdir="${rootdir}/log/console" +scriptlog="${scriptlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${scriptlogdir}/${servicename}-email.log" + +## Logs Naming +scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config/sdtdserver/_default.cfg b/lgsm/config/sdtdserver/_default.cfg new file mode 100644 index 000000000..ad8476ddb --- /dev/null +++ b/lgsm/config/sdtdserver/_default.cfg @@ -0,0 +1,90 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applys settings to every instance +# [instance].cfg - applys settings to specific instance + +#### 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" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="-logfile ${gamelogdir}/output_log__`date +%Y-%m-%d__%H-%M-%S`.txt -quit -batchmode -nographics -dedicated -configfile=${servercfgfullpath}" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="294420" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="7 Days To Die" +engine="unity3d" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}" +executabledir="${filesdir}" +executable="./7DaysToDieServer.x86" +servercfg="${servicename}.xml" +servercfgdefault="serverconfig.xml" +servercfgdir="${filesdir}" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +gamelogdir="${rootdir}/log/server" +scriptlogdir="${rootdir}/log/script" +consolelogdir="${rootdir}/log/console" +gamelog="${gamelogdir}/${servicename}-game.log" +scriptlog="${scriptlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${scriptlogdir}/${servicename}-email.log" + +## Logs Naming +scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file From 7ae73eea6eaf7735e33047305924ae344a16d0a6 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 14 Apr 2017 09:37:02 +0100 Subject: [PATCH 013/216] =?UTF-8?q?fixed=20cp:=20cannot=20create=20regular?= =?UTF-8?q?=20file=20=E2=80=98.../=5Fdefault.cfg=E2=80=99:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- linuxgsm.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index 6260e6946..9f6d6b2ac 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -316,6 +316,7 @@ else fn_boostrap_fetch_config "lgsm/config/${servername}" "_default.cfg" "${lgsmdir}/default-configs/lgsm-config/${servername}" "_default.cfg" "noexecutecmd" "norun" "noforce" "nomd5" fi if [ ! -f "${gameconfigdir}/_default.cfg" ];then + mkdir -p "${gameconfigdir}" cp -R "${lgsmdir}/default-configs/lgsm-config/${servername}/_default.cfg" "${gameconfigdir}/_default.cfg" else function_file_diff=$(diff -q ${lgsmdir}/default-configs/lgsm-config/${servername}/_default.cfg ${gameconfigdir}/_default.cfg) @@ -323,21 +324,21 @@ else echo "config different onverwriting" cp -R "${lgsmdir}/default-configs/lgsm-config/${servername}/_default.cfg" "${gameconfigdir}/_default.cfg" fi - source lgsm/config/${servername}/_default.cfg + source "lgsm/config/${servername}/_default.cfg" fi # Load the common.cfg config. If missing download it if [ ! -f "${gameconfigdir}/common.cfg" ];then fn_boostrap_fetch_config "lgsm/config" "common-template.cfg" "${lgsmdir}/config/${servername}" "common.cfg" "${executecmd}" "noexecutecmd" "norun" "noforce" "nomd5" - source lgsm/config/${servername}/common.cfg + source "lgsm/config/${servername}/common.cfg" else - source lgsm/config/${servername}/common.cfg + source "lgsm/config/${servername}/common.cfg" fi # Load the instance.cfg config. If missing download it if [ ! -f "${gameconfigdir}/${servicename}.cfg" ];then fn_boostrap_fetch_config "lgsm/config" "instance-template.cfg" "${lgsmdir}/config/${servername}" "${servicename}.cfg" "noexecutecmd" "norun" "noforce" "nomd5" - source lgsm/config/${servername}/${servicename}.cfg + source "lgsm/config/${servername}/${servicename}.cfg" else - source lgsm/config/${servername}/${servicename}.cfg + source "lgsm/config/${servername}/${servicename}.cfg" fi fi ######################## From d35fe34622d4116b28d87cf5d72f62bc37a4fd83 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 14 Apr 2017 13:43:45 +0100 Subject: [PATCH 014/216] Updated directory structure --- .../arkserver/_default.cfg | 0 .../arma3server/_default.cfg | 0 .../common-template.cfg | 0 .../csgoserver/_default.cfg | 0 .../instance-template.cfg | 0 .../sdtdserver/_default.cfg | 0 linuxgsm.sh | 45 ++++++++++--------- 7 files changed, 23 insertions(+), 22 deletions(-) rename lgsm/{config => config-default}/arkserver/_default.cfg (100%) rename lgsm/{config => config-default}/arma3server/_default.cfg (100%) rename lgsm/{config => config-default}/common-template.cfg (100%) rename lgsm/{config => config-default}/csgoserver/_default.cfg (100%) rename lgsm/{config => config-default}/instance-template.cfg (100%) rename lgsm/{config => config-default}/sdtdserver/_default.cfg (100%) diff --git a/lgsm/config/arkserver/_default.cfg b/lgsm/config-default/arkserver/_default.cfg similarity index 100% rename from lgsm/config/arkserver/_default.cfg rename to lgsm/config-default/arkserver/_default.cfg diff --git a/lgsm/config/arma3server/_default.cfg b/lgsm/config-default/arma3server/_default.cfg similarity index 100% rename from lgsm/config/arma3server/_default.cfg rename to lgsm/config-default/arma3server/_default.cfg diff --git a/lgsm/config/common-template.cfg b/lgsm/config-default/common-template.cfg similarity index 100% rename from lgsm/config/common-template.cfg rename to lgsm/config-default/common-template.cfg diff --git a/lgsm/config/csgoserver/_default.cfg b/lgsm/config-default/csgoserver/_default.cfg similarity index 100% rename from lgsm/config/csgoserver/_default.cfg rename to lgsm/config-default/csgoserver/_default.cfg diff --git a/lgsm/config/instance-template.cfg b/lgsm/config-default/instance-template.cfg similarity index 100% rename from lgsm/config/instance-template.cfg rename to lgsm/config-default/instance-template.cfg diff --git a/lgsm/config/sdtdserver/_default.cfg b/lgsm/config-default/sdtdserver/_default.cfg similarity index 100% rename from lgsm/config/sdtdserver/_default.cfg rename to lgsm/config-default/sdtdserver/_default.cfg diff --git a/linuxgsm.sh b/linuxgsm.sh index 9f6d6b2ac..92f0dc6df 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -27,8 +27,10 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" -configdir="${lgsmdir}/config" -gameconfigdir="${configdir}/${servername}" +configdir="${lgsmdir}/config-lgsm" +configdirserver="${configdir}/${servername}" +configdirdefault="${lgsmdir}/config-default" + ## Github Branch Select # Allows for the use of different function files @@ -311,36 +313,37 @@ else # Load LinuxGSM configs # These are required to get all the default variables for the specific server. # Load the default config. If missing download it. If changed reload it. - if [ ! -f "${lgsmdir}/default-configs/lgsm-config/${servername}/_default.cfg" ];then - mkdir -p "${lgsmdir}/default-configs/lgsm-config/${servername}" - fn_boostrap_fetch_config "lgsm/config/${servername}" "_default.cfg" "${lgsmdir}/default-configs/lgsm-config/${servername}" "_default.cfg" "noexecutecmd" "norun" "noforce" "nomd5" + if [ ! -f "${configdirdefault}/config-lgsm/${servername}/_default.cfg" ];then + mkdir -p "${configdirdefault}/config-lgsm/${servername}" + fn_boostrap_fetch_config "lgsm/config-default/${servername}" "_default.cfg" "${configdirdefault}/config-lgsm/${servername}" "_default.cfg" "noexecutecmd" "norun" "noforce" "nomd5" fi - if [ ! -f "${gameconfigdir}/_default.cfg" ];then - mkdir -p "${gameconfigdir}" - cp -R "${lgsmdir}/default-configs/lgsm-config/${servername}/_default.cfg" "${gameconfigdir}/_default.cfg" + if [ ! -f "${configdirserver}/_default.cfg" ];then + mkdir -p "${configdirserver}" + cp -R "${configdirdefault}/config-lgsm/${servername}/_default.cfg" "${configdirserver}/_default.cfg" else - function_file_diff=$(diff -q ${lgsmdir}/default-configs/lgsm-config/${servername}/_default.cfg ${gameconfigdir}/_default.cfg) + function_file_diff=$(diff -q ${configdirdefault}/config-lgsm/${servername}/_default.cfg ${configdirserver}/_default.cfg) if [ "${function_file_diff}" != "" ]; then - echo "config different onverwriting" - cp -R "${lgsmdir}/default-configs/lgsm-config/${servername}/_default.cfg" "${gameconfigdir}/_default.cfg" + echo "_default.cfg has been altered. Reloading config." + cp -R "${configdirdefault}/config-lgsm/${servername}/_default.cfg" "${configdirserver}/_default.cfg" fi - source "lgsm/config/${servername}/_default.cfg" fi + source "${configdirserver}/_default.cfg" # Load the common.cfg config. If missing download it - if [ ! -f "${gameconfigdir}/common.cfg" ];then - fn_boostrap_fetch_config "lgsm/config" "common-template.cfg" "${lgsmdir}/config/${servername}" "common.cfg" "${executecmd}" "noexecutecmd" "norun" "noforce" "nomd5" - source "lgsm/config/${servername}/common.cfg" + if [ ! -f "${configdirserver}/common.cfg" ];then + fn_boostrap_fetch_config "lgsm/config-default" "common-template.cfg" "${configdirserver}" "common.cfg" "${executecmd}" "noexecutecmd" "norun" "noforce" "nomd5" + source "${configdirserver}/common.cfg" else - source "lgsm/config/${servername}/common.cfg" + source "${configdirserver}/common.cfg" fi # Load the instance.cfg config. If missing download it - if [ ! -f "${gameconfigdir}/${servicename}.cfg" ];then - fn_boostrap_fetch_config "lgsm/config" "instance-template.cfg" "${lgsmdir}/config/${servername}" "${servicename}.cfg" "noexecutecmd" "norun" "noforce" "nomd5" - source "lgsm/config/${servername}/${servicename}.cfg" + if [ ! -f "${configdirserver}/${servicename}.cfg" ];then + fn_boostrap_fetch_config "lgsm/config-default" "instance-template.cfg" "${configdirserver}" "${servicename}.cfg" "noexecutecmd" "norun" "noforce" "nomd5" + source "${configdirserver}/${servicename}.cfg" else - source "lgsm/config/${servername}/${servicename}.cfg" + source "${configdirserver}/${servicename}.cfg" fi fi + ######################## ######## Script ######## ###### Do not edit ##### @@ -358,8 +361,6 @@ functionfile="${FUNCNAME}" fn_boostrap_fetch_function } - - core_dl.sh core_functions.sh From 6bd5ac5fc62ccc68bba5462c5e0c5332e64f8123 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 14 Apr 2017 13:44:54 +0100 Subject: [PATCH 015/216] further dir changes --- .../config-default/{ => config-lgsm}/arkserver/_default.cfg | 0 .../{ => config-lgsm}/arma3server/_default.cfg | 0 lgsm/config-default/{ => config-lgsm}/common-template.cfg | 0 .../{ => config-lgsm}/csgoserver/_default.cfg | 0 lgsm/config-default/{ => config-lgsm}/instance-template.cfg | 0 .../{ => config-lgsm}/sdtdserver/_default.cfg | 0 linuxgsm.sh | 6 +++--- 7 files changed, 3 insertions(+), 3 deletions(-) rename lgsm/config-default/{ => config-lgsm}/arkserver/_default.cfg (100%) rename lgsm/config-default/{ => config-lgsm}/arma3server/_default.cfg (100%) rename lgsm/config-default/{ => config-lgsm}/common-template.cfg (100%) rename lgsm/config-default/{ => config-lgsm}/csgoserver/_default.cfg (100%) rename lgsm/config-default/{ => config-lgsm}/instance-template.cfg (100%) rename lgsm/config-default/{ => config-lgsm}/sdtdserver/_default.cfg (100%) diff --git a/lgsm/config-default/arkserver/_default.cfg b/lgsm/config-default/config-lgsm/arkserver/_default.cfg similarity index 100% rename from lgsm/config-default/arkserver/_default.cfg rename to lgsm/config-default/config-lgsm/arkserver/_default.cfg diff --git a/lgsm/config-default/arma3server/_default.cfg b/lgsm/config-default/config-lgsm/arma3server/_default.cfg similarity index 100% rename from lgsm/config-default/arma3server/_default.cfg rename to lgsm/config-default/config-lgsm/arma3server/_default.cfg diff --git a/lgsm/config-default/common-template.cfg b/lgsm/config-default/config-lgsm/common-template.cfg similarity index 100% rename from lgsm/config-default/common-template.cfg rename to lgsm/config-default/config-lgsm/common-template.cfg diff --git a/lgsm/config-default/csgoserver/_default.cfg b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg similarity index 100% rename from lgsm/config-default/csgoserver/_default.cfg rename to lgsm/config-default/config-lgsm/csgoserver/_default.cfg diff --git a/lgsm/config-default/instance-template.cfg b/lgsm/config-default/config-lgsm/instance-template.cfg similarity index 100% rename from lgsm/config-default/instance-template.cfg rename to lgsm/config-default/config-lgsm/instance-template.cfg diff --git a/lgsm/config-default/sdtdserver/_default.cfg b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg similarity index 100% rename from lgsm/config-default/sdtdserver/_default.cfg rename to lgsm/config-default/config-lgsm/sdtdserver/_default.cfg diff --git a/linuxgsm.sh b/linuxgsm.sh index 92f0dc6df..558a4c5a0 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -315,7 +315,7 @@ else # Load the default config. If missing download it. If changed reload it. if [ ! -f "${configdirdefault}/config-lgsm/${servername}/_default.cfg" ];then mkdir -p "${configdirdefault}/config-lgsm/${servername}" - fn_boostrap_fetch_config "lgsm/config-default/${servername}" "_default.cfg" "${configdirdefault}/config-lgsm/${servername}" "_default.cfg" "noexecutecmd" "norun" "noforce" "nomd5" + fn_boostrap_fetch_config "lgsm/config-default/config-lgsm/${servername}" "_default.cfg" "${configdirdefault}/config-lgsm/${servername}" "_default.cfg" "noexecutecmd" "norun" "noforce" "nomd5" fi if [ ! -f "${configdirserver}/_default.cfg" ];then mkdir -p "${configdirserver}" @@ -330,14 +330,14 @@ else source "${configdirserver}/_default.cfg" # Load the common.cfg config. If missing download it if [ ! -f "${configdirserver}/common.cfg" ];then - fn_boostrap_fetch_config "lgsm/config-default" "common-template.cfg" "${configdirserver}" "common.cfg" "${executecmd}" "noexecutecmd" "norun" "noforce" "nomd5" + fn_boostrap_fetch_config "lgsm/config-default/config-lgsm" "common-template.cfg" "${configdirserver}" "common.cfg" "${executecmd}" "noexecutecmd" "norun" "noforce" "nomd5" source "${configdirserver}/common.cfg" else source "${configdirserver}/common.cfg" fi # Load the instance.cfg config. If missing download it if [ ! -f "${configdirserver}/${servicename}.cfg" ];then - fn_boostrap_fetch_config "lgsm/config-default" "instance-template.cfg" "${configdirserver}" "${servicename}.cfg" "noexecutecmd" "norun" "noforce" "nomd5" + fn_boostrap_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${servicename}.cfg" "noexecutecmd" "norun" "noforce" "nomd5" source "${configdirserver}/${servicename}.cfg" else source "${configdirserver}/${servicename}.cfg" From e40c541eebc5a16dddbcf0447f4a02d367f90fc7 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 14 Apr 2017 13:50:09 +0100 Subject: [PATCH 016/216] renamed the default config location --- lgsm/functions/install_config.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 249e5291e..c67c1f7bd 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -17,12 +17,12 @@ fn_check_cfgdir(){ fi } -# Downloads default configs from Game-Server-Configs repo to lgsm/default-configs +# Downloads default configs from Game-Server-Configs repo to lgsm/config-default fn_fetch_default_config(){ - mkdir -pv "${lgsmdir}/default-configs" + mkdir -pv "${lgsmdir}/config-default" githuburl="https://github.com/GameServerManagers/Game-Server-Configs/master" for config in "${array_configs[@]}"; do - fileurl="https://raw.githubusercontent.com/GameServerManagers/Game-Server-Configs/master/${gamedirname}/${config}"; filedir="${lgsmdir}/default-configs"; filename="${config}"; executecmd="noexecute" run="norun"; force="noforce" + fileurl="https://raw.githubusercontent.com/GameServerManagers/Game-Server-Configs/master/${gamedirname}/${config}"; filedir="${lgsmdir}/config-default"; filename="${config}"; executecmd="noexecute" run="norun"; force="noforce" fn_fetch_file "${fileurl}" "${filedir}" "${filename}" "${executecmd}" "${run}" "${force}" "${md5}" done } @@ -34,13 +34,13 @@ fn_default_config_remote(){ echo "copying ${config} config file." fn_script_log_info "copying ${servercfg} config file." if [ "${config}" == "${servercfgdefault}" ]; then - cp -nv "${lgsmdir}/default-configs/${config}" "${servercfgfullpath}" + cp -nv "${lgsmdir}/config-default/${config}" "${servercfgfullpath}" elif [ "${gamename}" == "ARMA 3" ]&&[ "${config}" == "${networkcfgdefault}" ]; then - cp -nv "${lgsmdir}/default-configs/${config}" "${networkcfgfullpath}" + cp -nv "${lgsmdir}/config-default/${config}" "${networkcfgfullpath}" elif [ "${gamename}" == "Don't Starve Together" ]&&[ "${config}" == "${clustercfgdefault}" ]; then - cp -nv "${lgsmdir}/default-configs/${clustercfgdefault}" "${clustercfgfullpath}" + cp -nv "${lgsmdir}/config-default/${clustercfgdefault}" "${clustercfgfullpath}" else - cp -nv "${lgsmdir}/default-configs/${config}" "${servercfgdir}/${config}" + cp -nv "${lgsmdir}/config-default/${config}" "${servercfgdir}/${config}" fi done sleep 1 From 790f58e64d4ab7de9819ff8e7cb3f3182a65697d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 14 Apr 2017 13:52:10 +0100 Subject: [PATCH 017/216] further dir changes --- lgsm/functions/install_config.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index c67c1f7bd..0b6f7e744 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -22,7 +22,7 @@ fn_fetch_default_config(){ mkdir -pv "${lgsmdir}/config-default" githuburl="https://github.com/GameServerManagers/Game-Server-Configs/master" for config in "${array_configs[@]}"; do - fileurl="https://raw.githubusercontent.com/GameServerManagers/Game-Server-Configs/master/${gamedirname}/${config}"; filedir="${lgsmdir}/config-default"; filename="${config}"; executecmd="noexecute" run="norun"; force="noforce" + fileurl="https://raw.githubusercontent.com/GameServerManagers/Game-Server-Configs/master/${gamedirname}/${config}"; filedir="${lgsmdir}/config-default/config-game"; filename="${config}"; executecmd="noexecute" run="norun"; force="noforce" fn_fetch_file "${fileurl}" "${filedir}" "${filename}" "${executecmd}" "${run}" "${force}" "${md5}" done } @@ -34,13 +34,13 @@ fn_default_config_remote(){ echo "copying ${config} config file." fn_script_log_info "copying ${servercfg} config file." if [ "${config}" == "${servercfgdefault}" ]; then - cp -nv "${lgsmdir}/config-default/${config}" "${servercfgfullpath}" + cp -nv "${lgsmdir}/config-default/config-game/${config}" "${servercfgfullpath}" elif [ "${gamename}" == "ARMA 3" ]&&[ "${config}" == "${networkcfgdefault}" ]; then - cp -nv "${lgsmdir}/config-default/${config}" "${networkcfgfullpath}" + cp -nv "${lgsmdir}/config-default/config-game/${config}" "${networkcfgfullpath}" elif [ "${gamename}" == "Don't Starve Together" ]&&[ "${config}" == "${clustercfgdefault}" ]; then - cp -nv "${lgsmdir}/config-default/${clustercfgdefault}" "${clustercfgfullpath}" + cp -nv "${lgsmdir}/config-default/config-game/${clustercfgdefault}" "${clustercfgfullpath}" else - cp -nv "${lgsmdir}/config-default/${config}" "${servercfgdir}/${config}" + cp -nv "${lgsmdir}/config-default/config-game/${config}" "${servercfgdir}/${config}" fi done sleep 1 From be948aff4f8f37274d493a32823a9b49908dde00 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 15 Apr 2017 15:50:16 +0100 Subject: [PATCH 018/216] Testing updater --- lgsm/functions/command_update_functions.sh | 30 ++++--- lgsm/functions/core_dl.sh | 13 +++ linuxgsm.sh | 94 ++++++++-------------- 3 files changed, 66 insertions(+), 71 deletions(-) diff --git a/lgsm/functions/command_update_functions.sh b/lgsm/functions/command_update_functions.sh index 34dbb8115..2cfe3ac49 100644 --- a/lgsm/functions/command_update_functions.sh +++ b/lgsm/functions/command_update_functions.sh @@ -21,22 +21,32 @@ if [ -n "${rootdir}" ]; then exitcode=$? fi fi +# Check if curl exists and use available path +curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" +for curlcmd in ${curlpaths} +do + if [ -x "${curlcmd}" ]; then + curlcmd=${curlcmd} + break + fi +done +echo -ne " checking _default.cfg...\c" +function_file_diff=$(diff "${functionsdir}/${functionfile}" <(${curlcmd} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${servername}/_default.cfg")) +if [ "${function_file_diff}" != "" ]; then + fn_print_update_eol_nl + fn_script_log_info "checking ${functionfile}: UPDATE" + rm -rf "${configdirdefault}/config-lgsm/${servername}/_default.cfg" + fn_fetch_config "lgsm/config-default/config-lgsm/${servername}" "_default.cfg" "${configdirdefault}/config-lgsm/${servername}" "_default.cfg" "noexecutecmd" "norun" "noforce" "nomd5" + +else + fn_print_ok_eol_nl +fi if [ -n "${functionsdir}" ]; then if [ -d "${functionsdir}" ]; then cd "${functionsdir}" for functionfile in * do - # Check if curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - curlcmd=${curlcmd} - break - fi - done - echo -ne " checking ${functionfile}...\c" function_file_diff=$(diff "${functionsdir}/${functionfile}" <(${curlcmd} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}")) if [ "${function_file_diff}" != "" ]; then diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index d6c9b58ca..6193cfaf8 100644 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -177,6 +177,19 @@ fn_fetch_file(){ # force: force download of file even if exists # md5: Checks fail against an md5 sum +fn_fetch_config(){ + github_file_url_dir="${1}" # github dir containing the file + github_file_url_name="${2}" # name of the github file + githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + fileurl="${githuburl}" + filedir="${3}" + filename="${4}" + executecmd="noexecutecmd" + run="norun" + force="noforce" + md5="nomd5" + fn_boostrap_fetch_file "${fileurl}" "${filedir}" "${filename}" "${executecmd}" "${run}" "${force}" "${md5}" +} # Fetches files from the github repo fn_fetch_file_github(){ diff --git a/linuxgsm.sh b/linuxgsm.sh index 558a4c5a0..9edad11d7 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -39,16 +39,32 @@ githubuser="GameServerManagers" githubrepo="LinuxGSM" githubbranch="feature/config" +# Core Functions that are required first +core_dl.sh(){ + functionfile="${FUNCNAME}" + fn_bootstrap_fetch_file +} + +core_functions.sh(){ + functionfile="${FUNCNAME}" + fn_bootstrap_fetch_file +} + # Bootstrap +# Fetches the core functions required before passed off to core_dl.sh -# Fetches bootstrap files (configs and core functions) -fn_boostrap_fetch_file(){ - fileurl="${1}" - filedir="${2}" - filename="${3}" - executecmd="${4:-0}" - run="${5:-0}" - force="${6:-0}" +# Fetches core functions +fn_bootstrap_fetch_file(){ + github_file_url_dir="lgsm/functions" # github dir containing the file + github_file_url_name="${functionfile}" # name of the github file + githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + fileurl="${githuburl}" + filedir="${functionsdir}" + filename="${github_file_url_name}" + executecmd="executecmd" + run="run" + force="noforce" + md5="nomd5" # If the file is missing, then download if [ ! -f "${filedir}/${filename}" ]; then if [ ! -d "${filedir}" ]; then @@ -77,9 +93,7 @@ fn_boostrap_fetch_file(){ echo -e "\e[0;32mOK\e[0m" fi else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" + echo "[ FAIL ] Curl is not installed" exit 1 fi # make file executecmd if executecmd is set @@ -96,40 +110,15 @@ fn_boostrap_fetch_file(){ fi } -fn_boostrap_fetch_function(){ - github_file_url_dir="lgsm/functions" # github dir containing the file - github_file_url_name="${functionfile}" # name of the github file - githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - fileurl="${githuburl}" - filedir="${functionsdir}" - filename="${github_file_url_name}" - executecmd="executecmd" - run="run" - force="noforce" - md5="nomd5" - fn_boostrap_fetch_file "${fileurl}" "${filedir}" "${filename}" "${executecmd}" "${run}" "${force}" "${md5}" -} -fn_boostrap_fetch_config(){ - github_file_url_dir="${1}" # github dir containing the file - github_file_url_name="${2}" # name of the github file - githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - fileurl="${githuburl}" - filedir="${3}" - filename="${4}" - executecmd="noexecutecmd" - run="norun" - force="noforce" - md5="nomd5" - fn_boostrap_fetch_file "${fileurl}" "${filedir}" "${filename}" "${executecmd}" "${run}" "${force}" "${md5}" -} +# Installer menu fn_print_center() { columns="$(tput cols)" line="$@" printf "%*s\n" $(( (${#line} + columns) / 2)) "${line}" } -# Print horizontal line + fn_print_horizontal(){ char="${1:-=}" printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' "${char}" @@ -310,12 +299,15 @@ if [ "${shortname}" == "core" ]; then fi # LinuxGSM Server Mode else + core_dl.sh + core_functions.sh + # Load LinuxGSM configs # These are required to get all the default variables for the specific server. # Load the default config. If missing download it. If changed reload it. if [ ! -f "${configdirdefault}/config-lgsm/${servername}/_default.cfg" ];then mkdir -p "${configdirdefault}/config-lgsm/${servername}" - fn_boostrap_fetch_config "lgsm/config-default/config-lgsm/${servername}" "_default.cfg" "${configdirdefault}/config-lgsm/${servername}" "_default.cfg" "noexecutecmd" "norun" "noforce" "nomd5" + fn_fetch_config "lgsm/config-default/config-lgsm/${servername}" "_default.cfg" "${configdirdefault}/config-lgsm/${servername}" "_default.cfg" "noexecutecmd" "norun" "noforce" "nomd5" fi if [ ! -f "${configdirserver}/_default.cfg" ];then mkdir -p "${configdirserver}" @@ -330,39 +322,19 @@ else source "${configdirserver}/_default.cfg" # Load the common.cfg config. If missing download it if [ ! -f "${configdirserver}/common.cfg" ];then - fn_boostrap_fetch_config "lgsm/config-default/config-lgsm" "common-template.cfg" "${configdirserver}" "common.cfg" "${executecmd}" "noexecutecmd" "norun" "noforce" "nomd5" + fn_fetch_config "lgsm/config-default/config-lgsm" "common-template.cfg" "${configdirserver}" "common.cfg" "${executecmd}" "noexecutecmd" "norun" "noforce" "nomd5" source "${configdirserver}/common.cfg" else source "${configdirserver}/common.cfg" fi # Load the instance.cfg config. If missing download it if [ ! -f "${configdirserver}/${servicename}.cfg" ];then - fn_boostrap_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${servicename}.cfg" "noexecutecmd" "norun" "noforce" "nomd5" + fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${servicename}.cfg" "noexecutecmd" "norun" "noforce" "nomd5" source "${configdirserver}/${servicename}.cfg" else source "${configdirserver}/${servicename}.cfg" fi fi -######################## -######## Script ######## -###### Do not edit ##### -######################## - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_boostrap_fetch_function -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_boostrap_fetch_function -} - -core_dl.sh -core_functions.sh - getopt=$1 core_getopt.sh From 16c94f854a312e100fa7615e6b9c111379ef3dec Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 15 Apr 2017 16:04:35 +0100 Subject: [PATCH 019/216] fixing issues with curl --- lgsm/functions/command_update_functions.sh | 13 +++++++------ lgsm/functions/core_dl.sh | 10 +++++----- lgsm/functions/core_functions.sh | 10 +++++----- linuxgsm.sh | 8 ++++---- 4 files changed, 21 insertions(+), 20 deletions(-) diff --git a/lgsm/functions/command_update_functions.sh b/lgsm/functions/command_update_functions.sh index 2cfe3ac49..bf101135d 100644 --- a/lgsm/functions/command_update_functions.sh +++ b/lgsm/functions/command_update_functions.sh @@ -21,17 +21,18 @@ if [ -n "${rootdir}" ]; then exitcode=$? fi fi -# Check if curl exists and use available path +# Check curl exists and use available path curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" -for curlcmd in ${curlpaths} +for curlpath in ${curlpaths} do - if [ -x "${curlcmd}" ]; then - curlcmd=${curlcmd} + if [ -x "${curlpath}" ]; then break fi done + + echo -ne " checking _default.cfg...\c" -function_file_diff=$(diff "${functionsdir}/${functionfile}" <(${curlcmd} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${servername}/_default.cfg")) +function_file_diff=$(diff "${functionsdir}/${functionfile}" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${servername}/_default.cfg")) if [ "${function_file_diff}" != "" ]; then fn_print_update_eol_nl fn_script_log_info "checking ${functionfile}: UPDATE" @@ -48,7 +49,7 @@ if [ -n "${functionsdir}" ]; then for functionfile in * do echo -ne " checking ${functionfile}...\c" - function_file_diff=$(diff "${functionsdir}/${functionfile}" <(${curlcmd} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}")) + function_file_diff=$(diff "${functionsdir}/${functionfile}" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}")) if [ "${function_file_diff}" != "" ]; then fn_print_update_eol_nl fn_script_log_info "checking ${functionfile}: UPDATE" diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index 6193cfaf8..82b0f8ac9 100644 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -106,25 +106,25 @@ fn_fetch_file(){ # Check curl exists and use available path curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} + for curlpath in ${curlpaths} do - if [ -x "${curlcmd}" ]; then + if [ -x "${curlpath}" ]; then break fi done # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then + if [ "$(basename ${curlpath})" == "curl" ]; then # trap to remove part downloaded files trap fn_fetch_trap INT # if larger file shows progress bar if [ "${filename##*.}" == "bz2" ]||[ "${filename##*.}" == "gz" ]||[ "${filename##*.}" == "zip" ]||[ "${filename##*.}" == "jar" ]; then echo -ne "downloading ${filename}..." sleep 1 - curlcmd=$(${curlcmd} --progress-bar --fail -L -o "${filedir}/${filename}" "${fileurl}") + curlcmd=$(${curlpath} --progress-bar --fail -L -o "${filedir}/${filename}" "${fileurl}") echo -ne "downloading ${filename}..." else echo -ne " fetching ${filename}...\c" - curlcmd=$(${curlcmd} -s --fail -L -o "${filedir}/${filename}" "${fileurl}" 2>&1) + curlcmd=$(${curlpath} -s --fail -L -o "${filedir}/${filename}" "${fileurl}" 2>&1) fi local exitcode=$? if [ ${exitcode} -ne 0 ]; then diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 1738928ca..28a6dd7f7 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -56,18 +56,18 @@ if [ ! -f "${filedir}/${filename}" ]; then echo -e " fetching ${filename}...\c" # Check curl exists and use available path curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} + for curlpath in ${curlpaths} do - if [ -x "${curlcmd}" ]; then + if [ -x "${curlpath}" ]; then break fi done # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) + if [ "$(basename ${curlpath})" == "curl" ]; then + curlcmd=$(${curlpath} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) if [ $? -ne 0 ]; then echo -e "${red}FAIL${default}\n" - echo "${curlfetch}" + echo "${curlcmd}" echo -e "${githuburl}\n" exit 1 else diff --git a/linuxgsm.sh b/linuxgsm.sh index 9edad11d7..d4a68c534 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -72,17 +72,17 @@ fn_bootstrap_fetch_file(){ fi # Check curl exists and use available path curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} + for curlpath in ${curlpaths} do - if [ -x "${curlcmd}" ]; then + if [ -x "${curlpath}" ]; then break fi done # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then + if [ "$(basename ${curlpath})" == "curl" ]; then # trap to remove part downloaded files echo -ne " fetching ${filename}...\c" - curlcmd=$(${curlcmd} -s --fail -L -o "${filedir}/${filename}" "${fileurl}" 2>&1) + curlcmd=$(${curlpath} -s --fail -L -o "${filedir}/${filename}" "${fileurl}" 2>&1) local exitcode=$? if [ ${exitcode} -ne 0 ]; then echo -e "\e[0;31mFAIL\e[0m\n" From a98b72cb6f65cbac7dd1a4fea9e8315665c7a645 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 15 Apr 2017 16:16:21 +0100 Subject: [PATCH 020/216] Corrected curl paths many curl references were not using curlpath --- lgsm/functions/alert_pushbullet.sh | 2 +- lgsm/functions/command_postdetails.sh | 6 +- lgsm/functions/command_update_functions.sh | 19 +----- lgsm/functions/core_dl.sh | 10 +++ lgsm/functions/core_functions.sh | 79 ---------------------- lgsm/functions/update_factorio.sh | 2 +- lgsm/functions/update_minecraft.sh | 2 +- lgsm/functions/update_mumble.sh | 2 +- 8 files changed, 18 insertions(+), 104 deletions(-) diff --git a/lgsm/functions/alert_pushbullet.sh b/lgsm/functions/alert_pushbullet.sh index 05276b010..8e46b95a6 100644 --- a/lgsm/functions/alert_pushbullet.sh +++ b/lgsm/functions/alert_pushbullet.sh @@ -11,7 +11,7 @@ local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" fn_print_dots "Sending Pushbullet alert" sleep 1 -pushbulletsend=$(curl --silent -u """${pushbullettoken}"":" -d channel_tag="${channeltag}" -d type="note" -d body="${alertbody}" -d title="${alertsubject}" 'https://api.pushbullet.com/v2/pushes'|grep -o invalid_access_token|uniq) +pushbulletsend=$(${curlpath} --silent -u """${pushbullettoken}"":" -d channel_tag="${channeltag}" -d type="note" -d body="${alertbody}" -d title="${alertsubject}" 'https://api.pushbullet.com/v2/pushes'|grep -o invalid_access_token|uniq) if [ "${pushbulletsend}" == "invalid_access_token" ]; then fn_print_fail_nl "Sending Pushbullet alert: invalid_access_token" diff --git a/lgsm/functions/command_postdetails.sh b/lgsm/functions/command_postdetails.sh index b4169023a..e535e554c 100644 --- a/lgsm/functions/command_postdetails.sh +++ b/lgsm/functions/command_postdetails.sh @@ -112,12 +112,12 @@ if [ "${posttarget}" == "http://pastebin.com" ] ; then fn_print_dots "Posting details to pastbin.com for ${postexpire}" sleep 1 # grab the return from 'value' from an initial visit to pastebin. - csrftoken=$(curl -s "${posttarget}" | + csrftoken=$(${curlpath} -s "${posttarget}" | sed -n 's/^.*input type="hidden" name="csrf_token_post" value="\(.*\)".*$/\1/p') # # Use the csrftoken to then post the content. # - link=$(curl -s "${posttarget}/post.php" -D - -F "submit_hidden=submit_hidden" \ + link=$(${curlpath} -s "${posttarget}/post.php" -D - -F "submit_hidden=submit_hidden" \ -F "post_key=${csrftoken}" -F "paste_expire_date=${postexpire}" \ -F "paste_name=${gamename} Debug Info" \ -F "paste_format=8" -F "paste_private=0" \ @@ -133,7 +133,7 @@ elif [ "${posttarget}" == "https://hastebin.com" ] ; then # hastebin is a bit simpler. If successful, the returned result # should look like: {"something":"key"}, putting the reference that # we need in "key". TODO - error handling. -CedarLUG - link=$(curl -H "HTTP_X_REQUESTED_WITH:XMLHttpRequest" -s -d "$(<${tmpfile})" "${posttarget}/documents" | cut -d\" -f4) + link=$(${curlpath} -H "HTTP_X_REQUESTED_WITH:XMLHttpRequest" -s -d "$(<${tmpfile})" "${posttarget}/documents" | cut -d\" -f4) fn_print_ok_nl "Posting details to hastebin.com for ${postexpire}" echo " Please share the following url for support: ${posttarget}/${link}" else diff --git a/lgsm/functions/command_update_functions.sh b/lgsm/functions/command_update_functions.sh index bf101135d..a1013b96b 100644 --- a/lgsm/functions/command_update_functions.sh +++ b/lgsm/functions/command_update_functions.sh @@ -1,4 +1,4 @@ -#!/bin/bash +aa#!/bin/bash # LinuxGSM command_update_functions.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com @@ -14,23 +14,6 @@ check.sh fn_script_log_info "Updating functions" echo -ne "\n" -# Removed legacy functions dir -if [ -n "${rootdir}" ]; then - if [ -d "${rootdir}/functions/" ]; then - rm -rfv "${rootdir}/functions/" - exitcode=$? - fi -fi -# Check curl exists and use available path -curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" -for curlpath in ${curlpaths} -do - if [ -x "${curlpath}" ]; then - break - fi -done - - echo -ne " checking _default.cfg...\c" function_file_diff=$(diff "${functionsdir}/${functionfile}" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${servername}/_default.cfg")) if [ "${function_file_diff}" != "" ]; then diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index 82b0f8ac9..7d51d91da 100644 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -236,3 +236,13 @@ fn_update_function(){ md5="nomd5" fn_fetch_file "${fileurl}" "${filedir}" "${filename}" "${executecmd}" "${run}" "${force}" "${md5}" } + + +# Defines curl path +curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" +for curlpath in "${curlpaths}" +do + if [ -x "${curlpath}" ]; then + break + fi +done \ No newline at end of file diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 28a6dd7f7..736829e9f 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -5,85 +5,6 @@ # Description: Defines all functions to allow download and execution of functions using fn_fetch_function. # This function is called first before any other function. Without this file other functions will not load. -# Fixes for legacy code -if [ "${gamename}" == "ARK: Survivial Evolved" ]; then - gamename="ARK: Survival Evolved" -elif [ "${gamename}" == "Teamspeak 3" ]; then - gamename="TeamSpeak 3" -elif [ "${gamename}" == "Counter Strike: Global Offensive" ]; then - gamename="Counter-Strike: Global Offensive" -elif [ "${gamename}" == "Counter Strike: Source" ]; then - gamename="Counter-Strike: Source" -elif [ "${gamename}" == "Quake Live" ]; then - engine="idtech3_ql" -fi - -if [ "${emailnotification}" == "on" ]; then - emailalert="on" -fi - -## Code/functions for legacy servers -fn_functions(){ -functionfile="${FUNCNAME}" -fn_fetch_function -} - -fn_getopt(){ -functionfile="${FUNCNAME}" -fn_fetch_function -} - -## In case older versions are missing these vars -if [ -z "${lgsmdir}" ]||[ -z "${functionsdir}" ]||[ -z "${libdir}" ]||[ -z "${tmpdir}" ]; then - lgsmdir="${rootdir}/lgsm" - functionsdir="${lgsmdir}/functions" - libdir="${lgsmdir}/lib" - tmpdir="${lgsmdir}/tmp" -fi - -## fn_fetch_core_dl placed here to allow legacy servers to still download core functions -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlpath in ${curlpaths} - do - if [ -x "${curlpath}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlpath})" == "curl" ]; then - curlcmd=$(${curlpath} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "${red}FAIL${default}\n" - echo "${curlcmd}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "${green}OK${default}" - fi - else - echo -e "${red}FAIL${default}\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - # Creates tmp dir if missing if [ ! -d "${tmpdir}" ]; then mkdir -p "${tmpdir}" diff --git a/lgsm/functions/update_factorio.sh b/lgsm/functions/update_factorio.sh index cbb39ef18..e14ff5932 100644 --- a/lgsm/functions/update_factorio.sh +++ b/lgsm/functions/update_factorio.sh @@ -76,7 +76,7 @@ fn_update_factorio_arch(){ fn_update_factorio_availablebuild(){ # Gets latest build info. - availablebuild=$(curl -s https://www.factorio.com/download-headless/stable | grep 'headless/linux64' | head -n 1 | grep -oP '(?<=get-download/).*?(?=/)') + availablebuild=$(${curlpath} -s https://www.factorio.com/download-headless/stable | grep 'headless/linux64' | head -n 1 | grep -oP '(?<=get-download/).*?(?=/)') sleep 1 # Checks if availablebuild variable has been set diff --git a/lgsm/functions/update_minecraft.sh b/lgsm/functions/update_minecraft.sh index cf45946b0..c54300b78 100644 --- a/lgsm/functions/update_minecraft.sh +++ b/lgsm/functions/update_minecraft.sh @@ -69,7 +69,7 @@ fn_update_currentbuild(){ fn_update_availablebuild(){ # Gets latest build info. - availablebuild=$(curl -s "https://launchermeta.mojang.com/mc/game/version_manifest.json" | sed -e 's/^.*"release":"\([^"]*\)".*$/\1/') + availablebuild=$(${curlpath} -s "https://launchermeta.mojang.com/mc/game/version_manifest.json" | sed -e 's/^.*"release":"\([^"]*\)".*$/\1/') sleep 1 # Checks if availablebuild variable has been set diff --git a/lgsm/functions/update_mumble.sh b/lgsm/functions/update_mumble.sh index b77cb3ac4..e90b8276b 100644 --- a/lgsm/functions/update_mumble.sh +++ b/lgsm/functions/update_mumble.sh @@ -76,7 +76,7 @@ fn_update_mumble_arch(){ fn_update_mumble_availablebuild(){ # Gets latest build info. - availablebuild=$(curl -s https://api.github.com/repos/mumble-voip/mumble/releases/latest | grep 'murmur-static_x86.*\.bz2"' | tail -1 | awk -F"/" '{ print $8 }') + availablebuild=$(${curlpath} -s https://api.github.com/repos/mumble-voip/mumble/releases/latest | grep 'murmur-static_x86.*\.bz2"' | tail -1 | awk -F"/" '{ print $8 }') sleep 1 # Checks if availablebuild variable has been set From fbc24c6dfcb7e49d0b3b85b6b3e82038875076ce Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 15 Apr 2017 16:42:04 +0100 Subject: [PATCH 021/216] removed fn_fetch_core_dl --- lgsm/functions/core_functions.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 736829e9f..461fc602e 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -13,29 +13,28 @@ fi # Core core_dl.sh(){ -# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" -fn_fetch_core_dl +fn_fetch_function } core_exit.sh(){ functionfile="${FUNCNAME}" -fn_fetch_core_dl +fn_fetch_function } core_getopt.sh(){ functionfile="${FUNCNAME}" -fn_fetch_core_dl +fn_fetch_function } core_trap.sh(){ functionfile="${FUNCNAME}" -fn_fetch_core_dl +fn_fetch_function } core_messages.sh(){ functionfile="${FUNCNAME}" -fn_fetch_core_dl +fn_fetch_function } From b20a33dd35575f15b086f63abb48ef186bd0a9ac Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 15 Apr 2017 16:49:23 +0100 Subject: [PATCH 022/216] bug --- lgsm/functions/command_update_functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/command_update_functions.sh b/lgsm/functions/command_update_functions.sh index a1013b96b..fcf06992a 100644 --- a/lgsm/functions/command_update_functions.sh +++ b/lgsm/functions/command_update_functions.sh @@ -1,4 +1,4 @@ -aa#!/bin/bash +#!/bin/bash # LinuxGSM command_update_functions.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com From 6e5a93a82723213acaad93445e23cf4ba8184188 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 15 Apr 2017 16:55:01 +0100 Subject: [PATCH 023/216] corrected path --- lgsm/functions/command_update_functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/command_update_functions.sh b/lgsm/functions/command_update_functions.sh index fcf06992a..363fcb2a4 100644 --- a/lgsm/functions/command_update_functions.sh +++ b/lgsm/functions/command_update_functions.sh @@ -15,7 +15,7 @@ fn_script_log_info "Updating functions" echo -ne "\n" echo -ne " checking _default.cfg...\c" -function_file_diff=$(diff "${functionsdir}/${functionfile}" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${servername}/_default.cfg")) +function_file_diff=$(diff "${configdirdefault}/config-lgsm/${servername}/_default.cfg" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${servername}/_default.cfg")) if [ "${function_file_diff}" != "" ]; then fn_print_update_eol_nl fn_script_log_info "checking ${functionfile}: UPDATE" From aac5af596d20e5145ef621e21cdea71577121940 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 15 Apr 2017 17:14:15 +0100 Subject: [PATCH 024/216] Updated ui --- lgsm/functions/command_update_functions.sh | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/lgsm/functions/command_update_functions.sh b/lgsm/functions/command_update_functions.sh index 363fcb2a4..cf711023f 100644 --- a/lgsm/functions/command_update_functions.sh +++ b/lgsm/functions/command_update_functions.sh @@ -8,34 +8,35 @@ local commandname="UPDATE LinuxGSM" local commandaction="Update LinuxGSM" local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -fn_print_dots "Updating functions" +fn_print_dots "Updating LinuxGSM" sleep 1 check.sh -fn_script_log_info "Updating functions" +fn_script_log_info "Updating LinuxGSM" echo -ne "\n" -echo -ne " checking _default.cfg...\c" -function_file_diff=$(diff "${configdirdefault}/config-lgsm/${servername}/_default.cfg" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${servername}/_default.cfg")) -if [ "${function_file_diff}" != "" ]; then +# Check and update _default.cfg +echo -ne " checking config _default.cfg...\c" +config_file_diff=$(diff "${configdirdefault}/config-lgsm/${servername}/_default.cfg" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${servername}/_default.cfg")) +if [ "${config_file_diff}" != "" ]; then fn_print_update_eol_nl - fn_script_log_info "checking ${functionfile}: UPDATE" - rm -rf "${configdirdefault}/config-lgsm/${servername}/_default.cfg" + fn_script_log_info "checking config _default.cfg: UPDATE" + rm -f "${configdirdefault}/config-lgsm/${servername}/_default.cfg" fn_fetch_config "lgsm/config-default/config-lgsm/${servername}" "_default.cfg" "${configdirdefault}/config-lgsm/${servername}" "_default.cfg" "noexecutecmd" "norun" "noforce" "nomd5" - else fn_print_ok_eol_nl fi +# Check and update functions if [ -n "${functionsdir}" ]; then if [ -d "${functionsdir}" ]; then cd "${functionsdir}" for functionfile in * do - echo -ne " checking ${functionfile}...\c" + echo -ne " checking function ${functionfile}...\c" function_file_diff=$(diff "${functionsdir}/${functionfile}" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}")) if [ "${function_file_diff}" != "" ]; then fn_print_update_eol_nl - fn_script_log_info "checking ${functionfile}: UPDATE" + fn_script_log_info "checking function ${functionfile}: UPDATE" rm -rf "${functionsdir}/${functionfile}" fn_update_function else From 0442559cc92cbd973bc3103e1cb3382459f8dea9 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 16 Apr 2017 13:52:36 +0100 Subject: [PATCH 025/216] Steamlining bootstrap process --- lgsm/functions/core_functions.sh | 14 ++++++++------ linuxgsm.sh | 9 ++------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 461fc602e..a821bf95b 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -14,7 +14,7 @@ fi core_dl.sh(){ functionfile="${FUNCNAME}" -fn_fetch_function +fn_bootstrap_fetch_file } core_exit.sh(){ @@ -34,7 +34,7 @@ fn_fetch_function core_messages.sh(){ functionfile="${FUNCNAME}" -fn_fetch_function +fn_bootstrap_fetch_file } @@ -541,11 +541,13 @@ functionfile="${FUNCNAME}" fn_fetch_function } +# Calls on-screen messages (bootstrap) +core_messages.sh + +#Calls file downloader (bootstrap) +core_dl.sh + # Calls the global Ctrl-C trap core_trap.sh -# Calls on-screen messages -core_messages.sh -#Calls file downloader -core_dl.sh diff --git a/linuxgsm.sh b/linuxgsm.sh index d4a68c534..a76833bbe 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -39,12 +39,7 @@ githubuser="GameServerManagers" githubrepo="LinuxGSM" githubbranch="feature/config" -# Core Functions that are required first -core_dl.sh(){ - functionfile="${FUNCNAME}" - fn_bootstrap_fetch_file -} - +# Core Function that is required first core_functions.sh(){ functionfile="${FUNCNAME}" fn_bootstrap_fetch_file @@ -297,9 +292,9 @@ if [ "${shortname}" == "core" ]; then else fn_install_getopt fi + # LinuxGSM Server Mode else - core_dl.sh core_functions.sh # Load LinuxGSM configs From 6fbd530633ca43f0f46278d01b630a30f7f9d1d9 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 16 Apr 2017 19:24:27 +0100 Subject: [PATCH 026/216] renamed filesdir to serverfiles makign it easier to understand by changing the var to serverfiles (the actual name of the directory --- README.md | 2 +- .../config-lgsm/arkserver/_default.cfg | 2 +- .../config-lgsm/arma3server/_default.cfg | 4 +- .../config-lgsm/csgoserver/_default.cfg | 4 +- .../config-lgsm/sdtdserver/_default.cfg | 6 +- lgsm/functions/check_permissions.sh | 6 +- lgsm/functions/command_dev_detect_glibc.sh | 14 +- lgsm/functions/command_dev_detect_ldd.sh | 14 +- lgsm/functions/command_stop.sh | 4 +- lgsm/functions/command_validate.sh | 4 +- lgsm/functions/compress_unreal2_maps.sh | 6 +- lgsm/functions/compress_ut99_maps.sh | 6 +- lgsm/functions/core_dl.sh | 261 +++++++++--------- lgsm/functions/fix_csgo.sh | 4 +- lgsm/functions/fix_dst.sh | 4 +- lgsm/functions/fix_ins.sh | 2 +- lgsm/functions/fix_kf.sh | 4 +- lgsm/functions/fix_ro.sh | 4 +- lgsm/functions/fix_steamcmd.sh | 12 +- lgsm/functions/fix_ut2k4.sh | 4 +- lgsm/functions/info_distro.sh | 4 +- lgsm/functions/install_factorio_save.sh | 2 +- lgsm/functions/install_minecraft_eula.sh | 4 +- lgsm/functions/install_server_dir.sh | 6 +- lgsm/functions/install_server_files.sh | 22 +- lgsm/functions/install_ts3db.sh | 2 +- .../install_unreal_tournament_eula.sh | 4 +- lgsm/functions/update_factorio.sh | 6 +- lgsm/functions/update_minecraft.sh | 10 +- lgsm/functions/update_mta.sh | 6 +- lgsm/functions/update_mumble.sh | 6 +- lgsm/functions/update_steamcmd.sh | 8 +- lgsm/functions/update_ts3.sh | 6 +- linuxgsm.sh | 25 +- tests/tests_jc2server.sh | 12 +- tests/tests_ts3server.sh | 8 +- 36 files changed, 246 insertions(+), 252 deletions(-) diff --git a/README.md b/README.md index 72e57fa62..3a6cf9d5a 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ If you want to donate to the project you can via PayPal. I have had a may kind p
  • Wiki
  • GitHub Code
  • GitHub Issues
  • -
  • Waffle (Github Dashboard)
  • +
  • Waffle (GitHub Dashboard)
  • alternativeTo.net
  • Social

    diff --git a/lgsm/config-default/config-lgsm/arkserver/_default.cfg b/lgsm/config-default/config-lgsm/arkserver/_default.cfg index 6c4d453bf..8378e9cec 100644 --- a/lgsm/config-default/config-lgsm/arkserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/arkserver/_default.cfg @@ -65,7 +65,7 @@ engine="unreal4" # Edit with care ## Server Specific Directories -systemdir="${filesdir}/ShooterGame" +systemdir="${serverfiles}/ShooterGame" executabledir="${systemdir}/Binaries/Linux" executable="./ShooterGameServer" servercfgdir="${systemdir}/Saved/Config/LinuxServer" diff --git a/lgsm/config-default/config-lgsm/arma3server/_default.cfg b/lgsm/config-default/config-lgsm/arma3server/_default.cfg index f551c8d66..4dc8a264c 100644 --- a/lgsm/config-default/config-lgsm/arma3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/arma3server/_default.cfg @@ -73,8 +73,8 @@ engine="realvirtuality" # Edit with care ## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" +systemdir="${serverfiles}" +executabledir="${serverfiles}" executable="./arma3server" servercfg="${servicename}.server.cfg" networkcfg="${servicename}.network.cfg" diff --git a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg index 3c7a1aea8..fdbb7a272 100644 --- a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg @@ -89,8 +89,8 @@ engine="source" # Edit with care ## Server Specific Directories -systemdir="${filesdir}/csgo" -executabledir="${filesdir}" +systemdir="${serverfiles}/csgo" +executabledir="${serverfiles}" executable="./srcds_run" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" diff --git a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg index ad8476ddb..d537643cc 100644 --- a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg @@ -65,12 +65,12 @@ engine="unity3d" # Edit with care ## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" +systemdir="${serverfiles}" +executabledir="${serverfiles}" executable="./7DaysToDieServer.x86" servercfg="${servicename}.xml" servercfgdefault="serverconfig.xml" -servercfgdir="${filesdir}" +servercfgdir="${serverfiles}" servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory diff --git a/lgsm/functions/check_permissions.sh b/lgsm/functions/check_permissions.sh index 24648f2ec..61cd9d472 100644 --- a/lgsm/functions/check_permissions.sh +++ b/lgsm/functions/check_permissions.sh @@ -18,8 +18,8 @@ fn_check_ownership(){ funcownissue=1 fi fi - if [ -d "${filesdir}" ]; then - if [ $(find "${filesdir}" -not -user $(whoami)|wc -l) -ne "0" ]; then + if [ -d "${serverfiles}" ]; then + if [ $(find "${serverfiles}" -not -user $(whoami)|wc -l) -ne "0" ]; then filesownissue=1 fi fi @@ -37,7 +37,7 @@ fn_check_ownership(){ find "${functionsdir}" -not -user $(whoami) -printf "%u\t\t%g\t%p\n" fi if [ "${filesownissue}" == "1" ]; then - find "${filesdir}" -not -user $(whoami) -printf "%u\t\t%g\t%p\n" + find "${serverfiles}" -not -user $(whoami) -printf "%u\t\t%g\t%p\n" fi } | column -s $'\t' -t | tee -a "${scriptlog}" diff --git a/lgsm/functions/command_dev_detect_glibc.sh b/lgsm/functions/command_dev_detect_glibc.sh index 536a12c2a..12f3e3069 100644 --- a/lgsm/functions/command_dev_detect_glibc.sh +++ b/lgsm/functions/command_dev_detect_glibc.sh @@ -15,21 +15,21 @@ if [ -z "$(command -v objdump)" ]; then core_exit.sh fi -if [ -z "${filesdir}" ]; then +if [ -z "${serverfiles}" ]; then dir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" fi -if [ -d "${filesdir}" ]; then +if [ -d "${serverfiles}" ]; then echo "Checking directory: " - echo "${filesdir}" -elif [ -f "${filesdir}" ]; then + echo "${serverfiles}" +elif [ -f "${serverfiles}" ]; then echo "Checking file: " - echo "${filesdir}" + echo "${serverfiles}" fi echo "" -files=$(find ${filesdir} | wc -l) -find ${filesdir} -type f -print0 | +files=$(find ${serverfiles} | wc -l) +find ${serverfiles} -type f -print0 | while IFS= read -r -d $'\0' line; do objdump -T $line 2>/dev/null|grep -oP "GLIBC[^ ]+" >>"${tmpdir}/detect_glibc.tmp" echo -n "$i / $files" $'\r' diff --git a/lgsm/functions/command_dev_detect_ldd.sh b/lgsm/functions/command_dev_detect_ldd.sh index 4e1c7b2b3..312b037a4 100644 --- a/lgsm/functions/command_dev_detect_ldd.sh +++ b/lgsm/functions/command_dev_detect_ldd.sh @@ -9,21 +9,21 @@ echo "=================================" echo "Shared Object dependencies Checker" echo "=================================" -if [ -z "${filesdir}" ]; then +if [ -z "${serverfiles}" ]; then dir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" fi -if [ -d "${filesdir}" ]; then +if [ -d "${serverfiles}" ]; then echo "Checking directory: " - echo "${filesdir}" -elif [ -f "${filesdir}" ]; then + echo "${serverfiles}" +elif [ -f "${serverfiles}" ]; then echo "Checking file: " - echo "${filesdir}" + echo "${serverfiles}" fi echo "" -files=$(find "${filesdir}" | wc -l) -find "${filesdir}" -type f -print0 | +files=$(find "${serverfiles}" | wc -l) +find "${serverfiles}" -type f -print0 | while IFS= read -r -d $'\0' line; do #ldd -v $line 2>/dev/null|grep "=>" >>"${tmpdir}/detect_ldd.tmp" if [ -n "$(ldd $line 2>/dev/null |grep -v "not a dynamic executable")" ]; then diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index fe88c43ce..3996f523e 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -252,7 +252,7 @@ fn_stop_ark(){ if [ -z "${queryport}" ]; then fn_print_warn "No queryport found using info_config.sh" fn_script_log_warn "No queryport found using info_config.sh" - userconfigfile="${filesdir}" + userconfigfile="${serverfiles}" userconfigfile+="/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini" queryport=$(grep ^QueryPort= ${userconfigfile} | cut -d= -f2 | sed "s/[^[:digit:].*].*//g") fi @@ -291,7 +291,7 @@ fn_stop_ark(){ fn_stop_teamspeak3(){ fn_print_dots "${servername}" sleep 0.5 - "${filesdir}"/ts3server_startscript.sh stop > /dev/null 2>&1 + "${serverfiles}"/ts3server_startscript.sh stop > /dev/null 2>&1 check_status.sh if [ "${status}" == "0" ]; then # Remove lockfile diff --git a/lgsm/functions/command_validate.sh b/lgsm/functions/command_validate.sh index eb6d13c15..f2fa5638b 100644 --- a/lgsm/functions/command_validate.sh +++ b/lgsm/functions/command_validate.sh @@ -27,9 +27,9 @@ fn_validation(){ fi if [ "${engine}" == "goldsource" ]; then - ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" ${branch} +app_update "${appid}" ${branch} validate +quit| tee -a "${scriptlog}" + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" ${branch} +app_update "${appid}" ${branch} validate +quit| tee -a "${scriptlog}" else - ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" ${branch} validate +quit| tee -a "${scriptlog}" + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" ${branch} validate +quit| tee -a "${scriptlog}" fi if [ $? != 0 ]; then fn_print_fail_nl "Validating files: SteamCMD" diff --git a/lgsm/functions/compress_unreal2_maps.sh b/lgsm/functions/compress_unreal2_maps.sh index 7ef8bfeea..abd84f414 100644 --- a/lgsm/functions/compress_unreal2_maps.sh +++ b/lgsm/functions/compress_unreal2_maps.sh @@ -21,10 +21,10 @@ if ! fn_prompt_yn "Start compression?" Y; then echo Exiting; return fi mkdir -pv "${compressedmapsdir}" > /dev/null 2>&1 -rm -rfv "${filesdir}/Maps/"*.ut2.uz2 +rm -rfv "${serverfiles}/Maps/"*.ut2.uz2 cd "${systemdir}" -for map in "${filesdir}/Maps/"*; do +for map in "${serverfiles}/Maps/"*; do ./ucc-bin compress "${map}" --nohomedir done -mv -fv "${filesdir}/Maps/"*.ut2.uz2 "${compressedmapsdir}" +mv -fv "${serverfiles}/Maps/"*.ut2.uz2 "${compressedmapsdir}" core_exit.sh diff --git a/lgsm/functions/compress_ut99_maps.sh b/lgsm/functions/compress_ut99_maps.sh index e74ec727c..e81117e7b 100644 --- a/lgsm/functions/compress_ut99_maps.sh +++ b/lgsm/functions/compress_ut99_maps.sh @@ -21,10 +21,10 @@ if ! fn_prompt_yn "Start compression?" Y; then echo Exiting; return fi mkdir -pv "${compressedmapsdir}" > /dev/null 2>&1 -rm -rfv "${filesdir}/Maps/"*.unr.uz +rm -rfv "${serverfiles}/Maps/"*.unr.uz cd "${systemdir}" -for map in "${filesdir}/Maps/"*; do +for map in "${serverfiles}/Maps/"*; do ./ucc-bin compress "${map}" --nohomedir done -mv -fv "${filesdir}/Maps/"*.unr.uz "${compressedmapsdir}" +mv -fv "${serverfiles}/Maps/"*.unr.uz "${compressedmapsdir}" core_exit.sh diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index 7d51d91da..7d24f9436 100644 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -5,17 +5,17 @@ # Website: https://gameservermanagers.com # Description: Deals with all downloads for LinuxGSM. -# fileurl: The URL of the file: http://example.com/dl/File.tar.bz2 -# filedir: location the file is to be saved: /home/server/lgsm/tmp -# filename: name of file (this can be different from the url name): file.tar.bz2 -# executecmd: Optional, set to "executecmd" to make file executable using chmod +x -# run: Optional, set to run to execute the file -# force: Optional, force re-download of file even if exists -# md5: Optional, Checks file against an md5 sum +# remote_fileurl: The URL of the file: http://example.com/dl/File.tar.bz2 +# local_filedir: location the file is to be saved: /home/server/lgsm/tmp +# local_filename: name of file (this can be different from the url name): file.tar.bz2 +# chmodx: Optional, set to "chmodx" to make file executable using chmod +x +# run: Optional, set run to execute the file after download +# forcedl: Optional, force re-download of file even if exists +# md5: Optional, set an md5 sum and will compare it against the file. # # Downloads can be defined in code like so: -# fn_fetch_file "${fileurl}" "${filedir}" "${filename}" "${executecmd}" "${run}" "${force}" "${md5}" -# fn_fetch_file "http://example.com/file.tar.bz2" "/some/dir" "file.tar.bz2" "executecmd" "run" "force" "10cd7353aa9d758a075c600a6dd193fd" +# fn_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" +# fn_fetch_file "http://example.com/file.tar.bz2" "/some/dir" "file.tar.bz2" "chmodx" "run" "forcedl" "10cd7353aa9d758a075c600a6dd193fd" local commandname="DOWNLOAD" local commandaction="Download" @@ -24,50 +24,50 @@ local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" fn_dl_md5(){ # Runs MD5 Check if available if [ "${md5}" != "0" ]&&[ "${md5}" != "nomd5" ]; then - echo -ne "verifying ${filename} with MD5..." + echo -ne "verifying ${local_filename} with MD5..." sleep 1 - local md5sumcmd=$(md5sum "${filedir}/${filename}"|awk '{print $1;}') + local md5sumcmd=$(md5sum "${local_filedir}/${local_filename}"|awk '{print $1;}') if [ "${md5sumcmd}" != "${md5}" ]; then fn_print_fail_eol_nl - echo "${filename} returned MD5 checksum: ${md5sumcmd}" + echo "${local_filename} returned MD5 checksum: ${md5sumcmd}" echo "expected MD5 checksum: ${md5}" - fn_script_log_fatal "Verifying ${filename} with MD5: FAIL" - fn_script_log_info "${filename} returned MD5 checksum: ${md5sumcmd}" + fn_script_log_fatal "Verifying ${local_filename} with MD5: FAIL" + fn_script_log_info "${local_filename} returned MD5 checksum: ${md5sumcmd}" fn_script_log_info "Expected MD5 checksum: ${md5}" core_exit.sh else fn_print_ok_eol_nl - fn_script_log_pass "Verifying ${filename} with MD5: OK" - fn_script_log_info "${filename} returned MD5 checksum: ${md5sumcmd}" + fn_script_log_pass "Verifying ${local_filename} with MD5: OK" + fn_script_log_info "${local_filename} returned MD5 checksum: ${md5sumcmd}" fn_script_log_info "Expected MD5 checksum: ${md5}" fi fi } -# Extracts bzip2 or gzip or zip files +# Extracts bzip2, gzip or zip files # Extracts can be defined in code like so: -# fn_dl_extract "${filedir}" "${filename}" "${extractdir}" +# fn_dl_extract "${local_filedir}" "${local_filename}" "${extractdir}" # fn_dl_extract "/home/gameserver/lgsm/tmp" "file.tar.bz2" "/home/gamserver/serverfiles" fn_dl_extract(){ - filedir="${1}" - filename="${2}" + local_filedir="${1}" + local_filename="${2}" extractdir="${3}" # extracts archives - echo -ne "extracting ${filename}..." - mime=$(file -b --mime-type "${filedir}/${filename}") + echo -ne "extracting ${local_filename}..." + mime=$(file -b --mime-type "${local_filedir}/${local_filename}") if [ "${mime}" == "application/gzip" ]||[ "${mime}" == "application/x-gzip" ]; then - tarcmd=$(tar -zxf "${filedir}/${filename}" -C "${extractdir}") + extractcmd=$(tar -zxf "${local_filedir}/${local_filename}" -C "${extractdir}") elif [ "${mime}" == "application/x-bzip2" ]; then - tarcmd=$(tar -jxf "${filedir}/${filename}" -C "${extractdir}") + extractcmd=$(tar -jxf "${local_filedir}/${local_filename}" -C "${extractdir}") elif [ "${mime}" == "application/zip" ]; then - tarcmd=$(unzip -d "${extractdir}" "${filedir}/${filename}") + extractcmd=$(unzip -d "${extractdir}" "${local_filedir}/${local_filename}") fi local exitcode=$? if [ ${exitcode} -ne 0 ]; then fn_print_fail_eol_nl fn_script_log_fatal "Extracting download: FAIL" - echo "${tarcmd}" | tee -a "${scriptlog}" + echo "${extractcmd}" | tee -a "${scriptlog}" core_exit.sh else fn_print_ok_eol_nl @@ -78,163 +78,155 @@ fn_dl_extract(){ # Trap to remove file download if canceled before completed fn_fetch_trap(){ echo "" - echo -ne "downloading ${filename}..." + echo -ne "downloading ${local_filename}..." fn_print_canceled_eol_nl - fn_script_log_info "Downloading ${filename}...CANCELED" + fn_script_log_info "Downloading ${local_filename}...CANCELED" sleep 1 - rm -f "${filedir}/${filename}" | tee -a "${scriptlog}" - echo -ne "downloading ${filename}..." + rm -f "${local_filedir}/${local_filename}" | tee -a "${scriptlog}" + echo -ne "downloading ${local_filename}..." fn_print_removed_eol_nl - fn_script_log_info "Downloading ${filename}...REMOVED" + fn_script_log_info "Downloading ${local_filename}...REMOVED" core_exit.sh } fn_fetch_file(){ - fileurl="${1}" - filedir="${2}" - filename="${3}" - executecmd="${4:-0}" + remote_fileurl="${1}" + local_filedir="${2}" + local_filename="${3}" + chmodx="${4:-0}" run="${5:-0}" - force="${6:-0}" + forcedl="${6:-0}" md5="${7:-0}" # If the file is missing, then download - if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" + if [ ! -f "${local_filedir}/${local_filename}" ]; then + if [ ! -d "${local_filedir}" ]; then + mkdir -p "${local_filedir}" fi - - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlpath in ${curlpaths} - do - if [ -x "${curlpath}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlpath})" == "curl" ]; then - # trap to remove part downloaded files - trap fn_fetch_trap INT - # if larger file shows progress bar - if [ "${filename##*.}" == "bz2" ]||[ "${filename##*.}" == "gz" ]||[ "${filename##*.}" == "zip" ]||[ "${filename##*.}" == "jar" ]; then - echo -ne "downloading ${filename}..." - sleep 1 - curlcmd=$(${curlpath} --progress-bar --fail -L -o "${filedir}/${filename}" "${fileurl}") - echo -ne "downloading ${filename}..." - else - echo -ne " fetching ${filename}...\c" - curlcmd=$(${curlpath} -s --fail -L -o "${filedir}/${filename}" "${fileurl}" 2>&1) - fi - local exitcode=$? - if [ ${exitcode} -ne 0 ]; then - fn_print_fail_eol_nl - if [ -f "${scriptlog}" ]; then - fn_script_log_fatal "Downloading ${filename}: FAIL" - fi - echo -e "${fileurl}" | tee -a "${scriptlog}" - echo "${curlcmd}" | tee -a "${scriptlog}" - core_exit.sh - else - fn_print_ok_eol_nl - if [ -f "${scriptlog}" ]; then - fn_script_log_pass "Downloading ${filename}: OK" - fi - fi - # remove trap - trap - INT + # Trap will remove part downloaded files if canceled + trap fn_fetch_trap INT + # if larger file shows progress bar + if [ "${local_filename##*.}" == "bz2" ]||[ "${local_filename##*.}" == "gz" ]||[ "${local_filename##*.}" == "zip" ]||[ "${local_filename##*.}" == "jar" ]; then + echo -ne "downloading ${local_filename}..." + sleep 1 + curlcmd=$(${curlpath} --progress-bar --fail -L -o "${local_filedir}/${local_filename}" "${remote_fileurl}") + echo -ne "downloading ${local_filename}..." else + echo -ne " fetching ${local_filename}...\c" + curlcmd=$(${curlpath} -s --fail -L -o "${local_filedir}/${local_filename}" "${remote_fileurl}" 2>&1) + fi + local exitcode=$? + if [ ${exitcode} -ne 0 ]; then fn_print_fail_eol_nl - echo "Curl is not installed!" - echo -e "" if [ -f "${scriptlog}" ]; then - fn_script_log_fatal "Curl is not installed!" + fn_script_log_fatal "Downloading ${local_filename}: FAIL" fi + echo -e "${remote_fileurl}" | tee -a "${scriptlog}" + echo "${curlcmd}" | tee -a "${scriptlog}" core_exit.sh + else + fn_print_ok_eol_nl + if [ -f "${scriptlog}" ]; then + fn_script_log_pass "Downloading ${local_filename}: OK" + fi fi - # make file executecmd if executecmd is set - if [ "${executecmd}" == "executecmd" ]; then - chmod +x "${filedir}/${filename}" + # Remove trap + trap - INT + # Make file executable if chmodx is set + if [ "${chmodx}" == "chmodx" ]; then + chmod +x "${local_filedir}/${local_filename}" fi fi - if [ -f "${filedir}/${filename}" ]; then + if [ -f "${local_filedir}/${local_filename}" ]; then fn_dl_md5 - # run file if run is set + # Execute file if run is set if [ "${run}" == "run" ]; then - source "${filedir}/${filename}" + source "${local_filedir}/${local_filename}" fi fi } +# GitHub file download functions +# Used to simplify downloading specific files from GitHub -# fileurl: The directory the file is located in teh GitHub repo -# filedir: name of file -# filename: location file to be saved -# executecmd: set to "executecmd" to make file executecmd -# run: Optional, set to run to execute the file -# force: force download of file even if exists -# md5: Checks fail against an md5 sum +# github_file_url_dir: the directory of the file in the GitHub: lgsm/functions +# github_file_url_name: the filename of the file to download from GitHub: core_messages.sh +# githuburl: the full GitHub url -fn_fetch_config(){ - github_file_url_dir="${1}" # github dir containing the file - github_file_url_name="${2}" # name of the github file - githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - fileurl="${githuburl}" - filedir="${3}" - filename="${4}" - executecmd="noexecutecmd" - run="norun" - force="noforce" - md5="nomd5" - fn_boostrap_fetch_file "${fileurl}" "${filedir}" "${filename}" "${executecmd}" "${run}" "${force}" "${md5}" -} +# remote_fileurl: The URL of the file: http://example.com/dl/File.tar.bz2 +# local_filedir: location the file is to be saved: /home/server/lgsm/tmp +# local_filename: name of file (this can be different from the url name): file.tar.bz2 +# chmodx: Optional, set to "chmodx" to make file executable using chmod +x +# run: Optional, set run to execute the file after download +# forcedl: Optional, force re-download of file even if exists +# md5: Optional, set an md5 sum and will compare it against the file. -# Fetches files from the github repo +# Fetches any files from the GitHub repo fn_fetch_file_github(){ github_file_url_dir="${1}" github_file_url_name="${2}" githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - fileurl="${githuburl}" - filedir="${3}" - filename="${github_file_url_name}" - executecmd="${4:-0}" + + remote_fileurl="${githuburl}" + local_filedir="${3}" + local_filename="${github_file_url_name}" + chmodx="${4:-0}" run="${5:-0}" - force="${6:-0}" + forcedl="${6:-0}" md5="${7:-0}" - fn_fetch_file "${fileurl}" "${filedir}" "${filename}" "${executecmd}" "${run}" "${force}" "${md5}" + # Passes vars to the file download function + fn_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" } +fn_fetch_config(){ + github_file_url_dir="${1}" + github_file_url_name="${2}" + githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + + remote_fileurl="${githuburl}" + local_filedir="${3}" + local_filename="${4}" + chmodx="noexecutecmd" + run="norun" + forcedl="noforce" + md5="nomd5" + # Passes vars to the file download function + fn_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" +} # Fetches functions fn_fetch_function(){ - github_file_url_dir="lgsm/functions" # github dir containing the file - github_file_url_name="${functionfile}" # name of the github file + github_file_url_dir="lgsm/functions" + github_file_url_name="${functionfile}" githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - fileurl="${githuburl}" - filedir="${functionsdir}" - filename="${github_file_url_name}" - executecmd="executecmd" + + remote_fileurl="${githuburl}" + local_filedir="${functionsdir}" + local_filename="${github_file_url_name}" + chmodx="chmodx" run="run" - force="noforce" + forcedl="noforce" md5="nomd5" - fn_fetch_file "${fileurl}" "${filedir}" "${filename}" "${executecmd}" "${run}" "${force}" "${md5}" + # Passes vars to the file download function + fn_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" } fn_update_function(){ exitbypass=1 - github_file_url_dir="lgsm/functions" # github dir containing the file - github_file_url_name="${functionfile}" # name of the github file + github_file_url_dir="lgsm/functions" + github_file_url_name="${functionfile}" githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - fileurl="${githuburl}" - filedir="${functionsdir}" - filename="${github_file_url_name}" - executecmd="executecmd" + + remote_fileurl="${githuburl}" + local_filedir="${functionsdir}" + local_filename="${github_file_url_name}" + chmodx="chmodx" run="norun" - force="noforce" + forcedl="noforce" md5="nomd5" - fn_fetch_file "${fileurl}" "${filedir}" "${filename}" "${executecmd}" "${run}" "${force}" "${md5}" + fn_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" } @@ -245,4 +237,9 @@ do if [ -x "${curlpath}" ]; then break fi -done \ No newline at end of file +done + +if [ "$(basename ${curlpath})" != "curl" ]; then + echo "[ FAIL ] Curl is not installed" + exit 1 +fi \ No newline at end of file diff --git a/lgsm/functions/fix_csgo.sh b/lgsm/functions/fix_csgo.sh index 305c0d06b..3dc840824 100644 --- a/lgsm/functions/fix_csgo.sh +++ b/lgsm/functions/fix_csgo.sh @@ -9,10 +9,10 @@ local commandaction="Fix" local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" # Fixes: server not always creating steam_appid.txt file. -if [ ! -f "${filesdir}/steam_appid.txt" ]; then +if [ ! -f "${serverfiles}/steam_appid.txt" ]; then fixname="730 steam_appid.txt" fn_fix_msg_start - echo -n "730" >> "${filesdir}/steam_appid.txt" + echo -n "730" >> "${serverfiles}/steam_appid.txt" fn_fix_msg_end fi diff --git a/lgsm/functions/fix_dst.sh b/lgsm/functions/fix_dst.sh index 5a631a52e..0a6bbe8b9 100644 --- a/lgsm/functions/fix_dst.sh +++ b/lgsm/functions/fix_dst.sh @@ -10,9 +10,9 @@ local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" # Fixes: ./dontstarve_dedicated_server_nullrenderer: ./lib32/libcurl-gnutls.so.4: no version information available (required by ./dontstarve_dedicated_server_nullrenderer) # Issue only occures on CentOS as libcurl-gnutls.so.4 is called libcurl.so.4 on CentOS. -if [ -f "/etc/redhat-release" ] && [ ! -f "${filesdir}/bin/lib32/libcurl-gnutls.so.4" ]; then +if [ -f "/etc/redhat-release" ] && [ ! -f "${serverfiles}/bin/lib32/libcurl-gnutls.so.4" ]; then fixname="libcurl-gnutls.so.4 missing" fn_fix_msg_start - ln -s "/usr/lib/libcurl.so.4" "${filesdir}/bin/lib32/libcurl-gnutls.so.4" + ln -s "/usr/lib/libcurl.so.4" "${serverfiles}/bin/lib32/libcurl-gnutls.so.4" fn_fix_msg_end fi \ No newline at end of file diff --git a/lgsm/functions/fix_ins.sh b/lgsm/functions/fix_ins.sh index c132173b0..86fff41e7 100644 --- a/lgsm/functions/fix_ins.sh +++ b/lgsm/functions/fix_ins.sh @@ -9,7 +9,7 @@ local commandaction="Fix" # Fixes: ./srcds_linux: error while loading shared libraries: libtier0.so: cannot open shared object file: No such file or directory. -export LD_LIBRARY_PATH=${filesdir}:${filesdir}/bin:${LD_LIBRARY_PATH} +export LD_LIBRARY_PATH=${serverfiles}:${serverfiles}/bin:${LD_LIBRARY_PATH} # Fixes: issue #529 - gamemode not passed to debug or start. diff --git a/lgsm/functions/fix_kf.sh b/lgsm/functions/fix_kf.sh index a70f8ce86..515189d8c 100644 --- a/lgsm/functions/fix_kf.sh +++ b/lgsm/functions/fix_kf.sh @@ -10,8 +10,8 @@ local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" echo "Applying WebAdmin ROOst.css fix." echo "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13" -sed -i 's/none}/none;/g' "${filesdir}/Web/ServerAdmin/ROOst.css" -sed -i 's/underline}/underline;/g' "${filesdir}/Web/ServerAdmin/ROOst.css" +sed -i 's/none}/none;/g' "${serverfiles}/Web/ServerAdmin/ROOst.css" +sed -i 's/underline}/underline;/g' "${serverfiles}/Web/ServerAdmin/ROOst.css" sleep 1 echo "Applying WebAdmin CharSet fix." echo "http://forums.tripwireinteractive.com/showpost.php?p=442340&postcount=1" diff --git a/lgsm/functions/fix_ro.sh b/lgsm/functions/fix_ro.sh index 3498ee9c8..033245216 100644 --- a/lgsm/functions/fix_ro.sh +++ b/lgsm/functions/fix_ro.sh @@ -10,8 +10,8 @@ local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" echo "Applying WebAdmin ROOst.css fix." echo "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13" -sed -i 's/none}/none;/g' "${filesdir}/Web/ServerAdmin/ROOst.css" -sed -i 's/underline}/underline;/g' "${filesdir}/Web/ServerAdmin/ROOst.css" +sed -i 's/none}/none;/g' "${serverfiles}/Web/ServerAdmin/ROOst.css" +sed -i 's/underline}/underline;/g' "${serverfiles}/Web/ServerAdmin/ROOst.css" sleep 1 echo "Applying WebAdmin CharSet fix." echo "http://forums.tripwireinteractive.com/showpost.php?p=442340&postcount=1" diff --git a/lgsm/functions/fix_steamcmd.sh b/lgsm/functions/fix_steamcmd.sh index 79bf5acce..52762e10a 100644 --- a/lgsm/functions/fix_steamcmd.sh +++ b/lgsm/functions/fix_steamcmd.sh @@ -23,21 +23,21 @@ if [ "${gamename}" == "Serious Sam 3: BFE" ]; then fixname="libsteam.so" fn_fix_msg_start mkdir -pv "${HOME}/.steam/bin32" >> "${scriptlog}" - cp -v "${filesdir}/Bin/libsteam.so" "${HOME}/.steam/bin32/libsteam.so" >> "${scriptlog}" + cp -v "${serverfiles}/Bin/libsteam.so" "${HOME}/.steam/bin32/libsteam.so" >> "${scriptlog}" fn_fix_msg_end fi elif [ "${gamename}" == "Hurtworld" ]; then # Fixes: [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so. - if [ ! -f "${filesdir}/Hurtworld_Data/Plugins/x86/steamclient.so" ]; then + if [ ! -f "${serverfiles}/Hurtworld_Data/Plugins/x86/steamclient.so" ]; then fixname="steamclient.so x86" fn_fix_msg_start - cp -v "${rootdir}/steamcmd/linux32/steamclient.so" "${filesdir}/Hurtworld_Data/Plugins/x86/steamclient.so" >> "${scriptlog}" + cp -v "${rootdir}/steamcmd/linux32/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86/steamclient.so" >> "${scriptlog}" fn_fix_msg_end fi - if [ ! -f "${filesdir}/Hurtworld_Data/Plugins/x86_64/steamclient.so" ]; then + if [ ! -f "${serverfiles}/Hurtworld_Data/Plugins/x86_64/steamclient.so" ]; then fixname="steamclient.so x86_64" fn_fix_msg_start - cp -v "${rootdir}/steamcmd/linux32/steamclient.so" "${filesdir}/Hurtworld_Data/Plugins/x86_64/steamclient.so" >> "${scriptlog}" + cp -v "${rootdir}/steamcmd/linux32/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86_64/steamclient.so" >> "${scriptlog}" fn_fix_msg_end fi elif [ "${gamename}" == "Tower Unite" ]; then @@ -45,7 +45,7 @@ elif [ "${gamename}" == "Tower Unite" ]; then if [ ! -f "${executabledir}/steamclient.so" ]; then fixname="steamclient.so" fn_fix_msg_start - cp -v "${filesdir}/linux64/steamclient.so" "${executabledir}/steamclient.so" >> "${scriptlog}" + cp -v "${serverfiles}/linux64/steamclient.so" "${executabledir}/steamclient.so" >> "${scriptlog}" fn_fix_msg_end fi fi diff --git a/lgsm/functions/fix_ut2k4.sh b/lgsm/functions/fix_ut2k4.sh index 913ef62e9..ae0088315 100644 --- a/lgsm/functions/fix_ut2k4.sh +++ b/lgsm/functions/fix_ut2k4.sh @@ -10,8 +10,8 @@ local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" echo "applying WebAdmin ut2003.css fix." echo "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13" -sed -i 's/none}/none;/g' "${filesdir}/Web/ServerAdmin/ut2003.css" -sed -i 's/underline}/underline;/g' "${filesdir}/Web/ServerAdmin/ut2003.css" +sed -i 's/none}/none;/g' "${serverfiles}/Web/ServerAdmin/ut2003.css" +sed -i 's/underline}/underline;/g' "${serverfiles}/Web/ServerAdmin/ut2003.css" sleep 1 echo "applying WebAdmin CharSet fix." echo "http://forums.tripwireinteractive.com/showpost.php?p=442340&postcount=1" diff --git a/lgsm/functions/info_distro.sh b/lgsm/functions/info_distro.sh index d8d733d64..c83dff8a1 100644 --- a/lgsm/functions/info_distro.sh +++ b/lgsm/functions/info_distro.sh @@ -95,13 +95,13 @@ if [ -z "${rootdirdu}" ]; then fi ## LinuxGSM used space in serverfiles dir. -filesdirdu=$(du -sh "${filesdir}" 2> /dev/null | awk '{print $1}') +filesdirdu=$(du -sh "${serverfiles}" 2> /dev/null | awk '{print $1}') if [ -z "${filesdirdu}" ]; then filesdirdu="0M" fi ## LinuxGSM used space total minus backup dir. -rootdirduexbackup=$(du -sh --exclude="${backupdir}" "${filesdir}" 2> /dev/null | awk '{print $1}') +rootdirduexbackup=$(du -sh --exclude="${backupdir}" "${serverfiles}" 2> /dev/null | awk '{print $1}') if [ -z "${rootdirduexbackup}" ]; then rootdirduexbackup="0M" fi diff --git a/lgsm/functions/install_factorio_save.sh b/lgsm/functions/install_factorio_save.sh index e76e97e9f..240c2a62a 100644 --- a/lgsm/functions/install_factorio_save.sh +++ b/lgsm/functions/install_factorio_save.sh @@ -12,4 +12,4 @@ echo "Creating initial Factorio savefile" echo "=================================" sleep 1 check_glibc.sh -"${executabledir}"/factorio --create ${filesdir}/save1 +"${executabledir}"/factorio --create ${serverfiles}/save1 diff --git a/lgsm/functions/install_minecraft_eula.sh b/lgsm/functions/install_minecraft_eula.sh index 7c172df1b..5ca97ac8e 100644 --- a/lgsm/functions/install_minecraft_eula.sh +++ b/lgsm/functions/install_minecraft_eula.sh @@ -11,7 +11,7 @@ sleep 1 echo "You are required to accept the EULA:" echo "https://account.mojang.com/documents/minecraft_eula" -echo "eula=false" > "${filesdir}/eula.txt" +echo "eula=false" > "${serverfiles}/eula.txt" if [ -z "${autoinstall}" ]; then echo "By continuing you are indicating your agreement to the EULA." @@ -25,4 +25,4 @@ echo "" sleep 5 fi -sed -i "s/eula=false/eula=true/g" "${filesdir}/eula.txt" +sed -i "s/eula=false/eula=true/g" "${serverfiles}/eula.txt" diff --git a/lgsm/functions/install_server_dir.sh b/lgsm/functions/install_server_dir.sh index 426e25a2b..523a38465 100644 --- a/lgsm/functions/install_server_dir.sh +++ b/lgsm/functions/install_server_dir.sh @@ -12,7 +12,7 @@ echo "" echo "Server Directory" echo "=================================" sleep 1 -if [ -d "${filesdir}" ]; then +if [ -d "${serverfiles}" ]; then fn_print_warning_nl "A server is already installed here." fi pwd @@ -22,7 +22,7 @@ if [ -z "${autoinstall}" ]; then exit fi fi -if [ ! -d "${filesdir}" ]; then - mkdir -v "${filesdir}" +if [ ! -d "${serverfiles}" ]; then + mkdir -v "${serverfiles}" fi sleep 1 diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index edee16e9f..ed8ad70ff 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -24,11 +24,11 @@ fn_install_server_files(){ elif [ "${gamename}" == "GoldenEye: Source" ]; then fileurl="http://files.gameservermanagers.com/GoldenEyeSource/GoldenEye_Source_v5.0.1_full_server_linux.tar.bz2"; filedir="${tmpdir}"; filename="GoldenEye_Source_v5.0.1_server_full_Linux.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="ea227a150300abe346e757380325f84c" elif [ "${gamename}" == "Quake 2" ]; then - fileurl="http://files.gameservermanagers.com/Quake2/quake2-3.20-glibc-i386-full-linux2.0.tar.bz2"; filedir="${lgsmdir}/tmp"; filename="quake2-3.20-glibc-i386-full-linux2.0.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="0b8c7e2d51f40b56b328c69e986e7c5f" + fileurl="http://files.gameservermanagers.com/Quake2/quake2-3.20-glibc-i386-full-linux2.0.tar.bz2"; filedir="${tmpdir}"; filename="quake2-3.20-glibc-i386-full-linux2.0.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="0b8c7e2d51f40b56b328c69e986e7c5f" elif [ "${gamename}" == "Quake 3: Arena" ]; then - fileurl="http://files.gameservermanagers.com/Quake3/quake3-1.32c-x86-full-linux.tar.bz2"; filedir="${lgsmdir}/tmp"; filename="quake3-1.32c-x86-full-linux.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="fd7258d827474f67663dda297bff4306" + fileurl="http://files.gameservermanagers.com/Quake3/quake3-1.32c-x86-full-linux.tar.bz2"; filedir="${tmpdir}"; filename="quake3-1.32c-x86-full-linux.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="fd7258d827474f67663dda297bff4306" elif [ "${gamename}" == "QuakeWorld" ]; then - fileurl="http://files.gameservermanagers.com/QuakeWorld/nquake.server.linux.083116.full.tar.bz2"; filedir="${lgsmdir}/tmp"; filename="nquake.server.linux.083116.full.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="75a409cf08d808f075e4dacdc7b21b78" + fileurl="http://files.gameservermanagers.com/QuakeWorld/nquake.server.linux.083116.full.tar.bz2"; filedir="${tmpdir}"; filename="nquake.server.linux.083116.full.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="75a409cf08d808f075e4dacdc7b21b78" elif [ "${gamename}" == "Unreal Tournament 2004" ]; then fileurl="http://files.gameservermanagers.com/UnrealTournament2004/ut2004-server-3339-ultimate-linux.tar.bz2"; filedir="${tmpdir}"; filename="ut2004-server-3339-ultimate-linux.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="67c5e2cd9c2a4b04f163962ee41eff54" elif [ "${gamename}" == "Unreal Tournament 99" ]; then @@ -41,7 +41,7 @@ fn_install_server_files(){ fileurl="http://files.gameservermanagers.com/WolfensteinEnemyTerritory/enemy-territory.260b.tar.bz2"; filedir="${tmpdir}"; filename="enemy-territory.260b.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="f833f514bfcdd46b42c111f83350c5a7" fi fn_fetch_file "${fileurl}" "${filedir}" "${filename}" "${executecmd}" "${run}" "${force}" "${md5}" - fn_dl_extract "${filedir}" "${filename}" "${filesdir}" + fn_dl_extract "${filedir}" "${filename}" "${serverfiles}" } fn_install_server_files_steamcmd(){ @@ -62,8 +62,8 @@ fn_install_server_files_steamcmd(){ fi if [ "${counter}" -ge "7" ]; then - echo "Removing $(find ${filesdir} -type d -print0 | grep -Ez '[^/]{30}$')" - find ${filesdir} -type d -print0 | grep -Ez '[^/]{30}$' | xargs -0 rm -rf + echo "Removing $(find ${serverfiles} -type d -print0 | grep -Ez '[^/]{30}$')" + find ${serverfiles} -type d -print0 | grep -Ez '[^/]{30}$' | xargs -0 rm -rf fi if [ "${counter}" -ge "9" ]; then rm -rf "${rootdir}/steamcmd" @@ -78,18 +78,18 @@ fn_install_server_files_steamcmd(){ if [ "${counter}" -le "4" ]; then if [ "${engine}" == "goldsource" ]; then - ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${branch} +quit + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${branch} +quit local exitcode=$? else - ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" ${branch} +quit + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" ${branch} +quit local exitcode=$? fi elif [ "${counter}" -ge "5" ]; then if [ "${engine}" == "goldsource" ]; then - ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${branch} -validate +quit + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${branch} -validate +quit local exitcode=$? else - ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" ${branch} -validate +quit + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" ${branch} -validate +quit local exitcode=$? fi fi @@ -107,7 +107,7 @@ fn_install_server_files_steamcmd(){ counter="0" while [ "${counter}" -le "4" ]; do counter=$((counter+1)) - ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" ${branch} -validate +quit + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" ${branch} -validate +quit local exitcode=$? done fi diff --git a/lgsm/functions/install_ts3db.sh b/lgsm/functions/install_ts3db.sh index ebceecfa7..0d363fcb3 100644 --- a/lgsm/functions/install_ts3db.sh +++ b/lgsm/functions/install_ts3db.sh @@ -14,7 +14,7 @@ fn_install_ts3db_mariadb(){ echo "checking if libmariadb2 is installed" echo "=================================" sleep 1 - ldd ${filesdir}/libts3db_mariadb.so | grep "libmariadb.so.2 => not found" + ldd ${serverfiles}/libts3db_mariadb.so | grep "libmariadb.so.2 => not found" if [ $? -eq 0 ]; then echo "libmariadb2 not installed. Please install it first." echo "exiting..." diff --git a/lgsm/functions/install_unreal_tournament_eula.sh b/lgsm/functions/install_unreal_tournament_eula.sh index b554ab2ad..a8e31b22a 100644 --- a/lgsm/functions/install_unreal_tournament_eula.sh +++ b/lgsm/functions/install_unreal_tournament_eula.sh @@ -11,7 +11,7 @@ sleep 1 echo "You are required to accept the EULA:" echo "https://www.epicgames.com/unrealtournament/unreal-tournament-pre-alpha-test-development-build-eula/" -echo "eula=false" > "${filesdir}/eula.txt" +echo "eula=false" > "${serverfiles}/eula.txt" if [ -z "${autoinstall}" ]; then echo "By continuing you are indicating your agreement to the EULA." @@ -25,4 +25,4 @@ echo "" sleep 5 fi -sed -i "s/eula=false/eula=true/g" "${filesdir}/eula.txt" +sed -i "s/eula=false/eula=true/g" "${serverfiles}/eula.txt" diff --git a/lgsm/functions/update_factorio.sh b/lgsm/functions/update_factorio.sh index e14ff5932..3d0a73357 100644 --- a/lgsm/functions/update_factorio.sh +++ b/lgsm/functions/update_factorio.sh @@ -12,9 +12,9 @@ local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" fn_update_factorio_dl(){ fn_fetch_file "https://www.factorio.com/get-download/${availablebuild}/headless/${factorioarch}" "${tmpdir}" "factorio_headless_${factorioarch}-${availablebuild}.tar.gz" fn_dl_extract "${tmpdir}" "factorio_headless_${factorioarch}-${availablebuild}.tar.gz" "${tmpdir}" - echo -e "copying to ${filesdir}...\c" - fn_script_log "Copying to ${filesdir}" - cp -R "${tmpdir}/factorio/"* "${filesdir}" + echo -e "copying to ${serverfiles}...\c" + fn_script_log "Copying to ${serverfiles}" + cp -R "${tmpdir}/factorio/"* "${serverfiles}" local exitcode=$? if [ "${exitcode}" == "0" ]; then fn_print_ok_eol_nl diff --git a/lgsm/functions/update_minecraft.sh b/lgsm/functions/update_minecraft.sh index c54300b78..b28700fef 100644 --- a/lgsm/functions/update_minecraft.sh +++ b/lgsm/functions/update_minecraft.sh @@ -10,9 +10,9 @@ local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" fn_update_dl(){ fn_fetch_file "https://s3.amazonaws.com/Minecraft.Download/versions/${availablebuild}/minecraft_server.${availablebuild}.jar" "${tmpdir}" "minecraft_server.${availablebuild}.jar" - echo -e "copying to ${filesdir}...\c" - fn_script_log "Copying to ${filesdir}" - cp "${tmpdir}/minecraft_server.${availablebuild}.jar" "${filesdir}/minecraft_server.jar" + echo -e "copying to ${serverfiles}...\c" + fn_script_log "Copying to ${serverfiles}" + cp "${tmpdir}/minecraft_server.${availablebuild}.jar" "${serverfiles}/minecraft_server.jar" local exitcode=$? if [ ${exitcode} -eq 0 ]; then fn_print_ok_eol_nl @@ -47,7 +47,7 @@ fn_update_currentbuild(){ fi # Get current build from logs - currentbuild=$(cat "${filesdir}/logs/latest.log" 2> /dev/null | grep version | egrep -o '((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}') + currentbuild=$(cat "${serverfiles}/logs/latest.log" 2> /dev/null | grep version | egrep -o '((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}') if [ -z "${currentbuild}" ]; then fn_print_error_nl "Checking for update: mojang.com: Current build version not found" fn_script_log_error "Checking for update: mojang.com: Current build version not found" @@ -58,7 +58,7 @@ fn_update_currentbuild(){ command_stop.sh exitbypass=1 command_start.sh - currentbuild=$(cat "${filesdir}/logs/latest.log" 2> /dev/null | grep version | egrep -o '((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}') + currentbuild=$(cat "${serverfiles}/logs/latest.log" 2> /dev/null | grep version | egrep -o '((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}') if [ -z "${currentbuild}" ]; then fn_print_fail_nl "Checking for update: mojang.com: Current build version still not found" fn_script_log_fatal "Checking for update: mojang.com: Current build version still not found" diff --git a/lgsm/functions/update_mta.sh b/lgsm/functions/update_mta.sh index 0fcd7936c..9383b73e3 100644 --- a/lgsm/functions/update_mta.sh +++ b/lgsm/functions/update_mta.sh @@ -12,9 +12,9 @@ fn_update_mta_dl(){ fn_fetch_file "http://linux.mtasa.com/dl/${numversion}/multitheftauto_linux_x64-${fullversion}.tar.gz" "${tmpdir}" "multitheftauto_linux_x64-${fullversion}.tar.gz" mkdir "${tmpdir}/multitheftauto_linux_x64-${fullversion}" fn_dl_extract "${tmpdir}" "multitheftauto_linux_x64-${fullversion}.tar.gz" "${tmpdir}/multitheftauto_linux_x64-${fullversion}" - echo -e "copying to ${filesdir}...\c" - fn_script_log "Copying to ${filesdir}" - cp -R "${tmpdir}/multitheftauto_linux_x64-${fullversion}/multitheftauto_linux_x64-${fullversion}/"* "${filesdir}" + echo -e "copying to ${serverfiles}...\c" + fn_script_log "Copying to ${serverfiles}" + cp -R "${tmpdir}/multitheftauto_linux_x64-${fullversion}/multitheftauto_linux_x64-${fullversion}/"* "${serverfiles}" local exitcode=$? if [ "${exitcode}" == "0" ]; then fn_print_ok_eol_nl diff --git a/lgsm/functions/update_mumble.sh b/lgsm/functions/update_mumble.sh index e90b8276b..b16ea69c4 100644 --- a/lgsm/functions/update_mumble.sh +++ b/lgsm/functions/update_mumble.sh @@ -12,9 +12,9 @@ local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" fn_update_mumble_dl(){ fn_fetch_file "https://github.com/mumble-voip/mumble/releases/download/${availablebuild}/murmur-static_${mumblearch}-${availablebuild}.tar.bz2" "${tmpdir}" "murmur-static_${mumblearch}-${availablebuild}.tar.bz2" fn_dl_extract "${tmpdir}" "murmur-static_${mumblearch}-${availablebuild}.tar.bz2" "${tmpdir}" - echo -e "copying to ${filesdir}...\c" - fn_script_log "Copying to ${filesdir}" - cp -R "${tmpdir}/murmur-static_${mumblearch}-${availablebuild}/"* "${filesdir}" + echo -e "copying to ${serverfiles}...\c" + fn_script_log "Copying to ${serverfiles}" + cp -R "${tmpdir}/murmur-static_${mumblearch}-${availablebuild}/"* "${serverfiles}" local exitcode=$? if [ ${exitcode} -eq 0 ]; then fn_print_ok_eol_nl diff --git a/lgsm/functions/update_steamcmd.sh b/lgsm/functions/update_steamcmd.sh index e500a0fbf..26096291f 100644 --- a/lgsm/functions/update_steamcmd.sh +++ b/lgsm/functions/update_steamcmd.sh @@ -26,17 +26,17 @@ fn_update_steamcmd_dl(){ fi if [ "${engine}" == "goldsource" ]; then - ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" ${branch} +quit | tee -a "${scriptlog}" + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" ${branch} +quit | tee -a "${scriptlog}" else - ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" ${branch} +quit | tee -a "${scriptlog}" + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" ${branch} +quit | tee -a "${scriptlog}" fi fix.sh } fn_appmanifest_info(){ - appmanifestfile=$(find "${filesdir}" -type f -name "appmanifest_${appid}.acf") - appmanifestfilewc=$(find "${filesdir}" -type f -name "appmanifest_${appid}.acf"|wc -l) + appmanifestfile=$(find "${serverfiles}" -type f -name "appmanifest_${appid}.acf") + appmanifestfilewc=$(find "${serverfiles}" -type f -name "appmanifest_${appid}.acf"|wc -l) } fn_appmanifest_check(){ diff --git a/lgsm/functions/update_ts3.sh b/lgsm/functions/update_ts3.sh index f810eb0f4..982d7aecb 100644 --- a/lgsm/functions/update_ts3.sh +++ b/lgsm/functions/update_ts3.sh @@ -11,9 +11,9 @@ local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" fn_update_ts3_dl(){ fn_fetch_file "http://dl.4players.de/ts/releases/${ts3_version_number}/teamspeak3-server_linux_${ts3arch}-${ts3_version_number}.tar.bz2" "${tmpdir}" "teamspeak3-server_linux_${ts3arch}-${ts3_version_number}.tar.bz2" fn_dl_extract "${tmpdir}" "teamspeak3-server_linux_${ts3arch}-${ts3_version_number}.tar.bz2" "${tmpdir}" - echo -e "copying to ${filesdir}...\c" - fn_script_log "Copying to ${filesdir}" - cp -R "${tmpdir}/teamspeak3-server_linux_${ts3arch}/"* "${filesdir}" + echo -e "copying to ${serverfiles}...\c" + fn_script_log "Copying to ${serverfiles}" + cp -R "${tmpdir}/teamspeak3-server_linux_${ts3arch}/"* "${serverfiles}" local exitcode=$? if [ "${exitcode}" == "0" ]; then fn_print_ok_eol_nl diff --git a/linuxgsm.sh b/linuxgsm.sh index a76833bbe..9c26ac3c7 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -26,13 +26,13 @@ lgsmdir="${rootdir}/lgsm" functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" +serverfiles="${rootdir}/serverfiles" configdir="${lgsmdir}/config-lgsm" configdirserver="${configdir}/${servername}" configdirdefault="${lgsmdir}/config-default" -## Github Branch Select +## GitHub Branch Select # Allows for the use of different function files # from a different repo and/or branch. githubuser="GameServerManagers" @@ -42,7 +42,7 @@ githubbranch="feature/config" # Core Function that is required first core_functions.sh(){ functionfile="${FUNCNAME}" - fn_bootstrap_fetch_file + fn_bootstrap_fetch_file "lgsm/functions" "core_functions.sh" "${functionsdir}" "_default.cfg" "noexecutecmd" "norun" "noforce" "nomd5" } # Bootstrap @@ -50,16 +50,13 @@ core_functions.sh(){ # Fetches core functions fn_bootstrap_fetch_file(){ - github_file_url_dir="lgsm/functions" # github dir containing the file - github_file_url_name="${functionfile}" # name of the github file - githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - fileurl="${githuburl}" - filedir="${functionsdir}" - filename="${github_file_url_name}" - executecmd="executecmd" - run="run" - force="noforce" - md5="nomd5" + fileurl="${1}" + filedir="${2}" + filename="${3}" + executecmd="${4:-0}" + run="${5:-0}" + force="${6:-0}" + md5="${7:-0}" # If the file is missing, then download if [ ! -f "${filedir}/${filename}" ]; then if [ ! -d "${filedir}" ]; then @@ -252,7 +249,7 @@ if [ "${shortname}" == "core" ]; then # Download the serverlist. This is the complete list of all supported servers. # Download to tmp dir - fn_boostrap_fetch_config "lgsm/data" "serverlist.csv" "${tmpdir}/data" "serverlist.csv" "noexecutecmd" "norun" "noforce" "nomd5" + fn_boostrap_fetch_file "lgsm/data" "serverlist.csv" "${tmpdir}/data" "serverlist.csv" "noexecutecmd" "norun" "noforce" "nomd5" # if missing in lgsm dir copy it accross if [ ! -f "${serverlist}" ]; then mkdir -p "${datadir}" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 360345341..ae554e85a 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -93,12 +93,12 @@ tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" ## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" +systemdir="${serverfiles}" +executabledir="${serverfiles}" executable="./Jcmp-Server" servercfg="config.lua" servercfgdefault="config.lua" -servercfgdir="${filesdir}" +servercfgdir="${serverfiles}" servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory @@ -443,7 +443,7 @@ echo "Command: ./jc2server update" requiredstatus="OFFLINE" fn_setstatus fn_print_info_nl "changed buildid to 0." -sed -i 's/[0-9]\+/0/' "${filesdir}/steamapps/appmanifest_${appid}.acf" +sed -i 's/[0-9]\+/0/' "${serverfiles}/steamapps/appmanifest_${appid}.acf" (command_update.sh) fn_test_result_pass @@ -456,7 +456,7 @@ echo "Command: ./jc2server update" requiredstatus="ONLINE" fn_setstatus fn_print_info_nl "changed buildid to 0." -sed -i 's/[0-9]\+/0/' "${filesdir}/steamapps/appmanifest_${appid}.acf" +sed -i 's/[0-9]\+/0/' "${serverfiles}/steamapps/appmanifest_${appid}.acf" (command_update.sh) fn_test_result_pass @@ -469,7 +469,7 @@ echo "Command: ./jc2server update" requiredstatus="OFFLINE" fn_setstatus fn_print_info_nl "removed appmanifest_${appid}.acf." -rm --verbose "${filesdir}/steamapps/appmanifest_${appid}.acf" +rm --verbose "${serverfiles}/steamapps/appmanifest_${appid}.acf" (command_update.sh) fn_test_result_pass diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index e2bf7b12d..d19223269 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -80,19 +80,19 @@ tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" ## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" +systemdir="${serverfiles}" +executabledir="${serverfiles}" executable="./ts3server_startscript.sh" servercfg="${servicename}.ini" servercfgdefault="ts3server.ini" -servercfgdir="${filesdir}" +servercfgdir="${serverfiles}" servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory backupdir="${rootdir}/backups" ## Logging Directories -gamelogdir="${filesdir}/logs" +gamelogdir="${serverfiles}/logs" scriptlogdir="${rootdir}/log/script" scriptlog="${scriptlogdir}/${servicename}-script.log" emaillog="${scriptlogdir}/${servicename}-email.log" From 287475b4916c08668ccf3ea1e5d56b8f4cda2e75 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 16 Apr 2017 20:07:15 +0100 Subject: [PATCH 027/216] A good tidy up --- .../config-lgsm/arkserver/_default.cfg | 5 +++-- .../config-lgsm/arma3server/_default.cfg | 4 ++-- .../config-lgsm/csgoserver/_default.cfg | 4 ++-- .../config-lgsm/sdtdserver/_default.cfg | 6 +++--- lgsm/functions/check_steamcmd.sh | 15 +-------------- lgsm/functions/command_install_resources_mta.sh | 5 ++--- lgsm/functions/command_start.sh | 2 +- lgsm/functions/command_validate.sh | 3 +-- lgsm/functions/core_dl.sh | 4 +++- lgsm/functions/fix_steamcmd.sh | 6 +++--- lgsm/functions/install_logs.sh | 10 +++++----- lgsm/functions/install_mta_resources.sh | 9 ++++----- lgsm/functions/install_server_files.sh | 4 ++-- lgsm/functions/logs.sh | 2 +- lgsm/functions/monitor_gsquery.sh | 5 ----- lgsm/functions/update_mta.sh | 5 ++--- lgsm/functions/update_steamcmd.sh | 6 ++++-- linuxgsm.sh | 1 + 18 files changed, 40 insertions(+), 56 deletions(-) diff --git a/lgsm/config-default/config-lgsm/arkserver/_default.cfg b/lgsm/config-default/config-lgsm/arkserver/_default.cfg index 8378e9cec..35a8d1949 100644 --- a/lgsm/config-default/config-lgsm/arkserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/arkserver/_default.cfg @@ -77,9 +77,10 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${rootdir}/backups" ## Logging Directories +logdir="${logdir}" gamelogdir="${systemdir}/Saved/Logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" +scriptlogdir="${logdir}/script" +consolelogdir="${logdir}/console" scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" diff --git a/lgsm/config-default/config-lgsm/arma3server/_default.cfg b/lgsm/config-default/config-lgsm/arma3server/_default.cfg index 4dc8a264c..ac83b822d 100644 --- a/lgsm/config-default/config-lgsm/arma3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/arma3server/_default.cfg @@ -89,8 +89,8 @@ backupdir="${rootdir}/backups" ## Logging Directories #gamelogdir="" # No server logs available -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" +scriptlogdir="${logdir}/script" +consolelogdir="${logdir}/console" scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" diff --git a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg index fdbb7a272..718d8d132 100644 --- a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg @@ -102,8 +102,8 @@ backupdir="${rootdir}/backups" ## Logging Directories gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" +scriptlogdir="${logdir}/script" +consolelogdir="${logdir}/console" scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" diff --git a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg index d537643cc..b8576295e 100644 --- a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg @@ -77,9 +77,9 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${rootdir}/backups" ## Logging Directories -gamelogdir="${rootdir}/log/server" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" +gamelogdir="${logdir}/server" +scriptlogdir="${logdir}/script" +consolelogdir="${logdir}/console" gamelog="${gamelogdir}/${servicename}-game.log" scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" diff --git a/lgsm/functions/check_steamcmd.sh b/lgsm/functions/check_steamcmd.sh index ddfcb82d4..2b8cb0f0b 100644 --- a/lgsm/functions/check_steamcmd.sh +++ b/lgsm/functions/check_steamcmd.sh @@ -39,7 +39,6 @@ fn_check_steamcmd_user(){ fn_check_steamcmd_sh(){ # Checks if SteamCMD exists when starting or updating a server. # Installs if missing. - steamcmddir="${rootdir}/steamcmd" if [ ! -f "${steamcmddir}/steamcmd.sh" ]; then if [ "${function_selfname}" == "command_install.sh" ]; then fn_install_steamcmd @@ -55,17 +54,5 @@ fn_check_steamcmd_sh(){ fi } -fn_check_steamcmd_guard(){ - if [ "${function_selfname}" == "command_update.sh" ]||[ "${function_selfname}" == "command_validate.sh" ]; then - # Checks that SteamCMD is working correctly and will prompt Steam Guard if required. - "${steamcmddir}"/steamcmd.sh +login "${steamuser}" "${steampass}" +quit - if [ $? -ne 0 ]; then - fn_print_failure_nl "Error running SteamCMD" - fi - fi -} - fn_check_steamcmd_user -fn_check_steamcmd_sh -# stdbuf has now replaced unbuffer. This should not longer be required. -#fn_check_steamcmd_guard +fn_check_steamcmd_sh \ No newline at end of file diff --git a/lgsm/functions/command_install_resources_mta.sh b/lgsm/functions/command_install_resources_mta.sh index 07c2e0ac0..07b6e4440 100644 --- a/lgsm/functions/command_install_resources_mta.sh +++ b/lgsm/functions/command_install_resources_mta.sh @@ -12,9 +12,8 @@ fn_install_resources(){ echo "" echo "Installing Default Resources" echo "=================================" - fileurl="http://mirror.mtasa.com/mtasa/resources/mtasa-resources-latest.zip"; filedir="${tmpdir}"; filename="multitheftauto_resources.zip"; executecmd="noexecute" run="norun"; force="noforce"; md5="nomd5" - fn_fetch_file "${fileurl}" "${filedir}" "${filename}" "${executecmd}" "${run}" "${force}" "${md5}" - fn_dl_extract "${filedir}" "${filename}" "${resourcesdir}" + fn_fetch_file "http://mirror.mtasa.com/mtasa/resources/mtasa-resources-latest.zip" "${tmpdir}" "mtasa-resources-latest.zip" "noexecute" "norun" "noforce" "nomd5" + fn_dl_extract "${tmpdir}" "mtasa-resources-latest.zip" "${resourcesdir}" echo "Default Resources Installed." } diff --git a/lgsm/functions/command_start.sh b/lgsm/functions/command_start.sh index 1f411af48..87f9a05ed 100644 --- a/lgsm/functions/command_start.sh +++ b/lgsm/functions/command_start.sh @@ -46,7 +46,7 @@ fn_start_teamspeak3(){ if [ "${status}" == "0" ]; then fn_print_fail_nl "Unable to start ${servername}" fn_script_log_fatal "Unable to start ${servername}" - echo -e " Check log files: ${rootdir}/log" + echo -e " Check log files: ${logdir}" core_exit.sh else fn_print_ok_nl "${servername}" diff --git a/lgsm/functions/command_validate.sh b/lgsm/functions/command_validate.sh index f2fa5638b..72488d956 100644 --- a/lgsm/functions/command_validate.sh +++ b/lgsm/functions/command_validate.sh @@ -18,8 +18,7 @@ fn_validation(){ fn_script_log_info "Validating files: SteamCMD" sleep 1 - cd "${rootdir}/steamcmd" - + cd "${steamcmddir}" # Detects if unbuffer command is available for 32 bit distributions only. info_distro.sh if [ $(command -v stdbuf) ]&&[ "${arch}" != "x86_64" ]; then diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index 7d24f9436..665162859 100644 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -55,7 +55,9 @@ fn_dl_extract(){ # extracts archives echo -ne "extracting ${local_filename}..." mime=$(file -b --mime-type "${local_filedir}/${local_filename}") - + if [ ! -d "${extractdir}" ]; then + mkdir "${extractdir}" + fi if [ "${mime}" == "application/gzip" ]||[ "${mime}" == "application/x-gzip" ]; then extractcmd=$(tar -zxf "${local_filedir}/${local_filename}" -C "${extractdir}") elif [ "${mime}" == "application/x-bzip2" ]; then diff --git a/lgsm/functions/fix_steamcmd.sh b/lgsm/functions/fix_steamcmd.sh index 52762e10a..693398739 100644 --- a/lgsm/functions/fix_steamcmd.sh +++ b/lgsm/functions/fix_steamcmd.sh @@ -13,7 +13,7 @@ if [ ! -f "${HOME}/.steam/sdk32/steamclient.so" ]; then fixname="steamclient.so general" fn_fix_msg_start mkdir -pv "${HOME}/.steam/sdk32" >> "${scriptlog}" - cp -v "${rootdir}/steamcmd/linux32/steamclient.so" "${HOME}/.steam/sdk32/steamclient.so" >> "${scriptlog}" + cp -v "${steamcmddir}/linux32/steamclient.so" "${HOME}/.steam/sdk32/steamclient.so" >> "${scriptlog}" fn_fix_msg_end fi @@ -31,13 +31,13 @@ elif [ "${gamename}" == "Hurtworld" ]; then if [ ! -f "${serverfiles}/Hurtworld_Data/Plugins/x86/steamclient.so" ]; then fixname="steamclient.so x86" fn_fix_msg_start - cp -v "${rootdir}/steamcmd/linux32/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86/steamclient.so" >> "${scriptlog}" + cp -v "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86/steamclient.so" >> "${scriptlog}" fn_fix_msg_end fi if [ ! -f "${serverfiles}/Hurtworld_Data/Plugins/x86_64/steamclient.so" ]; then fixname="steamclient.so x86_64" fn_fix_msg_start - cp -v "${rootdir}/steamcmd/linux32/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86_64/steamclient.so" >> "${scriptlog}" + cp -v "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86_64/steamclient.so" >> "${scriptlog}" fn_fix_msg_end fi elif [ "${gamename}" == "Tower Unite" ]; then diff --git a/lgsm/functions/install_logs.sh b/lgsm/functions/install_logs.sh index 3feb0feea..65a09ed18 100644 --- a/lgsm/functions/install_logs.sh +++ b/lgsm/functions/install_logs.sh @@ -15,7 +15,7 @@ if [ "${checklogs}" != "1" ]; then fi sleep 1 # Create script and console log directories -mkdir -v "${rootdir}/log" +mkdir -v "${logdir}" mkdir -v "${scriptlogdir}" touch "${scriptlog}" if [ -n "${consolelogdir}" ]; then @@ -30,15 +30,15 @@ fi # Symlink gamelogdir to lgsm logs if variable exists if [ -n "${gamelogdir}" ]; then - if [ ! -h "${rootdir}/log/server" ]; then - ln -nfsv "${gamelogdir}" "${rootdir}/log/server" + if [ ! -h "${logdir}/server" ]; then + ln -nfsv "${gamelogdir}" "${logdir}/server" fi fi # If server uses SteamCMD create a symbolic link to the Steam logs if [ -d "${rootdir}/Steam/logs" ]; then - if [ ! -h "${rootdir}/log/steamcmd" ]; then - ln -nfsv "${rootdir}/Steam/logs" "${rootdir}/log/steamcmd" + if [ ! -h "${logdir}/steamcmd" ]; then + ln -nfsv "${rootdir}/Steam/logs" "${logdir}/steamcmd" fi fi sleep 1 diff --git a/lgsm/functions/install_mta_resources.sh b/lgsm/functions/install_mta_resources.sh index 8156da9da..6abfc598a 100644 --- a/lgsm/functions/install_mta_resources.sh +++ b/lgsm/functions/install_mta_resources.sh @@ -14,20 +14,19 @@ fn_install_libmysqlclient16(){ echo "Checking if libmysqlclient16 is installed" echo "=================================" sleep 1 - if [ ! -f /usr/lib/libmysqlclient.so.16 ]; then + if [ ! -f "/usr/lib/libmysqlclient.so.16" ]; then fn_print_warn_nl "libmysqlclient16 not installed. Installing.." sleep 1 sudo -v > /dev/null 2>&1 if [ $? -eq 0 ]; then - fileurl="https://nightly.mtasa.com/files/modules/64/libmysqlclient.so.16"; filedir="${tmpdir}"; filename="libmysqlclient.so.16"; executecmd="executecmd" run="norun"; force="noforce"; md5="6c188e0f8fb5d7a29f4bc413b9fed6c2" - fn_fetch_file "${fileurl}" "${filedir}" "${filename}" "${executecmd}" "${run}" "${force}" "${md5}" - sudo mv ${tmpdir}/${filename} /usr/lib/${filename} + fn_fetch_file "https://nightly.mtasa.com/files/modules/64/libmysqlclient.so.16" "${filedir}" "libmysqlclient.so.16" "executecmd" "norun" "noforce" "6c188e0f8fb5d7a29f4bc413b9fed6c2" + sudo mv "${tmpdir}/libmysqlclient.so.16" "/usr/lib/libmysqlclient.so.16" else fn_print_fail_nl "Failed to install libmysqlclient16, $(whoami) does not have sudo access. Download it manually and place it in /usr/lib" sleep 1 fi else - echo "libmysqlclient16 already installed." + echo "libmysqlclient16 already installed." fi } diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index ed8ad70ff..39c2934bc 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -48,7 +48,7 @@ fn_install_server_files_steamcmd(){ counter="0" while [ "${counter}" == "0" ]||[ "${exitcode}" != "0" ]; do counter=$((counter+1)) - cd "${rootdir}/steamcmd" + cd "${steamcmddir}" if [ "${counter}" -le "10" ]; then # Attempt 1-4: Standard attempt # Attempt 5-6: Validate attempt @@ -66,7 +66,7 @@ fn_install_server_files_steamcmd(){ find ${serverfiles} -type d -print0 | grep -Ez '[^/]{30}$' | xargs -0 rm -rf fi if [ "${counter}" -ge "9" ]; then - rm -rf "${rootdir}/steamcmd" + rm -rf "${steamcmddir}" check_steamcmd.sh fi diff --git a/lgsm/functions/logs.sh b/lgsm/functions/logs.sh index 44467d82f..2fd0fc626 100644 --- a/lgsm/functions/logs.sh +++ b/lgsm/functions/logs.sh @@ -37,7 +37,7 @@ if [ $(find "${scriptlogdir}"/ -type f -mtime +"${logdays}"|wc -l) -ne "0" ]; th sourcemodlogdir="${systemdir}/addons/sourcemod/logs" ulxlogdir="${systemdir}/data/ulx_logs" darkrplogdir="${systemdir}/data/darkrp_logs" - legacyserverlogdir="${rootdir}/log/server" + legacyserverlogdir="${logdir}/server" # Setting up counting variables scriptcount="0" ; consolecount="0" ; gamecount="0" ; srcdscount="0" ; smcount="0" ; ulxcount="0" ; darkrpcount="0" ; legacycount="0" sleep 1 diff --git a/lgsm/functions/monitor_gsquery.sh b/lgsm/functions/monitor_gsquery.sh index dc24aaee3..c874dc452 100644 --- a/lgsm/functions/monitor_gsquery.sh +++ b/lgsm/functions/monitor_gsquery.sh @@ -9,11 +9,6 @@ local commandname="MONITOR" local commandaction="Monitor" local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -# Forces legacy servers to use gsquery -if [ -z "${gsquery}" ]; then - gsquery="yes" -fi - if [ "${gsquery}" == "yes" ]; then # Downloads gsquery.py if missing diff --git a/lgsm/functions/update_mta.sh b/lgsm/functions/update_mta.sh index 9383b73e3..72aaf65ec 100644 --- a/lgsm/functions/update_mta.sh +++ b/lgsm/functions/update_mta.sh @@ -10,11 +10,10 @@ local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" fn_update_mta_dl(){ fn_fetch_file "http://linux.mtasa.com/dl/${numversion}/multitheftauto_linux_x64-${fullversion}.tar.gz" "${tmpdir}" "multitheftauto_linux_x64-${fullversion}.tar.gz" - mkdir "${tmpdir}/multitheftauto_linux_x64-${fullversion}" - fn_dl_extract "${tmpdir}" "multitheftauto_linux_x64-${fullversion}.tar.gz" "${tmpdir}/multitheftauto_linux_x64-${fullversion}" + fn_dl_extract "${tmpdir}" "multitheftauto_linux_x64-${fullversion}.tar.gz" "${tmpdir}" echo -e "copying to ${serverfiles}...\c" fn_script_log "Copying to ${serverfiles}" - cp -R "${tmpdir}/multitheftauto_linux_x64-${fullversion}/multitheftauto_linux_x64-${fullversion}/"* "${serverfiles}" + cp -R "${tmpdir}/multitheftauto_linux_x64-${fullversion}/"* "${serverfiles}" local exitcode=$? if [ "${exitcode}" == "0" ]; then fn_print_ok_eol_nl diff --git a/lgsm/functions/update_steamcmd.sh b/lgsm/functions/update_steamcmd.sh index 26096291f..09f25b2d9 100644 --- a/lgsm/functions/update_steamcmd.sh +++ b/lgsm/functions/update_steamcmd.sh @@ -17,7 +17,7 @@ fn_update_steamcmd_dl(){ fn_print_ok_nl "SteamCMD" fn_script_log_info "Starting SteamCMD" - cd "${rootdir}/steamcmd" + cd "${steamcmddir}" # Detects if unbuffer command is available for 32 bit distributions only. info_distro.sh @@ -25,6 +25,7 @@ fn_update_steamcmd_dl(){ unbuffer="stdbuf -i0 -o0 -e0" fi + cd "${steamcmddir}" if [ "${engine}" == "goldsource" ]; then ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" ${branch} +quit | tee -a "${scriptlog}" else @@ -146,7 +147,7 @@ fn_update_steamcmd_check(){ currentbuild=$(grep buildid "${appmanifestfile}" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -d\ -f3) # Removes appinfo.vdf as a fix for not always getting up to date version info from SteamCMD - cd "${rootdir}/steamcmd" + if [ -f "${HOME}/Steam/appcache/appinfo.vdf" ]; then rm -f "${HOME}/Steam/appcache/appinfo.vdf" fi @@ -160,6 +161,7 @@ fn_update_steamcmd_check(){ fi # Gets availablebuild info + cd "${steamcmddir}" availablebuild=$(./steamcmd.sh +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +app_info_print "${appid}" +quit | sed -n '/branch/,$p' | grep -m 1 buildid | tr -cd '[:digit:]') if [ -z "${availablebuild}" ]; then fn_print_fail "Checking for update: SteamCMD" diff --git a/linuxgsm.sh b/linuxgsm.sh index 9c26ac3c7..d2e71ca43 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -22,6 +22,7 @@ shortname="core" servername="core" gamename="core" lockselfname=".${servicename}.lock" +steamcmddir="${rootdir}/steamcmd" lgsmdir="${rootdir}/lgsm" functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" From 4bf75bf17d7318311cac439072cdb1aeb14bab99 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 16 Apr 2017 20:10:06 +0100 Subject: [PATCH 028/216] typo --- linuxgsm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index d2e71ca43..1cc6300d2 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -250,7 +250,7 @@ if [ "${shortname}" == "core" ]; then # Download the serverlist. This is the complete list of all supported servers. # Download to tmp dir - fn_boostrap_fetch_file "lgsm/data" "serverlist.csv" "${tmpdir}/data" "serverlist.csv" "noexecutecmd" "norun" "noforce" "nomd5" + fn_bootstrap_fetch_file "lgsm/data" "serverlist.csv" "${tmpdir}/data" "serverlist.csv" "noexecutecmd" "norun" "noforce" "nomd5" # if missing in lgsm dir copy it accross if [ ! -f "${serverlist}" ]; then mkdir -p "${datadir}" From 8bce2f28f5ca12969cd5012665ffade5a2c0aa2f Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 16 Apr 2017 20:20:15 +0100 Subject: [PATCH 029/216] fixed broken installer --- linuxgsm.sh | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index 1cc6300d2..7402cd354 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -43,7 +43,7 @@ githubbranch="feature/config" # Core Function that is required first core_functions.sh(){ functionfile="${FUNCNAME}" - fn_bootstrap_fetch_file "lgsm/functions" "core_functions.sh" "${functionsdir}" "_default.cfg" "noexecutecmd" "norun" "noforce" "nomd5" + fn_bootstrap_fetch_file_github "lgsm/functions" "core_functions.sh" "${functionsdir}" "_default.cfg" "noexecutecmd" "norun" "noforce" "nomd5" } # Bootstrap @@ -103,6 +103,21 @@ fn_bootstrap_fetch_file(){ fi } +fn_bootstrap_fetch_file_github(){ + github_file_url_dir="${1}" + github_file_url_name="${2}" + githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + + remote_fileurl="${githuburl}" + local_filedir="${3}" + local_filename="${github_file_url_name}" + chmodx="${4:-0}" + run="${5:-0}" + forcedl="${6:-0}" + md5="${7:-0}" + # Passes vars to the file download function + fn_bootstrap_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" +} # Installer menu @@ -250,7 +265,7 @@ if [ "${shortname}" == "core" ]; then # Download the serverlist. This is the complete list of all supported servers. # Download to tmp dir - fn_bootstrap_fetch_file "lgsm/data" "serverlist.csv" "${tmpdir}/data" "serverlist.csv" "noexecutecmd" "norun" "noforce" "nomd5" + fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${tmpdir}/data" "serverlist.csv" "noexecutecmd" "norun" "noforce" "nomd5" # if missing in lgsm dir copy it accross if [ ! -f "${serverlist}" ]; then mkdir -p "${datadir}" From 8bf21d6c44a7b12a249dc0a9e6628cd1e716c4ec Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 16 Apr 2017 20:25:30 +0100 Subject: [PATCH 030/216] moved get opt to correct location --- linuxgsm.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index 7402cd354..f1e21c33d 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -294,6 +294,8 @@ if [ "${shortname}" == "core" ]; then fn_server_info if [ "${result}" == "${servername}" ]; then fn_install_file + elif [ "${result}" == "" ]; then + echo "Install canceled" else echo "[ FAIL ] menu result does not match servername" fi @@ -342,7 +344,6 @@ else else source "${configdirserver}/${servicename}.cfg" fi -fi - -getopt=$1 -core_getopt.sh + getopt=$1 + core_getopt.sh +fi \ No newline at end of file From 930f41b4eb6f47ccafcf3d0a7e4b57a00a52d0c1 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 16 Apr 2017 21:03:48 +0100 Subject: [PATCH 031/216] fixing downloader --- lgsm/functions/core_functions.sh | 14 +++--- linuxgsm.sh | 76 ++++++++++++++++---------------- 2 files changed, 45 insertions(+), 45 deletions(-) diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index a821bf95b..f7a4ac79c 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -5,16 +5,11 @@ # Description: Defines all functions to allow download and execution of functions using fn_fetch_function. # This function is called first before any other function. Without this file other functions will not load. -# Creates tmp dir if missing -if [ ! -d "${tmpdir}" ]; then - mkdir -p "${tmpdir}" -fi - # Core core_dl.sh(){ functionfile="${FUNCNAME}" -fn_bootstrap_fetch_file +fn_bootstrap_fetch_file_github "lgsm/functions" "core_dl.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" } core_exit.sh(){ @@ -34,7 +29,7 @@ fn_fetch_function core_messages.sh(){ functionfile="${FUNCNAME}" -fn_bootstrap_fetch_file +fn_bootstrap_fetch_file_github "lgsm/functions" "core_messages.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" } @@ -541,6 +536,11 @@ functionfile="${FUNCNAME}" fn_fetch_function } +# Creates tmp dir if missing +if [ ! -d "${tmpdir}" ]; then + mkdir -p "${tmpdir}" +fi + # Calls on-screen messages (bootstrap) core_messages.sh diff --git a/linuxgsm.sh b/linuxgsm.sh index f1e21c33d..7270b3b87 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -43,7 +43,7 @@ githubbranch="feature/config" # Core Function that is required first core_functions.sh(){ functionfile="${FUNCNAME}" - fn_bootstrap_fetch_file_github "lgsm/functions" "core_functions.sh" "${functionsdir}" "_default.cfg" "noexecutecmd" "norun" "noforce" "nomd5" + fn_bootstrap_fetch_file_github "lgsm/functions" "core_functions.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" } # Bootstrap @@ -51,17 +51,17 @@ core_functions.sh(){ # Fetches core functions fn_bootstrap_fetch_file(){ - fileurl="${1}" - filedir="${2}" - filename="${3}" - executecmd="${4:-0}" + remote_fileurl="${1}" + local_filedir="${2}" + local_filename="${3}" + chmodx="${4:-0}" run="${5:-0}" - force="${6:-0}" + forcedl="${6:-0}" md5="${7:-0}" # If the file is missing, then download - if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" + if [ ! -f "${local_filedir}/${local_filename}" ]; then + if [ ! -d "${local_filedir}" ]; then + mkdir -p "${local_filedir}" fi # Check curl exists and use available path curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" @@ -74,12 +74,12 @@ fn_bootstrap_fetch_file(){ # If curl exists download file if [ "$(basename ${curlpath})" == "curl" ]; then # trap to remove part downloaded files - echo -ne " fetching ${filename}...\c" - curlcmd=$(${curlpath} -s --fail -L -o "${filedir}/${filename}" "${fileurl}" 2>&1) + echo -ne " fetching ${local_filename}...\c" + curlcmd=$(${curlpath} -s --fail -L -o "${local_filedir}/${local_filename}" "${remote_fileurl}" 2>&1) local exitcode=$? if [ ${exitcode} -ne 0 ]; then echo -e "\e[0;31mFAIL\e[0m\n" - echo -e "${fileurl}" | tee -a "${scriptlog}" + echo -e "${remote_fileurl}" | tee -a "${scriptlog}" echo "${curlcmd}" | tee -a "${scriptlog}" exit 1 else @@ -89,16 +89,16 @@ fn_bootstrap_fetch_file(){ echo "[ FAIL ] Curl is not installed" exit 1 fi - # make file executecmd if executecmd is set - if [ "${executecmd}" == "executecmd" ]; then - chmod +x "${filedir}/${filename}" + # make file chmodx if chmodx is set + if [ "${chmodx}" == "chmodx" ]; then + chmod +x "${local_filedir}/${local_filename}" fi fi - if [ -f "${filedir}/${filename}" ]; then + if [ -f "${local_filedir}/${local_filename}" ]; then # run file if run is set if [ "${run}" == "run" ]; then - source "${filedir}/${filename}" + source "${local_filedir}/${local_filename}" fi fi } @@ -108,15 +108,15 @@ fn_bootstrap_fetch_file_github(){ github_file_url_name="${2}" githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - remote_fileurl="${githuburl}" - local_filedir="${3}" - local_filename="${github_file_url_name}" + remote_remote_fileurl="${githuburl}" + local_local_filedir="${3}" + local_local_filename="${github_file_url_name}" chmodx="${4:-0}" run="${5:-0}" - forcedl="${6:-0}" + forcedldl="${6:-0}" md5="${7:-0}" # Passes vars to the file download function - fn_bootstrap_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" + fn_bootstrap_fetch_file "${remote_remote_fileurl}" "${local_local_filedir}" "${local_local_filename}" "${chmodx}" "${run}" "${forcedldl}" "${md5}" } # Installer menu @@ -174,7 +174,7 @@ fn_install_menu_whiptail() { menu_options+=( ${val//\"} "${key//\"}" ) done < $options OPTION=$(${menucmd} --title "${title}" --menu "${caption}" ${height} ${width} ${menuheight} "${menu_options[@]}" 3>&1 1>&2 2>&3) - if [ $? = 0 ]; then + if [ $? == 0 ]; then eval "$resultvar=\"${OPTION}\"" else eval "$resultvar=" @@ -228,25 +228,25 @@ fn_install_getopt(){ } fn_install_file(){ - filename="${servername}" - if [ -e "${filename}" ]; then + local_filename="${servername}" + if [ -e "${local_filename}" ]; then i=2 - while [ -e "${filename}-${i}" ] ; do + while [ -e "${local_filename}-${i}" ] ; do let i++ done - filename="${filename}-${i}" + local_filename="${local_filename}-${i}" fi - cp -R "${selfname}" "${filename}" - sed -i -e "s/shortname=\"core\"/shortname=\"${shortname}\"/g" "${filename}" - sed -i -e "s/servername=\"core\"/servername=\"${servername}\"/g" "${filename}" - sed -i -e "s/gamename=\"core\"/gamename=\"${gamename}\"/g" "${filename}" - echo "Installed ${gamename} server as ${filename}" - echo "./${filename} install" + cp -R "${selfname}" "${local_filename}" + sed -i -e "s/shortname=\"core\"/shortname=\"${shortname}\"/g" "${local_filename}" + sed -i -e "s/servername=\"core\"/servername=\"${servername}\"/g" "${local_filename}" + sed -i -e "s/gamename=\"core\"/gamename=\"${gamename}\"/g" "${local_filename}" + echo "Installed ${gamename} server as ${local_filename}" + echo "./${local_filename} install" exit } # Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then +if [ "$(whoami)" == "root" ]; then if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]; then echo "[ FAIL ] Do NOT run this script as root!" exit 1 @@ -265,7 +265,7 @@ if [ "${shortname}" == "core" ]; then # Download the serverlist. This is the complete list of all supported servers. # Download to tmp dir - fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${tmpdir}/data" "serverlist.csv" "noexecutecmd" "norun" "noforce" "nomd5" + fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${tmpdir}/data" "serverlist.csv" "nochmodx" "norun" "noforcedl" "nomd5" # if missing in lgsm dir copy it accross if [ ! -f "${serverlist}" ]; then mkdir -p "${datadir}" @@ -317,7 +317,7 @@ else # Load the default config. If missing download it. If changed reload it. if [ ! -f "${configdirdefault}/config-lgsm/${servername}/_default.cfg" ];then mkdir -p "${configdirdefault}/config-lgsm/${servername}" - fn_fetch_config "lgsm/config-default/config-lgsm/${servername}" "_default.cfg" "${configdirdefault}/config-lgsm/${servername}" "_default.cfg" "noexecutecmd" "norun" "noforce" "nomd5" + fn_fetch_config "lgsm/config-default/config-lgsm/${servername}" "_default.cfg" "${configdirdefault}/config-lgsm/${servername}" "_default.cfg" "nochmodx" "norun" "noforcedl" "nomd5" fi if [ ! -f "${configdirserver}/_default.cfg" ];then mkdir -p "${configdirserver}" @@ -332,14 +332,14 @@ else source "${configdirserver}/_default.cfg" # Load the common.cfg config. If missing download it if [ ! -f "${configdirserver}/common.cfg" ];then - fn_fetch_config "lgsm/config-default/config-lgsm" "common-template.cfg" "${configdirserver}" "common.cfg" "${executecmd}" "noexecutecmd" "norun" "noforce" "nomd5" + fn_fetch_config "lgsm/config-default/config-lgsm" "common-template.cfg" "${configdirserver}" "common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nomd5" source "${configdirserver}/common.cfg" else source "${configdirserver}/common.cfg" fi # Load the instance.cfg config. If missing download it if [ ! -f "${configdirserver}/${servicename}.cfg" ];then - fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${servicename}.cfg" "noexecutecmd" "norun" "noforce" "nomd5" + fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${servicename}.cfg" "nochmodx" "norun" "noforcedl" "nomd5" source "${configdirserver}/${servicename}.cfg" else source "${configdirserver}/${servicename}.cfg" From b486b1a5f7c52e9aa24da1c3c245d6177922f3a2 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 16 Apr 2017 21:16:17 +0100 Subject: [PATCH 032/216] fixed curl checkers --- lgsm/functions/core_dl.sh | 4 ++-- linuxgsm.sh | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index 665162859..f40959f0d 100644 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -233,8 +233,8 @@ fn_update_function(){ # Defines curl path -curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" -for curlpath in "${curlpaths}" +curl_paths_array=($(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl) +for curlpath in "${curl_paths_array}" do if [ -x "${curlpath}" ]; then break diff --git a/linuxgsm.sh b/linuxgsm.sh index 7270b3b87..dd8357855 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -63,9 +63,9 @@ fn_bootstrap_fetch_file(){ if [ ! -d "${local_filedir}" ]; then mkdir -p "${local_filedir}" fi - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlpath in ${curlpaths} + # Defines curl path + curl_paths_array=($(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl) + for curlpath in "${curl_paths_array}" do if [ -x "${curlpath}" ]; then break From 9fb96c6aeece376630f1b050e69e67fb70b12641 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 16 Apr 2017 22:24:53 +0100 Subject: [PATCH 033/216] added logdir --- linuxgsm.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index dd8357855..0207e8644 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -22,12 +22,13 @@ shortname="core" servername="core" gamename="core" lockselfname=".${servicename}.lock" -steamcmddir="${rootdir}/steamcmd" lgsmdir="${rootdir}/lgsm" +logdir="${rootdir}/log" +steamcmddir="${rootdir}/steamcmd" +serverfiles="${rootdir}/serverfiles" functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" -serverfiles="${rootdir}/serverfiles" configdir="${lgsmdir}/config-lgsm" configdirserver="${configdir}/${servername}" configdirdefault="${lgsmdir}/config-default" From 0759d00067207a092469a72ef6345fbd569a1054 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 16 Apr 2017 22:41:28 +0100 Subject: [PATCH 034/216] improved _default.cfg handling --- linuxgsm.sh | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index 0207e8644..8d95ae6b9 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -80,8 +80,10 @@ fn_bootstrap_fetch_file(){ local exitcode=$? if [ ${exitcode} -ne 0 ]; then echo -e "\e[0;31mFAIL\e[0m\n" - echo -e "${remote_fileurl}" | tee -a "${scriptlog}" - echo "${curlcmd}" | tee -a "${scriptlog}" + if [ -f "${scriptlog}" ]; then + echo -e "${remote_fileurl}" | tee -a "${scriptlog}" + echo "${curlcmd}" | tee -a "${scriptlog}" + fi exit 1 else echo -e "\e[0;32mOK\e[0m" @@ -322,12 +324,28 @@ else fi if [ ! -f "${configdirserver}/_default.cfg" ];then mkdir -p "${configdirserver}" + echo -ne " copying _default.cfg...\c" cp -R "${configdirdefault}/config-lgsm/${servername}/_default.cfg" "${configdirserver}/_default.cfg" + exitcode=$? + if [ ${exitcode} -ne 0 ]; then + echo -e "\e[0;31mFAIL\e[0m\n" + exit 1 + else + echo -e "\e[0;32mOK\e[0m" + fi else function_file_diff=$(diff -q ${configdirdefault}/config-lgsm/${servername}/_default.cfg ${configdirserver}/_default.cfg) if [ "${function_file_diff}" != "" ]; then - echo "_default.cfg has been altered. Reloading config." + fn_print_warn_nl "_default.cfg has been altered. reloading config." + echo -ne " copying _default.cfg...\c" cp -R "${configdirdefault}/config-lgsm/${servername}/_default.cfg" "${configdirserver}/_default.cfg" + exitcode=$? + if [ ${exitcode} -ne 0 ]; then + echo -e "\e[0;31mFAIL\e[0m\n" + exit 1 + else + echo -e "\e[0;32mOK\e[0m" + fi fi fi source "${configdirserver}/_default.cfg" From add483114f090d822a0d821b3013817eefa80ff1 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 28 Apr 2017 18:57:01 +0100 Subject: [PATCH 035/216] Testing main script file check --- lgsm/functions/command_update_functions.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lgsm/functions/command_update_functions.sh b/lgsm/functions/command_update_functions.sh index cf711023f..a3c5cd16a 100644 --- a/lgsm/functions/command_update_functions.sh +++ b/lgsm/functions/command_update_functions.sh @@ -26,6 +26,17 @@ else fn_print_ok_eol_nl fi +echo -ne " checking ${selfname}...\c" +config_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh")) +if [ "${config_file_diff}" != "" ]; then + fn_print_update_eol_nl + fn_script_log_info "checking ${selfname}: UPDATE" + rm -f "${tmpdir}/linuxgsm.sh" + fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "linuxgsm.sh" "noexecutecmd" "norun" "noforce" "nomd5" +else + fn_print_ok_eol_nl +fi + # Check and update functions if [ -n "${functionsdir}" ]; then if [ -d "${functionsdir}" ]; then From 664a7d6da1a6674c596d8c34e059286996c5fd8d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 28 Apr 2017 19:03:46 +0100 Subject: [PATCH 036/216] download linuxgsm.sh in to tmp dir for comparisons --- linuxgsm.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/linuxgsm.sh b/linuxgsm.sh index 8d95ae6b9..811ea5db9 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -363,6 +363,10 @@ else else source "${configdirserver}/${servicename}.cfg" fi + # Load the linuxgsm.sh in to tmpdir. If missing download it + if [ ! -f "${tmpdir}/linuxgsm.sh" ];then + fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "nochmodx" "norun" "noforcedl" "nomd5" + fi getopt=$1 core_getopt.sh fi \ No newline at end of file From 9ac42470fe24c8c09f2c155e229603ba22ccd0e3 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 28 Apr 2017 19:05:29 +0100 Subject: [PATCH 037/216] re wording --- lgsm/functions/command_update_functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/command_update_functions.sh b/lgsm/functions/command_update_functions.sh index a3c5cd16a..a05269d4e 100644 --- a/lgsm/functions/command_update_functions.sh +++ b/lgsm/functions/command_update_functions.sh @@ -26,7 +26,7 @@ else fn_print_ok_eol_nl fi -echo -ne " checking ${selfname}...\c" +echo -ne " checking linuxgsm.sh...\c" config_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh")) if [ "${config_file_diff}" != "" ]; then fn_print_update_eol_nl From 87927d82eb926317f3a565699c6213a17eab7954 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 28 Apr 2017 19:08:08 +0100 Subject: [PATCH 038/216] now checks and replaces linuxgsm.sh in tmpdir --- lgsm/functions/command_update_functions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/command_update_functions.sh b/lgsm/functions/command_update_functions.sh index a05269d4e..a1f05e0e1 100644 --- a/lgsm/functions/command_update_functions.sh +++ b/lgsm/functions/command_update_functions.sh @@ -28,11 +28,11 @@ fi echo -ne " checking linuxgsm.sh...\c" config_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh")) -if [ "${config_file_diff}" != "" ]; then +if [ "${config_script_diff}" != "" ]; then fn_print_update_eol_nl fn_script_log_info "checking ${selfname}: UPDATE" rm -f "${tmpdir}/linuxgsm.sh" - fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "linuxgsm.sh" "noexecutecmd" "norun" "noforce" "nomd5" + fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "nochmodx" "norun" "noforcedl" "nomd5" else fn_print_ok_eol_nl fi From ece8bc52be2629ed90e6cf285a17137812282d08 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 1 May 2017 17:18:25 +0100 Subject: [PATCH 039/216] removed duplicate tf2 info --- lgsm/functions/info_glibc.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/lgsm/functions/info_glibc.sh b/lgsm/functions/info_glibc.sh index f4c1a3f95..ef89fccbc 100644 --- a/lgsm/functions/info_glibc.sh +++ b/lgsm/functions/info_glibc.sh @@ -149,9 +149,6 @@ elif [ "${engine}" == "unreal4" ]; then elif [ "${engine}" == "unity3d" ]; then glibcrequired="2.15" glibcfix="no" -elif [ "${engine}" == "Team Fortress 2" ]; then - glibcrequired="2.15" - glibcfix="yes" elif [ "${gamename}" == "TeamSpeak 3" ]; then glibcrequired="NOT REQUIRED" glibcfix="no" From 22a8f19eee5b991b837c9e3c6f2e884a0ea5b820 Mon Sep 17 00:00:00 2001 From: Digital-Storm Date: Tue, 2 May 2017 16:59:53 -0400 Subject: [PATCH 040/216] Add updatebranch variable Add updatebranch variable. --- Factorio/fctrserver | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Factorio/fctrserver b/Factorio/fctrserver index a149b4684..2100c2733 100644 --- a/Factorio/fctrserver +++ b/Factorio/fctrserver @@ -49,6 +49,7 @@ channeltag="" ## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update updateonstart="off" +updatebranch="stable" ## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup maxbackups="4" @@ -187,4 +188,4 @@ fi core_dl.sh core_functions.sh getopt=$1 -core_getopt.sh \ No newline at end of file +core_getopt.sh From e4e18f7122ae0a86ce89e62f55a242283611a3d8 Mon Sep 17 00:00:00 2001 From: Digital-Storm Date: Tue, 2 May 2017 17:03:22 -0400 Subject: [PATCH 041/216] Added support for mimetype application/x-xz Factorio now uses the mimetype application/x-xz for compressed experimental builds. Added the tar extraction command for this. --- lgsm/functions/core_dl.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index d6c9b58ca..606f0b442 100644 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -60,6 +60,8 @@ fn_dl_extract(){ tarcmd=$(tar -zxf "${filedir}/${filename}" -C "${extractdir}") elif [ "${mime}" == "application/x-bzip2" ]; then tarcmd=$(tar -jxf "${filedir}/${filename}" -C "${extractdir}") + elif [ "${mime}" == "application/x-xz" ]; then + tarcmd=$(tar -xf "${filedir}/${filename}" -C "${extractdir}") elif [ "${mime}" == "application/zip" ]; then tarcmd=$(unzip -d "${extractdir}" "${filedir}/${filename}") fi From 3b49592e9149a0aed99b9ac14da54378d2b9bb3d Mon Sep 17 00:00:00 2001 From: Digital-Storm Date: Tue, 2 May 2017 17:05:05 -0400 Subject: [PATCH 042/216] currentbuild return only 1 line Current experimental loads multiple base version files, modified to tail -1 and return only 1 line, so updater checks version properly. --- lgsm/functions/update_factorio.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/update_factorio.sh b/lgsm/functions/update_factorio.sh index cbb39ef18..934a30dbb 100644 --- a/lgsm/functions/update_factorio.sh +++ b/lgsm/functions/update_factorio.sh @@ -49,7 +49,7 @@ fn_update_factorio_currentbuild(){ fi # Get current build from logs - currentbuild=$(grep "Loading mod base" "${consolelogdir}"/"${servicename}"-console.log 2> /dev/null|awk '{print $5}') + currentbuild=$(grep "Loading mod base" "${consolelogdir}"/"${servicename}"-console.log 2> /dev/null|awk '{print $5}'|tail -1) if [ -z "${currentbuild}" ]; then fn_print_error_nl "Checking for update: factorio.com: Current build version not found" fn_script_log_error "Checking for update: factorio.com: Current build version not found" @@ -60,7 +60,7 @@ fn_update_factorio_currentbuild(){ command_stop.sh exitbypass=1 command_start.sh - currentbuild=$(grep "Loading mod base" "${consolelogdir}"/"${servicename}"-console.log 2> /dev/null|awk '{print $5}') + currentbuild=$(grep "Loading mod base" "${consolelogdir}"/"${servicename}"-console.log 2> /dev/null|awk '{print $5}'|tail -1) if [ -z "${currentbuild}" ]; then fn_print_fail_nl "Checking for update: factorio.com: Current build version still not found" fn_script_log_fatal "Checking for update: factorio.com: Current build version still not found" From e2f05f1ff3309397b780373044ae0670d8a28b1a Mon Sep 17 00:00:00 2001 From: Digital-Storm Date: Tue, 2 May 2017 17:07:21 -0400 Subject: [PATCH 043/216] Modified available build to use updatebranch var Added updatebranch var to the available build url. --- lgsm/functions/update_factorio.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/update_factorio.sh b/lgsm/functions/update_factorio.sh index 934a30dbb..5b9d64e8d 100644 --- a/lgsm/functions/update_factorio.sh +++ b/lgsm/functions/update_factorio.sh @@ -76,7 +76,7 @@ fn_update_factorio_arch(){ fn_update_factorio_availablebuild(){ # Gets latest build info. - availablebuild=$(curl -s https://www.factorio.com/download-headless/stable | grep 'headless/linux64' | head -n 1 | grep -oP '(?<=get-download/).*?(?=/)') + availablebuild=$(curl -s https://www.factorio.com/download-headless/"${updatebranch}" | grep 'headless/linux64' | head -n 1 | grep -oP '(?<=get-download/).*?(?=/)') sleep 1 # Checks if availablebuild variable has been set From a7756d8102de7958953972b42b7deaaca6780241 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 4 May 2017 00:14:19 +0100 Subject: [PATCH 044/216] corrected date --- Insurgency/insserver | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Insurgency/insserver b/Insurgency/insserver index 429c1ac56..95efd7b8c 100644 --- a/Insurgency/insserver +++ b/Insurgency/insserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170530" +version="170501" ########################## ######## Settings ######## From cfb0b17d6e44cddcb66e34c8097cd8f787515a99 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 4 May 2017 00:29:45 +0100 Subject: [PATCH 045/216] Basic self update feature work in progress --- lgsm/functions/command_update_functions.sh | 27 +++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/lgsm/functions/command_update_functions.sh b/lgsm/functions/command_update_functions.sh index a1f05e0e1..081fa4f4f 100644 --- a/lgsm/functions/command_update_functions.sh +++ b/lgsm/functions/command_update_functions.sh @@ -27,12 +27,33 @@ else fi echo -ne " checking linuxgsm.sh...\c" -config_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh")) -if [ "${config_script_diff}" != "" ]; then +tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh")) +if [ "${tmp_script_diff}" != "" ]; then fn_print_update_eol_nl fn_script_log_info "checking ${selfname}: UPDATE" rm -f "${tmpdir}/linuxgsm.sh" - fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "nochmodx" "norun" "noforcedl" "nomd5" + fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "linuxgsm.sh" "noexecutecmd" "norun" "noforce" "nomd5" + # Compare selfname against linuxgsm.sh in the tmp dir. Ignoring server specific vars. + script_diff=$(diff <(sed '/shortname/d;/servername/d;/gamename/d' "${tmpdir}/linuxgsm.sh") <(sed '/shortname/d;/servername/d;/gamename/d' "${rootdir}/${selfname}")) + if [ "${script_diff}" != "" ]; then + echo -ne " backup linuxgsm.sh...\c" + cp "${rootdir}/${selfname}" "${tmpdir}/${selfname}-$(date +"%m_%d_%Y_%M").bak" + if [ $? -ne 0 ]; then + fn_print_fail_eol_nl + core_exit.sh + else + fn_print_ok_eol_nl + echo -en "${tmpdir}/${selfname}-$(date +"%m_%d_%Y_%M").bak" + fi + copyshortname="$(grep -m 1 shortname=)" "${rootdir}/${selfname}" + copyservername="$(grep -m 1 servername=)" "${rootdir}/${selfname}" + copygamename="$(grep -m 1 gamename=)" "${rootdir}/${selfname}" + + cp "${tmpdir}/linuxgsm.sh" "${rootdir}/${selfname}" + sed -i 's/shortname="core"/${copyshortname}/g' "${rootdir}/${selfname}" + sed -i 's/shortname="core"/${copyshortname}/g' "${rootdir}/${selfname}" + sed -i 's/shortname="core"/${copyshortname}/g' "${rootdir}/${selfname}" + fi else fn_print_ok_eol_nl fi From c5756d8e846513aff06257136dd409f9f54e8588 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 4 May 2017 00:53:38 +0100 Subject: [PATCH 046/216] Further improvements --- lgsm/functions/command_update_functions.sh | 38 +++++++++++----------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/lgsm/functions/command_update_functions.sh b/lgsm/functions/command_update_functions.sh index 081fa4f4f..255471582 100644 --- a/lgsm/functions/command_update_functions.sh +++ b/lgsm/functions/command_update_functions.sh @@ -34,26 +34,26 @@ if [ "${tmp_script_diff}" != "" ]; then rm -f "${tmpdir}/linuxgsm.sh" fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "linuxgsm.sh" "noexecutecmd" "norun" "noforce" "nomd5" # Compare selfname against linuxgsm.sh in the tmp dir. Ignoring server specific vars. - script_diff=$(diff <(sed '/shortname/d;/servername/d;/gamename/d' "${tmpdir}/linuxgsm.sh") <(sed '/shortname/d;/servername/d;/gamename/d' "${rootdir}/${selfname}")) - if [ "${script_diff}" != "" ]; then - echo -ne " backup linuxgsm.sh...\c" - cp "${rootdir}/${selfname}" "${tmpdir}/${selfname}-$(date +"%m_%d_%Y_%M").bak" - if [ $? -ne 0 ]; then - fn_print_fail_eol_nl - core_exit.sh - else - fn_print_ok_eol_nl - echo -en "${tmpdir}/${selfname}-$(date +"%m_%d_%Y_%M").bak" - fi - copyshortname="$(grep -m 1 shortname=)" "${rootdir}/${selfname}" - copyservername="$(grep -m 1 servername=)" "${rootdir}/${selfname}" - copygamename="$(grep -m 1 gamename=)" "${rootdir}/${selfname}" - - cp "${tmpdir}/linuxgsm.sh" "${rootdir}/${selfname}" - sed -i 's/shortname="core"/${copyshortname}/g' "${rootdir}/${selfname}" - sed -i 's/shortname="core"/${copyshortname}/g' "${rootdir}/${selfname}" - sed -i 's/shortname="core"/${copyshortname}/g' "${rootdir}/${selfname}" +fi +script_diff=$(diff <(sed '/shortname/d;/servername/d;/gamename/d' "${tmpdir}/linuxgsm.sh") <(sed '/shortname/d;/servername/d;/gamename/d' "${rootdir}/${selfname}")) +if [ "${script_diff}" != "" ]; then + echo -ne " backup linuxgsm.sh...\c" + cp "${rootdir}/${selfname}" "${tmpdir}/${selfname}-$(date +"%m_%d_%Y_%M").bak" + if [ $? -ne 0 ]; then + fn_print_fail_eol_nl + core_exit.sh + else + fn_print_ok_eol_nl + echo -en "${tmpdir}/${selfname}-$(date +"%m_%d_%Y_%M").bak" fi + copyshortname="$(grep -m 1 shortname= "${rootdir}/${selfname}")" + copyservername="$(grep -m 1 servername= "${rootdir}/${selfname}")" + copygamename="$(grep -m 1 gamename= "${rootdir}/${selfname}")" + + cp "${tmpdir}/linuxgsm.sh" "${rootdir}/${selfname}" + sed -i 's/shortname="core"/${copyshortname}/g' "${rootdir}/${selfname}" + sed -i 's/shortname="core"/${copyshortname}/g' "${rootdir}/${selfname}" + sed -i 's/shortname="core"/${copyshortname}/g' "${rootdir}/${selfname}" else fn_print_ok_eol_nl fi From dae72efd96b03419e9fbc1195b72caa78c72d51a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 4 May 2017 00:56:01 +0100 Subject: [PATCH 047/216] double quotes --- lgsm/functions/command_update_functions.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lgsm/functions/command_update_functions.sh b/lgsm/functions/command_update_functions.sh index 255471582..808d87951 100644 --- a/lgsm/functions/command_update_functions.sh +++ b/lgsm/functions/command_update_functions.sh @@ -51,9 +51,9 @@ if [ "${script_diff}" != "" ]; then copygamename="$(grep -m 1 gamename= "${rootdir}/${selfname}")" cp "${tmpdir}/linuxgsm.sh" "${rootdir}/${selfname}" - sed -i 's/shortname="core"/${copyshortname}/g' "${rootdir}/${selfname}" - sed -i 's/shortname="core"/${copyshortname}/g' "${rootdir}/${selfname}" - sed -i 's/shortname="core"/${copyshortname}/g' "${rootdir}/${selfname}" + sed -i "'"s/shortname="core"/${copyshortname}/g"'" "${rootdir}/${selfname}" + sed -i "'"s/shortname="core"/${copyservername}/g"'" "${rootdir}/${selfname}" + sed -i "'"s/shortname="core"/${copygamename}/g"'" "${rootdir}/${selfname}" else fn_print_ok_eol_nl fi From 9ccb9f68b20e9eeba814a079cf09e96e2d7f4b13 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 4 May 2017 00:59:36 +0100 Subject: [PATCH 048/216] thanks autocomplete --- lgsm/functions/command_update_functions.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lgsm/functions/command_update_functions.sh b/lgsm/functions/command_update_functions.sh index 808d87951..848c65b68 100644 --- a/lgsm/functions/command_update_functions.sh +++ b/lgsm/functions/command_update_functions.sh @@ -51,9 +51,9 @@ if [ "${script_diff}" != "" ]; then copygamename="$(grep -m 1 gamename= "${rootdir}/${selfname}")" cp "${tmpdir}/linuxgsm.sh" "${rootdir}/${selfname}" - sed -i "'"s/shortname="core"/${copyshortname}/g"'" "${rootdir}/${selfname}" - sed -i "'"s/shortname="core"/${copyservername}/g"'" "${rootdir}/${selfname}" - sed -i "'"s/shortname="core"/${copygamename}/g"'" "${rootdir}/${selfname}" + sed -i "s/shortname="core"/${copyshortname}/g" "${rootdir}/${selfname}" + sed -i "s/shortname="core"/${copyservername}/g" "${rootdir}/${selfname}" + sed -i "s/shortname="core"/${copygamename}/g" "${rootdir}/${selfname}" else fn_print_ok_eol_nl fi From 8dfb3adf4bfce9153877b2e92e57171139299046 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 4 May 2017 18:52:57 +0100 Subject: [PATCH 049/216] fixing sed --- lgsm/functions/command_update_functions.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lgsm/functions/command_update_functions.sh b/lgsm/functions/command_update_functions.sh index 848c65b68..a729e4084 100644 --- a/lgsm/functions/command_update_functions.sh +++ b/lgsm/functions/command_update_functions.sh @@ -51,9 +51,9 @@ if [ "${script_diff}" != "" ]; then copygamename="$(grep -m 1 gamename= "${rootdir}/${selfname}")" cp "${tmpdir}/linuxgsm.sh" "${rootdir}/${selfname}" - sed -i "s/shortname="core"/${copyshortname}/g" "${rootdir}/${selfname}" - sed -i "s/shortname="core"/${copyservername}/g" "${rootdir}/${selfname}" - sed -i "s/shortname="core"/${copygamename}/g" "${rootdir}/${selfname}" + sed -i "s/shortname=\"core\"/shortname=\"${shortname}\"/g" "${rootdir}/${selfname}" + sed -i "s/servername=\"core\"/servername=\"${servername}\"/g" "${rootdir}/${selfname}" + sed -i "s/gamename=\"core\"/gamename=\"${gamename}\"/g" "${rootdir}/${selfname}" else fn_print_ok_eol_nl fi From 4e1ac470a0cfa4e62984ec6e8d0ed116974cc413 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 4 May 2017 18:57:05 +0100 Subject: [PATCH 050/216] tidy up --- lgsm/functions/command_update_functions.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lgsm/functions/command_update_functions.sh b/lgsm/functions/command_update_functions.sh index a729e4084..2b15a2d86 100644 --- a/lgsm/functions/command_update_functions.sh +++ b/lgsm/functions/command_update_functions.sh @@ -34,6 +34,8 @@ if [ "${tmp_script_diff}" != "" ]; then rm -f "${tmpdir}/linuxgsm.sh" fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "linuxgsm.sh" "noexecutecmd" "norun" "noforce" "nomd5" # Compare selfname against linuxgsm.sh in the tmp dir. Ignoring server specific vars. +else + fn_print_ok_eol_nl fi script_diff=$(diff <(sed '/shortname/d;/servername/d;/gamename/d' "${tmpdir}/linuxgsm.sh") <(sed '/shortname/d;/servername/d;/gamename/d' "${rootdir}/${selfname}")) if [ "${script_diff}" != "" ]; then @@ -46,9 +48,6 @@ if [ "${script_diff}" != "" ]; then fn_print_ok_eol_nl echo -en "${tmpdir}/${selfname}-$(date +"%m_%d_%Y_%M").bak" fi - copyshortname="$(grep -m 1 shortname= "${rootdir}/${selfname}")" - copyservername="$(grep -m 1 servername= "${rootdir}/${selfname}")" - copygamename="$(grep -m 1 gamename= "${rootdir}/${selfname}")" cp "${tmpdir}/linuxgsm.sh" "${rootdir}/${selfname}" sed -i "s/shortname=\"core\"/shortname=\"${shortname}\"/g" "${rootdir}/${selfname}" From ee302aca4071b186866b298150cd43791116b096 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 4 May 2017 18:59:33 +0100 Subject: [PATCH 051/216] corrected fetch file --- lgsm/functions/command_update_functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/command_update_functions.sh b/lgsm/functions/command_update_functions.sh index 2b15a2d86..98de90669 100644 --- a/lgsm/functions/command_update_functions.sh +++ b/lgsm/functions/command_update_functions.sh @@ -32,7 +32,7 @@ if [ "${tmp_script_diff}" != "" ]; then fn_print_update_eol_nl fn_script_log_info "checking ${selfname}: UPDATE" rm -f "${tmpdir}/linuxgsm.sh" - fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "linuxgsm.sh" "noexecutecmd" "norun" "noforce" "nomd5" + fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "nochmodx" "norun" "noforcedl" "nomd5" # Compare selfname against linuxgsm.sh in the tmp dir. Ignoring server specific vars. else fn_print_ok_eol_nl From d4c14e215866779acac8e53aa056e3c1320b43f4 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 4 May 2017 19:13:07 +0100 Subject: [PATCH 052/216] using selfname --- lgsm/functions/command_update_functions.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/command_update_functions.sh b/lgsm/functions/command_update_functions.sh index 98de90669..05c19566a 100644 --- a/lgsm/functions/command_update_functions.sh +++ b/lgsm/functions/command_update_functions.sh @@ -26,7 +26,7 @@ else fn_print_ok_eol_nl fi -echo -ne " checking linuxgsm.sh...\c" +echo -ne " checking remote linuxgsm.sh...\c" tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh")) if [ "${tmp_script_diff}" != "" ]; then fn_print_update_eol_nl @@ -37,9 +37,10 @@ if [ "${tmp_script_diff}" != "" ]; then else fn_print_ok_eol_nl fi +echo -ne " checking ${selfname}...\c" script_diff=$(diff <(sed '/shortname/d;/servername/d;/gamename/d' "${tmpdir}/linuxgsm.sh") <(sed '/shortname/d;/servername/d;/gamename/d' "${rootdir}/${selfname}")) if [ "${script_diff}" != "" ]; then - echo -ne " backup linuxgsm.sh...\c" + echo -ne " backup ${selfname}...\c" cp "${rootdir}/${selfname}" "${tmpdir}/${selfname}-$(date +"%m_%d_%Y_%M").bak" if [ $? -ne 0 ]; then fn_print_fail_eol_nl From 7fd3177c8982e7d1975713ac5b72b6dc7a72a61b Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 4 May 2017 19:20:14 +0100 Subject: [PATCH 053/216] renaming update_functions to update_linuxgsm --- lgsm/functions/check.sh | 2 +- ...ommand_update_functions.sh => command_update_linuxgsm.sh} | 2 +- lgsm/functions/core_functions.sh | 5 +++++ lgsm/functions/core_getopt.sh | 4 ++-- 4 files changed, 9 insertions(+), 4 deletions(-) rename lgsm/functions/{command_update_functions.sh => command_update_linuxgsm.sh} (98%) diff --git a/lgsm/functions/check.sh b/lgsm/functions/check.sh index ec067de66..5fd1bc241 100644 --- a/lgsm/functions/check.sh +++ b/lgsm/functions/check.sh @@ -17,7 +17,7 @@ if [ "${function_selfname}" != "command_monitor.sh" ];then check_permissions.sh fi -if [ "${function_selfname}" != "command_install.sh" ]&&[ "${function_selfname}" != "command_update_functions.sh" ]&&[ "${function_selfname}" != "command_details.sh" ]&&[ "${function_selfname}" != "command_postdetails.sh" ]; then +if [ "${function_selfname}" != "command_install.sh" ]&&[ "${function_selfname}" != "command_update_functions.sh" ]&&[ "${function_selfname}" != "command_update_linuxgsm.sh" ]&&[ "${function_selfname}" != "command_details.sh" ]&&[ "${function_selfname}" != "command_postdetails.sh" ]; then check_system_dir.sh fi diff --git a/lgsm/functions/command_update_functions.sh b/lgsm/functions/command_update_linuxgsm.sh similarity index 98% rename from lgsm/functions/command_update_functions.sh rename to lgsm/functions/command_update_linuxgsm.sh index 05c19566a..991da06eb 100644 --- a/lgsm/functions/command_update_functions.sh +++ b/lgsm/functions/command_update_linuxgsm.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LinuxGSM command_update_functions.sh function +# LinuxGSM command_update_linuxgsm.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Deletes the functions dir to allow re-downloading of functions from GitHub. diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index f7a4ac79c..d915b1c9f 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -392,6 +392,11 @@ functionfile="${FUNCNAME}" fn_fetch_function } +command_update_linuxgsm.sh(){ +functionfile="${FUNCNAME}" +fn_fetch_function +} + command_update.sh(){ functionfile="${FUNCNAME}" fn_fetch_function diff --git a/lgsm/functions/core_getopt.sh b/lgsm/functions/core_getopt.sh index a17487eb5..79275ed43 100644 --- a/lgsm/functions/core_getopt.sh +++ b/lgsm/functions/core_getopt.sh @@ -17,7 +17,7 @@ cmd_restart=( "r;restart" "command_restart.sh" "Restart the server." ) cmd_details=( "dt;details" "command_details.sh" "Display server information." ) cmd_postdetails=( "pd;postdetails" "command_postdetails.sh" "Post details to hastebin (removing passwords)." ) cmd_backup=( "b;backup" "command_backup.sh" "Create backup archives of the server." ) -cmd_update_functions=( "ul;update-lgsm;uf;update-functions" "command_update_functions.sh" "Update LinuxGSM functions." ) +cmd_update_linuxgsm=( "ul;update-lgsm;uf;update-functions" "command_update_linuxgsm.sh" "Update LinuxGSM." ) cmd_test_alert=( "ta;test-alert" "command_test_alert.sh" "Send a test alert." ) cmd_monitor=( "m;monitor" "command_monitor.sh" "Check server status and restart if crashed." ) # Console servers only @@ -66,7 +66,7 @@ if [ -n "${appid}" ]; then fi # Update LGSM -currentopt+=( "${cmd_update_functions[@]}" ) +currentopt+=( "${cmd_update_linuxgsm[@]}" ) #Backup currentopt+=( "${cmd_backup[@]}" ) From 938d94c8f855c0076d9e8febbd667376048f3092 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 4 May 2017 19:24:45 +0100 Subject: [PATCH 054/216] setup redirect --- lgsm/functions/command_update_functions.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 lgsm/functions/command_update_functions.sh diff --git a/lgsm/functions/command_update_functions.sh b/lgsm/functions/command_update_functions.sh new file mode 100644 index 000000000..5233a38a7 --- /dev/null +++ b/lgsm/functions/command_update_functions.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# LinuxGSM command_update_functions.sh function +# Author: Daniel Gibbs +# Website: https://gameservermanagers.com +# Description: Deletes the functions dir to allow re-downloading of functions from GitHub. +# Legacy Command + +command_update_linuxgsm.sh \ No newline at end of file From dadeaed9754fc391e690445a2c7808efa56ef256 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 4 May 2017 19:25:44 +0100 Subject: [PATCH 055/216] redirect --- lgsm/functions/command_update_functions.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lgsm/functions/command_update_functions.sh b/lgsm/functions/command_update_functions.sh index 5233a38a7..f8acf652b 100644 --- a/lgsm/functions/command_update_functions.sh +++ b/lgsm/functions/command_update_functions.sh @@ -5,4 +5,9 @@ # Description: Deletes the functions dir to allow re-downloading of functions from GitHub. # Legacy Command +command_update_linuxgsm.sh(){ +functionfile="${FUNCNAME}" +fn_fetch_function +} + command_update_linuxgsm.sh \ No newline at end of file From d34833efceec92666973eea185bec08d89adebaf Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 4 May 2017 19:35:48 +0100 Subject: [PATCH 056/216] improving messages --- lgsm/functions/command_update_linuxgsm.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/functions/command_update_linuxgsm.sh index 991da06eb..ee69a7a96 100644 --- a/lgsm/functions/command_update_linuxgsm.sh +++ b/lgsm/functions/command_update_linuxgsm.sh @@ -26,7 +26,7 @@ else fn_print_ok_eol_nl fi -echo -ne " checking remote linuxgsm.sh...\c" +echo -ne " checking linuxgsm.sh...\c" tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh")) if [ "${tmp_script_diff}" != "" ]; then fn_print_update_eol_nl @@ -40,6 +40,7 @@ fi echo -ne " checking ${selfname}...\c" script_diff=$(diff <(sed '/shortname/d;/servername/d;/gamename/d' "${tmpdir}/linuxgsm.sh") <(sed '/shortname/d;/servername/d;/gamename/d' "${rootdir}/${selfname}")) if [ "${script_diff}" != "" ]; then + fn_print_update_eol_nl echo -ne " backup ${selfname}...\c" cp "${rootdir}/${selfname}" "${tmpdir}/${selfname}-$(date +"%m_%d_%Y_%M").bak" if [ $? -ne 0 ]; then @@ -47,13 +48,19 @@ if [ "${script_diff}" != "" ]; then core_exit.sh else fn_print_ok_eol_nl - echo -en "${tmpdir}/${selfname}-$(date +"%m_%d_%Y_%M").bak" + echo -e " Backup: ${tmpdir}/${selfname}-$(date +"%m_%d_%Y_%M").bak" fi - + echo -ne " fetch ${selfname}...\c" cp "${tmpdir}/linuxgsm.sh" "${rootdir}/${selfname}" sed -i "s/shortname=\"core\"/shortname=\"${shortname}\"/g" "${rootdir}/${selfname}" sed -i "s/servername=\"core\"/servername=\"${servername}\"/g" "${rootdir}/${selfname}" sed -i "s/gamename=\"core\"/gamename=\"${gamename}\"/g" "${rootdir}/${selfname}" + if [ $? -ne 0 ]; then + fn_print_fail_eol_nl + core_exit.sh + else + fn_print_ok_eol_nl + fi else fn_print_ok_eol_nl fi From f6a53387672e5e84159f78548eea943cc8899183 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 4 May 2017 21:38:50 +0100 Subject: [PATCH 057/216] moved linuxgsm.sh to tmpdir --- lgsm/functions/command_update_linuxgsm.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/functions/command_update_linuxgsm.sh index ee69a7a96..a6de4f26f 100644 --- a/lgsm/functions/command_update_linuxgsm.sh +++ b/lgsm/functions/command_update_linuxgsm.sh @@ -24,21 +24,23 @@ if [ "${config_file_diff}" != "" ]; then fn_fetch_config "lgsm/config-default/config-lgsm/${servername}" "_default.cfg" "${configdirdefault}/config-lgsm/${servername}" "_default.cfg" "noexecutecmd" "norun" "noforce" "nomd5" else fn_print_ok_eol_nl + fn_script_log_info "checking config _default.cfg: OK" fi echo -ne " checking linuxgsm.sh...\c" -tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh")) +tmp_script_diff=$(diff "${functionsdir}/linuxgsm.sh" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh")) if [ "${tmp_script_diff}" != "" ]; then fn_print_update_eol_nl - fn_script_log_info "checking ${selfname}: UPDATE" - rm -f "${tmpdir}/linuxgsm.sh" + fn_script_log_info "checking linuxgsm.sh: UPDATE" + rm -f "${functionsdir}/linuxgsm.sh" fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "nochmodx" "norun" "noforcedl" "nomd5" # Compare selfname against linuxgsm.sh in the tmp dir. Ignoring server specific vars. else + fn_script_log_info "checking linuxgsm.sh: OK" fn_print_ok_eol_nl fi echo -ne " checking ${selfname}...\c" -script_diff=$(diff <(sed '/shortname/d;/servername/d;/gamename/d' "${tmpdir}/linuxgsm.sh") <(sed '/shortname/d;/servername/d;/gamename/d' "${rootdir}/${selfname}")) +script_diff=$(diff <(sed '/shortname/d;/servername/d;/gamename/d' "${functionsdir}/linuxgsm.sh") <(sed '/shortname/d;/servername/d;/gamename/d' "${rootdir}/${selfname}")) if [ "${script_diff}" != "" ]; then fn_print_update_eol_nl echo -ne " backup ${selfname}...\c" @@ -50,8 +52,8 @@ if [ "${script_diff}" != "" ]; then fn_print_ok_eol_nl echo -e " Backup: ${tmpdir}/${selfname}-$(date +"%m_%d_%Y_%M").bak" fi - echo -ne " fetch ${selfname}...\c" - cp "${tmpdir}/linuxgsm.sh" "${rootdir}/${selfname}" + echo -ne " fetching ${selfname}...\c" + cp "${functionsdir}/linuxgsm.sh" "${rootdir}/${selfname}" sed -i "s/shortname=\"core\"/shortname=\"${shortname}\"/g" "${rootdir}/${selfname}" sed -i "s/servername=\"core\"/servername=\"${servername}\"/g" "${rootdir}/${selfname}" sed -i "s/gamename=\"core\"/gamename=\"${gamename}\"/g" "${rootdir}/${selfname}" From fbef65489e207c50a0827818013245da9a6375d5 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 4 May 2017 21:39:38 +0100 Subject: [PATCH 058/216] removed gamename as not required to start the server --- linuxgsm.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index 811ea5db9..a31fea535 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -2,11 +2,13 @@ # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs # License: MIT License, Copyright (c) 2017 Daniel Gibbs -# Purpose: Counter-Strike: Global Offensive | Server Management Script +# Purpose: Linux Game Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki # Website: https://gameservermanagers.com +# DO NOT EDIT THIS FILE + # Debugging if [ -f ".dev-debug" ]; then exec 5>dev-debug.log @@ -15,12 +17,11 @@ if [ -f ".dev-debug" ]; then fi version="170305" +shortname="core" +servername="core" rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" servicename="${selfname}" -shortname="core" -servername="core" -gamename="core" lockselfname=".${servicename}.lock" lgsmdir="${rootdir}/lgsm" logdir="${rootdir}/log" @@ -242,7 +243,6 @@ fn_install_file(){ cp -R "${selfname}" "${local_filename}" sed -i -e "s/shortname=\"core\"/shortname=\"${shortname}\"/g" "${local_filename}" sed -i -e "s/servername=\"core\"/servername=\"${servername}\"/g" "${local_filename}" - sed -i -e "s/gamename=\"core\"/gamename=\"${gamename}\"/g" "${local_filename}" echo "Installed ${gamename} server as ${local_filename}" echo "./${local_filename} install" exit From 8005263f4c928ec51b4fb5a274bc8b69861ed133 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 4 May 2017 21:40:15 +0100 Subject: [PATCH 059/216] updated check_ip info for new config location --- lgsm/functions/check_ip.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lgsm/functions/check_ip.sh b/lgsm/functions/check_ip.sh index 5ae639237..c9b5ce97f 100644 --- a/lgsm/functions/check_ip.sh +++ b/lgsm/functions/check_ip.sh @@ -29,7 +29,8 @@ if [ "${gamename}" != "TeamSpeak 3" ]&&[ "${gamename}" != "Mumble" ]&&[ "${travi echo -en "${servercfgfullpath}\n" echo -en "Set ${ipinconfigvar} to one of the following:\n" else - fn_print_information "Specify the IP you want to use within the ${selfname} script.\n" + fn_print_information "Specify the IP you want to use within the LinuxGSM config file." + echo -en "Location: ${configdir}\n" echo -en "Set ip=\"0.0.0.0\" to one of the following:\n" fi echo -en "${getip}\n" From a1cf14c65f993159ce10fc3a4edab5c29e4a5bc5 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 4 May 2017 21:46:48 +0100 Subject: [PATCH 060/216] moving linuxgsm.sh to functions dir --- lgsm/functions/command_update_linuxgsm.sh | 4 ++-- linuxgsm.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/functions/command_update_linuxgsm.sh index a6de4f26f..f2e30d3e4 100644 --- a/lgsm/functions/command_update_linuxgsm.sh +++ b/lgsm/functions/command_update_linuxgsm.sh @@ -33,7 +33,7 @@ if [ "${tmp_script_diff}" != "" ]; then fn_print_update_eol_nl fn_script_log_info "checking linuxgsm.sh: UPDATE" rm -f "${functionsdir}/linuxgsm.sh" - fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "nochmodx" "norun" "noforcedl" "nomd5" + fn_fetch_file_github "" "linuxgsm.sh" "${functionsdir}" "nochmodx" "norun" "noforcedl" "nomd5" # Compare selfname against linuxgsm.sh in the tmp dir. Ignoring server specific vars. else fn_script_log_info "checking linuxgsm.sh: OK" @@ -44,7 +44,7 @@ script_diff=$(diff <(sed '/shortname/d;/servername/d;/gamename/d' "${functionsdi if [ "${script_diff}" != "" ]; then fn_print_update_eol_nl echo -ne " backup ${selfname}...\c" - cp "${rootdir}/${selfname}" "${tmpdir}/${selfname}-$(date +"%m_%d_%Y_%M").bak" + cp "${rootdir}/${selfname}" "${backupdir}/script/${selfname}-$(date +"%m_%d_%Y_%M").bak" if [ $? -ne 0 ]; then fn_print_fail_eol_nl core_exit.sh diff --git a/linuxgsm.sh b/linuxgsm.sh index a31fea535..1deb84ee0 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -364,8 +364,8 @@ else source "${configdirserver}/${servicename}.cfg" fi # Load the linuxgsm.sh in to tmpdir. If missing download it - if [ ! -f "${tmpdir}/linuxgsm.sh" ];then - fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "nochmodx" "norun" "noforcedl" "nomd5" + if [ ! -f "${functionsdir}/linuxgsm.sh" ];then + fn_fetch_file_github "" "linuxgsm.sh" "${functionsdir}" "nochmodx" "norun" "noforcedl" "nomd5" fi getopt=$1 core_getopt.sh From cfd51e5a3918632fd05efcfde76068f6285ce3ea Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 4 May 2017 21:47:41 +0100 Subject: [PATCH 061/216] moved backup dir to lgsm/backup --- lgsm/config-default/config-lgsm/arkserver/_default.cfg | 2 +- lgsm/config-default/config-lgsm/arma3server/_default.cfg | 2 +- lgsm/config-default/config-lgsm/csgoserver/_default.cfg | 2 +- lgsm/config-default/config-lgsm/sdtdserver/_default.cfg | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lgsm/config-default/config-lgsm/arkserver/_default.cfg b/lgsm/config-default/config-lgsm/arkserver/_default.cfg index 35a8d1949..4d4e4325e 100644 --- a/lgsm/config-default/config-lgsm/arkserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/arkserver/_default.cfg @@ -74,7 +74,7 @@ servercfgdefault="GameUserSettings.ini" servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory -backupdir="${rootdir}/backups" +backupdir="${lgsmdir}/backup" ## Logging Directories logdir="${logdir}" diff --git a/lgsm/config-default/config-lgsm/arma3server/_default.cfg b/lgsm/config-default/config-lgsm/arma3server/_default.cfg index ac83b822d..bcc5c06bf 100644 --- a/lgsm/config-default/config-lgsm/arma3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/arma3server/_default.cfg @@ -85,7 +85,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" networkcfgfullpath="${servercfgdir}/${networkcfg}" ## Backup Directory -backupdir="${rootdir}/backups" +backupdir="${lgsmdir}/backup" ## Logging Directories #gamelogdir="" # No server logs available diff --git a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg index 718d8d132..7c36ed20f 100644 --- a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg @@ -98,7 +98,7 @@ servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory -backupdir="${rootdir}/backups" +backupdir="${lgsmdir}/backup" ## Logging Directories gamelogdir="${systemdir}/logs" diff --git a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg index b8576295e..47f6b2157 100644 --- a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg @@ -74,7 +74,7 @@ servercfgdir="${serverfiles}" servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory -backupdir="${rootdir}/backups" +backupdir="${lgsmdir}/backup" ## Logging Directories gamelogdir="${logdir}/server" From ce59ea792c7fdcc68c7dd8b381fa9e872cf6e8be Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 4 May 2017 21:49:12 +0100 Subject: [PATCH 062/216] mkdr backup dir --- lgsm/functions/command_update_linuxgsm.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/functions/command_update_linuxgsm.sh index f2e30d3e4..29f98e3e2 100644 --- a/lgsm/functions/command_update_linuxgsm.sh +++ b/lgsm/functions/command_update_linuxgsm.sh @@ -44,6 +44,7 @@ script_diff=$(diff <(sed '/shortname/d;/servername/d;/gamename/d' "${functionsdi if [ "${script_diff}" != "" ]; then fn_print_update_eol_nl echo -ne " backup ${selfname}...\c" + mkdir -p "${backupdir}/script/" cp "${rootdir}/${selfname}" "${backupdir}/script/${selfname}-$(date +"%m_%d_%Y_%M").bak" if [ $? -ne 0 ]; then fn_print_fail_eol_nl From dc1ccbf9c81e52800cc70545f2f30bc39dd5460f Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 4 May 2017 21:51:39 +0100 Subject: [PATCH 063/216] made linuxgsm.sh chmod x --- linuxgsm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index 1deb84ee0..9e76d998d 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -365,7 +365,7 @@ else fi # Load the linuxgsm.sh in to tmpdir. If missing download it if [ ! -f "${functionsdir}/linuxgsm.sh" ];then - fn_fetch_file_github "" "linuxgsm.sh" "${functionsdir}" "nochmodx" "norun" "noforcedl" "nomd5" + fn_fetch_file_github "" "linuxgsm.sh" "${functionsdir}" "chmod" "norun" "noforcedl" "nomd5" fi getopt=$1 core_getopt.sh From 5112a8f386f2d759e18439376ffb423c8a9d460d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 4 May 2017 21:53:02 +0100 Subject: [PATCH 064/216] bug --- linuxgsm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index 9e76d998d..16349de53 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -365,7 +365,7 @@ else fi # Load the linuxgsm.sh in to tmpdir. If missing download it if [ ! -f "${functionsdir}/linuxgsm.sh" ];then - fn_fetch_file_github "" "linuxgsm.sh" "${functionsdir}" "chmod" "norun" "noforcedl" "nomd5" + fn_fetch_file_github "" "linuxgsm.sh" "${functionsdir}" "chmodx" "norun" "noforcedl" "nomd5" fi getopt=$1 core_getopt.sh From 3ef7ca287909345728550d5f73caa9b50157b267 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 4 May 2017 22:38:42 +0100 Subject: [PATCH 065/216] updated download variables --- .../command_install_resources_mta.sh | 2 +- lgsm/functions/command_update_linuxgsm.sh | 2 +- lgsm/functions/core_dl.sh | 2 +- lgsm/functions/fix_glibc.sh | 12 ++++---- lgsm/functions/fix_mta.sh | 3 +- lgsm/functions/install_config.sh | 5 ++-- lgsm/functions/install_mta_resources.sh | 2 +- lgsm/functions/install_server_files.sh | 30 +++++++++---------- lgsm/functions/monitor_gsquery.sh | 2 +- 9 files changed, 29 insertions(+), 31 deletions(-) diff --git a/lgsm/functions/command_install_resources_mta.sh b/lgsm/functions/command_install_resources_mta.sh index 07b6e4440..84365fc5b 100644 --- a/lgsm/functions/command_install_resources_mta.sh +++ b/lgsm/functions/command_install_resources_mta.sh @@ -12,7 +12,7 @@ fn_install_resources(){ echo "" echo "Installing Default Resources" echo "=================================" - fn_fetch_file "http://mirror.mtasa.com/mtasa/resources/mtasa-resources-latest.zip" "${tmpdir}" "mtasa-resources-latest.zip" "noexecute" "norun" "noforce" "nomd5" + fn_fetch_file "http://mirror.mtasa.com/mtasa/resources/mtasa-resources-latest.zip" "${tmpdir}" "mtasa-resources-latest.zip" "nochmodx" "norun" "noforce" "nomd5" fn_dl_extract "${tmpdir}" "mtasa-resources-latest.zip" "${resourcesdir}" echo "Default Resources Installed." } diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/functions/command_update_linuxgsm.sh index 29f98e3e2..fa3f08762 100644 --- a/lgsm/functions/command_update_linuxgsm.sh +++ b/lgsm/functions/command_update_linuxgsm.sh @@ -21,7 +21,7 @@ if [ "${config_file_diff}" != "" ]; then fn_print_update_eol_nl fn_script_log_info "checking config _default.cfg: UPDATE" rm -f "${configdirdefault}/config-lgsm/${servername}/_default.cfg" - fn_fetch_config "lgsm/config-default/config-lgsm/${servername}" "_default.cfg" "${configdirdefault}/config-lgsm/${servername}" "_default.cfg" "noexecutecmd" "norun" "noforce" "nomd5" + fn_fetch_config "lgsm/config-default/config-lgsm/${servername}" "_default.cfg" "${configdirdefault}/config-lgsm/${servername}" "_default.cfg" "nochmodx" "norun" "noforce" "nomd5" else fn_print_ok_eol_nl fn_script_log_info "checking config _default.cfg: OK" diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index f40959f0d..512aa22fe 100644 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -190,7 +190,7 @@ fn_fetch_config(){ remote_fileurl="${githuburl}" local_filedir="${3}" local_filename="${4}" - chmodx="noexecutecmd" + chmodx="nochmodx" run="norun" forcedl="noforce" md5="nomd5" diff --git a/lgsm/functions/fix_glibc.sh b/lgsm/functions/fix_glibc.sh index a36b568ac..c84526bfc 100644 --- a/lgsm/functions/fix_glibc.sh +++ b/lgsm/functions/fix_glibc.sh @@ -15,7 +15,7 @@ local libstdc_servers_array=( "ARMA 3" "Blade Symphony" "Garry's Mod" "GoldenEye for libstdc_server in "${libstdc_servers_array[@]}" do if [ "${gamename}" == "${libstdc_server}" ]; then - fn_fetch_file_github "lgsm/lib/ubuntu12.04/i386" "libstdc++.so.6" "${lgsmdir}/lib" "noexecutecmd" "norun" "noforce" "nomd5" + fn_fetch_file_github "lgsm/lib/ubuntu12.04/i386" "libstdc++.so.6" "${lgsmdir}/lib" "nochmodx" "norun" "noforce" "nomd5" fi done @@ -24,7 +24,7 @@ local libm_servers_array=( "Black Mesa: Deathmatch" "Codename CURE" "Day of Infa for libm_server in "${libm_servers_array[@]}" do if [ "${gamename}" == "${libm_server}" ]; then - fn_fetch_file_github "lgsm/lib/ubuntu12.04/i386" "libm.so.6" "${lgsmdir}/lib" "noexecutecmd" "norun" "noforce" "nomd5" + fn_fetch_file_github "lgsm/lib/ubuntu12.04/i386" "libm.so.6" "${lgsmdir}/lib" "nochmodx" "norun" "noforce" "nomd5" fi done @@ -33,7 +33,7 @@ local libc_servers_array=( "Black Mesa: Deathmatch" "Blade Symphony" "Garry's Mo for libc_server in "${libc_servers_array[@]}" do if [ "${gamename}" == "${libc_server}" ]; then - fn_fetch_file_github "lgsm/lib/ubuntu12.04/i386" "libc.so.6" "${lgsmdir}/lib" "noexecutecmd" "norun" "noforce" "nomd5" + fn_fetch_file_github "lgsm/lib/ubuntu12.04/i386" "libc.so.6" "${lgsmdir}/lib" "nochmodx" "norun" "noforce" "nomd5" fi done @@ -42,7 +42,7 @@ local libpthread_servers_array=( "Black Mesa: Deathmatch" "Blade Symphony" "Garr for libpthread_server in "${libpthread_servers_array[@]}" do if [ "${gamename}" == "${libpthread_server}" ]; then - fn_fetch_file_github "lgsm/lib/ubuntu12.04/i386" "libpthread.so.0" "${lgsmdir}/lib" "noexecutecmd" "norun" "noforce" "nomd5" + fn_fetch_file_github "lgsm/lib/ubuntu12.04/i386" "libpthread.so.0" "${lgsmdir}/lib" "nochmodx" "norun" "noforce" "nomd5" fi done @@ -53,7 +53,7 @@ local libm_servers_array=( "Factorio" ) for libm_server in "${libm_servers_array[@]}" do if [ "${gamename}" == "${libm_server}" ]; then - fn_fetch_file_github "lgsm/lib/ubuntu12.04/amd64" "libm.so.6" "${lgsmdir}/lib" "noexecutecmd" "norun" "noforce" "nomd5" + fn_fetch_file_github "lgsm/lib/ubuntu12.04/amd64" "libm.so.6" "${lgsmdir}/lib" "nochmodx" "norun" "noforce" "nomd5" fi done @@ -62,7 +62,7 @@ local libc_servers_array=( "Factorio" ) for libc_server in "${libc_servers_array[@]}" do if [ "${gamename}" == "${libc_server}" ]; then - fn_fetch_file_github "lgsm/lib/ubuntu12.04/amd64" "libc.so.6" "${lgsmdir}/lib" "noexecutecmd" "norun" "noforce" "nomd5" + fn_fetch_file_github "lgsm/lib/ubuntu12.04/amd64" "libc.so.6" "${lgsmdir}/lib" "nochmodx" "norun" "noforce" "nomd5" fi done diff --git a/lgsm/functions/fix_mta.sh b/lgsm/functions/fix_mta.sh index ebefc79d2..3bc38ac44 100644 --- a/lgsm/functions/fix_mta.sh +++ b/lgsm/functions/fix_mta.sh @@ -12,8 +12,7 @@ if [ ! -f "${lgsmdir}/lib/libmysqlclient.so.16" ]; then fixname="libmysqlclient16" fn_fix_msg_start_nl sleep 1 - fileurl="https://nightly.mtasa.com/files/modules/64/libmysqlclient.so.16"; filedir="${lgsmdir}/lib"; filename="libmysqlclient.so.16"; executecmd="executecmd" run="norun"; force="noforce"; md5="6c188e0f8fb5d7a29f4bc413b9fed6c2" - fn_fetch_file "${fileurl}" "${filedir}" "${filename}" "${executecmd}" "${run}" "${force}" "${md5}" + fn_fetch_file "https://nightly.mtasa.com/files/modules/64/libmysqlclient.so.16" "${lgsmdir}/lib" "libmysqlclient.so.16" "chmodx" "norun" "noforce" "6c188e0f8fb5d7a29f4bc413b9fed6c2" fn_fix_msg_end fi diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 0b6f7e744..bca134421 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -19,11 +19,10 @@ fn_check_cfgdir(){ # Downloads default configs from Game-Server-Configs repo to lgsm/config-default fn_fetch_default_config(){ - mkdir -pv "${lgsmdir}/config-default" + mkdir -p "${lgsmdir}/config-default/config-game" githuburl="https://github.com/GameServerManagers/Game-Server-Configs/master" for config in "${array_configs[@]}"; do - fileurl="https://raw.githubusercontent.com/GameServerManagers/Game-Server-Configs/master/${gamedirname}/${config}"; filedir="${lgsmdir}/config-default/config-game"; filename="${config}"; executecmd="noexecute" run="norun"; force="noforce" - fn_fetch_file "${fileurl}" "${filedir}" "${filename}" "${executecmd}" "${run}" "${force}" "${md5}" + fn_fetch_file "${githuburl}/${config}" "${lgsmdir}/config-default/config-game" "${config}" "nochmodx" "norun" "noforce" "nomd5" done } diff --git a/lgsm/functions/install_mta_resources.sh b/lgsm/functions/install_mta_resources.sh index 6abfc598a..bed82c594 100644 --- a/lgsm/functions/install_mta_resources.sh +++ b/lgsm/functions/install_mta_resources.sh @@ -19,7 +19,7 @@ fn_install_libmysqlclient16(){ sleep 1 sudo -v > /dev/null 2>&1 if [ $? -eq 0 ]; then - fn_fetch_file "https://nightly.mtasa.com/files/modules/64/libmysqlclient.so.16" "${filedir}" "libmysqlclient.so.16" "executecmd" "norun" "noforce" "6c188e0f8fb5d7a29f4bc413b9fed6c2" + fn_fetch_file "https://nightly.mtasa.com/files/modules/64/libmysqlclient.so.16" "${filedir}" "libmysqlclient.so.16" "chmodx" "norun" "noforce" "6c188e0f8fb5d7a29f4bc413b9fed6c2" sudo mv "${tmpdir}/libmysqlclient.so.16" "/usr/lib/libmysqlclient.so.16" else fn_print_fail_nl "Failed to install libmysqlclient16, $(whoami) does not have sudo access. Download it manually and place it in /usr/lib" diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index 39c2934bc..636f0dea5 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -10,35 +10,35 @@ local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" fn_install_server_files(){ if [ "${gamename}" == "Battlefield: 1942" ]; then - fileurl="http://files.gameservermanagers.com/BattleField1942/bf1942_lnxded-1.61-hacked-to-1.612.full.tar.bz2"; filedir="${tmpdir}"; filename="bf1942_lnxded-1.61-hacked-to-1.612.full.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="a86a5d3cd64ca59abcc9bb9f777c2e5d" + remote_fileurl="http://files.gameservermanagers.com/BattleField1942/bf1942_lnxded-1.61-hacked-to-1.612.full.tar.bz2"; local_filedir="${tmpdir}"; local_filedir="bf1942_lnxded-1.61-hacked-to-1.612.full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="a86a5d3cd64ca59abcc9bb9f777c2e5d" elif [ "${gamename}" == "Call of Duty" ]; then - fileurl="http://files.gameservermanagers.com/CallOfDuty/cod-lnxded-1.5b-full.tar.bz2"; filedir="${tmpdir}"; filename="cod-lnxded-1.5-large.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="19629895a4cf6fd8f6d1ee198b5304cd" + remote_fileurl="http://files.gameservermanagers.com/CallOfDuty/cod-lnxded-1.5b-full.tar.bz2"; local_filedir="${tmpdir}"; local_filedir="cod-lnxded-1.5-large.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="19629895a4cf6fd8f6d1ee198b5304cd" elif [ "${gamename}" == "Call of Duty: United Offensive" ]; then - fileurl="http://files.gameservermanagers.com/CallOfDutyUnitedOffensive/coduo-lnxded-1.51b-full.tar.bz2"; filedir="${tmpdir}"; filename="coduo-lnxded-1.51b-full.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="f1804ef13036e2b4ab535db000b19e97" + remote_fileurl="http://files.gameservermanagers.com/CallOfDutyUnitedOffensive/coduo-lnxded-1.51b-full.tar.bz2"; local_filedir="${tmpdir}"; local_filedir="coduo-lnxded-1.51b-full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="f1804ef13036e2b4ab535db000b19e97" elif [ "${gamename}" == "Call of Duty 2" ]; then - fileurl="http://files.gameservermanagers.com/CallOfDuty2/cod2-lnxded-1.3-full.tar.bz2"; filedir="${tmpdir}"; filename="cod2-lnxded-1.3-full.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="078128f83d06dc3d7699428dc2870214" + remote_fileurl="http://files.gameservermanagers.com/CallOfDuty2/cod2-lnxded-1.3-full.tar.bz2"; local_filedir="${tmpdir}"; local_filedir="cod2-lnxded-1.3-full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="078128f83d06dc3d7699428dc2870214" elif [ "${gamename}" == "Call of Duty 4" ]; then - fileurl="http://files.gameservermanagers.com/CallOfDuty4/cod4x18_dedrun.tar.bz2"; filedir="${tmpdir}"; filename="cod4x18_dedrun.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="bebdfc1755626462bdaad49f6f926c08" + remote_fileurl="http://files.gameservermanagers.com/CallOfDuty4/cod4x18_dedrun.tar.bz2"; local_filedir="${tmpdir}"; local_filedir="cod4x18_dedrun.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="bebdfc1755626462bdaad49f6f926c08" elif [ "${gamename}" == "Call of Duty: World at War" ]; then - fileurl="http://files.gameservermanagers.com/CallOfDutyWorldAtWar/codwaw-lnxded-1.7-full.tar.bz2"; filedir="${tmpdir}"; filename="codwaw-lnxded-1.7-full.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="0489697ff3bf678c109bfb377d1b7895" + remote_fileurl="http://files.gameservermanagers.com/CallOfDutyWorldAtWar/codwaw-lnxded-1.7-full.tar.bz2"; local_filedir="${tmpdir}"; local_filedir="codwaw-lnxded-1.7-full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="0489697ff3bf678c109bfb377d1b7895" elif [ "${gamename}" == "GoldenEye: Source" ]; then - fileurl="http://files.gameservermanagers.com/GoldenEyeSource/GoldenEye_Source_v5.0.1_full_server_linux.tar.bz2"; filedir="${tmpdir}"; filename="GoldenEye_Source_v5.0.1_server_full_Linux.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="ea227a150300abe346e757380325f84c" + remote_fileurl="http://files.gameservermanagers.com/GoldenEyeSource/GoldenEye_Source_v5.0.1_full_server_linux.tar.bz2"; local_filedir="${tmpdir}"; local_filedir="GoldenEye_Source_v5.0.1_server_full_Linux.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="ea227a150300abe346e757380325f84c" elif [ "${gamename}" == "Quake 2" ]; then - fileurl="http://files.gameservermanagers.com/Quake2/quake2-3.20-glibc-i386-full-linux2.0.tar.bz2"; filedir="${tmpdir}"; filename="quake2-3.20-glibc-i386-full-linux2.0.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="0b8c7e2d51f40b56b328c69e986e7c5f" + remote_fileurl="http://files.gameservermanagers.com/Quake2/quake2-3.20-glibc-i386-full-linux2.0.tar.bz2"; local_filedir="${tmpdir}"; local_filedir="quake2-3.20-glibc-i386-full-linux2.0.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="0b8c7e2d51f40b56b328c69e986e7c5f" elif [ "${gamename}" == "Quake 3: Arena" ]; then - fileurl="http://files.gameservermanagers.com/Quake3/quake3-1.32c-x86-full-linux.tar.bz2"; filedir="${tmpdir}"; filename="quake3-1.32c-x86-full-linux.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="fd7258d827474f67663dda297bff4306" + remote_fileurl="http://files.gameservermanagers.com/Quake3/quake3-1.32c-x86-full-linux.tar.bz2"; local_filedir="${tmpdir}"; local_filedir="quake3-1.32c-x86-full-linux.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="fd7258d827474f67663dda297bff4306" elif [ "${gamename}" == "QuakeWorld" ]; then - fileurl="http://files.gameservermanagers.com/QuakeWorld/nquake.server.linux.083116.full.tar.bz2"; filedir="${tmpdir}"; filename="nquake.server.linux.083116.full.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="75a409cf08d808f075e4dacdc7b21b78" + remote_fileurl="http://files.gameservermanagers.com/QuakeWorld/nquake.server.linux.083116.full.tar.bz2"; local_filedir="${tmpdir}"; local_filedir="nquake.server.linux.083116.full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="75a409cf08d808f075e4dacdc7b21b78" elif [ "${gamename}" == "Unreal Tournament 2004" ]; then - fileurl="http://files.gameservermanagers.com/UnrealTournament2004/ut2004-server-3339-ultimate-linux.tar.bz2"; filedir="${tmpdir}"; filename="ut2004-server-3339-ultimate-linux.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="67c5e2cd9c2a4b04f163962ee41eff54" + remote_fileurl="http://files.gameservermanagers.com/UnrealTournament2004/ut2004-server-3339-ultimate-linux.tar.bz2"; local_filedir="${tmpdir}"; local_filedir="ut2004-server-3339-ultimate-linux.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="67c5e2cd9c2a4b04f163962ee41eff54" elif [ "${gamename}" == "Unreal Tournament 99" ]; then - fileurl="http://files.gameservermanagers.com/UnrealTournament99/ut99-server-451-ultimate-linux.tar.bz2"; filedir="${tmpdir}"; filename="ut99-server-451-ultimate-linux.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="49cb24d0550ff6ddeaba6007045c6edd" + remote_fileurl="http://files.gameservermanagers.com/UnrealTournament99/ut99-server-451-ultimate-linux.tar.bz2"; local_filedir="${tmpdir}"; local_filedir="ut99-server-451-ultimate-linux.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="49cb24d0550ff6ddeaba6007045c6edd" elif [ "${gamename}" == "Unreal Tournament" ]; then - fileurl="https://s3.amazonaws.com/unrealtournament/UnrealTournament-Server-XAN-3270765-Linux.zip"; filedir="${tmpdir}"; filename="UnrealTournament-Server-XAN-3270765-Linux.zip"; executecmd="noexecute" run="norun"; force="noforce"; md5="8791dc087383061d7f7f9f523237b8b3" + remote_fileurl="https://s3.amazonaws.com/unrealtournament/UnrealTournament-Server-XAN-3270765-Linux.zip"; local_filedir="${tmpdir}"; local_filedir="UnrealTournament-Server-XAN-3270765-Linux.zip"; chmodx="nochmodx" run="norun"; force="noforce"; md5="8791dc087383061d7f7f9f523237b8b3" elif [ "${gamename}" == "Unreal Tournament 3" ]; then - fileurl="http://files.gameservermanagers.com/UnrealTournament3/UT3-linux-server-2.1.tar.bz2"; filedir="${tmpdir}"; filename="UT3-linux-server-2.1.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="2527437b46f1b47f20228d27d72395a6" + remote_fileurl="http://files.gameservermanagers.com/UnrealTournament3/UT3-linux-server-2.1.tar.bz2"; local_filedir="${tmpdir}"; local_filedir="UT3-linux-server-2.1.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="2527437b46f1b47f20228d27d72395a6" elif [ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then - fileurl="http://files.gameservermanagers.com/WolfensteinEnemyTerritory/enemy-territory.260b.tar.bz2"; filedir="${tmpdir}"; filename="enemy-territory.260b.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="f833f514bfcdd46b42c111f83350c5a7" + remote_fileurl="http://files.gameservermanagers.com/WolfensteinEnemyTerritory/enemy-territory.260b.tar.bz2"; local_filedir="${tmpdir}"; local_filedir="enemy-territory.260b.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="f833f514bfcdd46b42c111f83350c5a7" fi fn_fetch_file "${fileurl}" "${filedir}" "${filename}" "${executecmd}" "${run}" "${force}" "${md5}" fn_dl_extract "${filedir}" "${filename}" "${serverfiles}" diff --git a/lgsm/functions/monitor_gsquery.sh b/lgsm/functions/monitor_gsquery.sh index c874dc452..f5bbdb6f6 100644 --- a/lgsm/functions/monitor_gsquery.sh +++ b/lgsm/functions/monitor_gsquery.sh @@ -13,7 +13,7 @@ if [ "${gsquery}" == "yes" ]; then # Downloads gsquery.py if missing if [ ! -f "${functionsdir}/gsquery.py" ]; then - fn_fetch_file_github "lgsm/functions" "gsquery.py" "${functionsdir}" "executecmd" "norun" "noforce" "nomd5" + fn_fetch_file_github "lgsm/functions" "gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nomd5" fi info_config.sh From 98fb5ec811e7c8ed1e6daf166373224d35a7df7f Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 4 May 2017 22:38:53 +0100 Subject: [PATCH 066/216] tidy --- lgsm/functions/check.sh | 2 -- lgsm/functions/core_functions.sh | 18 +++++++++--------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/lgsm/functions/check.sh b/lgsm/functions/check.sh index 5fd1bc241..58933851e 100644 --- a/lgsm/functions/check.sh +++ b/lgsm/functions/check.sh @@ -79,8 +79,6 @@ do fi done - - local allowed_commands_array=( command_details.sh command_monitor.sh command_start.sh command_stop.sh command_ts3_server_pass.sh command_update.sh command_details.sh command_validate.sh ) for allowed_command in "${allowed_commands_array[@]}" do diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index d915b1c9f..1de00e85a 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -46,15 +46,15 @@ fn_fetch_function } command_postdetails.sh(){ - functionfile="${FUNCNAME}" - tempffname="${functionfile}" - # First, grab the command_postdetails.sh file - fn_fetch_function - # But then next, command_details.sh needs to also be pulled - # because command_postdetails.sh sources its functions -CedarLUG - functionfile="command_details.sh" - fn_fetch_function - functionfile="${tempffname}" +functionfile="${FUNCNAME}" +tempffname="${functionfile}" +# First, grab the command_postdetails.sh file +fn_fetch_function +# But then next, command_details.sh needs to also be pulled +# because command_postdetails.sh sources its functions -CedarLUG +functionfile="command_details.sh" +fn_fetch_function +functionfile="${tempffname}" } command_details.sh(){ From 4c64348c0deb33510ffba0b7e48cbebc81db3697 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 4 May 2017 22:46:09 +0100 Subject: [PATCH 067/216] removed libmysqlclient install as handled by fix_mta.sh also updated the install message --- lgsm/functions/install_mta_resources.sh | 28 +++---------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/lgsm/functions/install_mta_resources.sh b/lgsm/functions/install_mta_resources.sh index bed82c594..1107ad0aa 100644 --- a/lgsm/functions/install_mta_resources.sh +++ b/lgsm/functions/install_mta_resources.sh @@ -9,28 +9,6 @@ local commandname="INSTALL" local commandaction="Install" local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -fn_install_libmysqlclient16(){ - echo "" - echo "Checking if libmysqlclient16 is installed" - echo "=================================" - sleep 1 - if [ ! -f "/usr/lib/libmysqlclient.so.16" ]; then - fn_print_warn_nl "libmysqlclient16 not installed. Installing.." - sleep 1 - sudo -v > /dev/null 2>&1 - if [ $? -eq 0 ]; then - fn_fetch_file "https://nightly.mtasa.com/files/modules/64/libmysqlclient.so.16" "${filedir}" "libmysqlclient.so.16" "chmodx" "norun" "noforce" "6c188e0f8fb5d7a29f4bc413b9fed6c2" - sudo mv "${tmpdir}/libmysqlclient.so.16" "/usr/lib/libmysqlclient.so.16" - else - fn_print_fail_nl "Failed to install libmysqlclient16, $(whoami) does not have sudo access. Download it manually and place it in /usr/lib" - sleep 1 - fi - else - echo "libmysqlclient16 already installed." - fi -} - -fn_install_libmysqlclient16 - -fn_print_information_nl "Server is inoperable by default without resources, you can install default ones by running the command install-default-resources" -echo "" +fn_print_information_nl "${gamename} will not function without resources!" +echo " * install default resources using ./${selfname} install-default-resources" +echo " * download resources from https://community.multitheftauto.com" From 26e5d14f245d71a65f4da7579746e1754a1934dd Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 4 May 2017 22:47:59 +0100 Subject: [PATCH 068/216] tabs --- lgsm/functions/command_fastdl.sh | 48 ++++++++++++++++---------------- lgsm/functions/core_functions.sh | 2 +- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/lgsm/functions/command_fastdl.sh b/lgsm/functions/command_fastdl.sh index 34ea98d0c..b040bccaa 100644 --- a/lgsm/functions/command_fastdl.sh +++ b/lgsm/functions/command_fastdl.sh @@ -115,32 +115,32 @@ fn_fastdl_dirs(){ # Using this gist https://gist.github.com/agunnerson-ibm/efca449565a3e7356906 fn_human_readable_file_size(){ - local abbrevs=( - $((1 << 60)):ZB - $((1 << 50)):EB - $((1 << 40)):TB - $((1 << 30)):GB - $((1 << 20)):MB - $((1 << 10)):KB - $((1)):bytes - ) + local abbrevs=( + $((1 << 60)):ZB + $((1 << 50)):EB + $((1 << 40)):TB + $((1 << 30)):GB + $((1 << 20)):MB + $((1 << 10)):KB + $((1)):bytes + ) - local bytes="${1}" - local precision="${2}" + local bytes="${1}" + local precision="${2}" - if [[ "${bytes}" == "1" ]]; then - echo "1 byte" - else - for item in "${abbrevs[@]}"; do - local factor="${item%:*}" - local abbrev="${item#*:}" - if [[ "${bytes}" -ge "${factor}" ]]; then - local size="$(bc -l <<< "${bytes} / ${factor}")" - printf "%.*f %s\n" "${precision}" "${size}" "${abbrev}" - break - fi - done - fi + if [[ "${bytes}" == "1" ]]; then + echo "1 byte" + else + for item in "${abbrevs[@]}"; do + local factor="${item%:*}" + local abbrev="${item#*:}" + if [[ "${bytes}" -ge "${factor}" ]]; then + local size="$(bc -l <<< "${bytes} / ${factor}")" + printf "%.*f %s\n" "${precision}" "${size}" "${abbrev}" + break + fi + done + fi } # Provides info about the fastdl directory content and prompts for confirmation diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 1de00e85a..d6dc9f09b 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -543,7 +543,7 @@ fn_fetch_function # Creates tmp dir if missing if [ ! -d "${tmpdir}" ]; then - mkdir -p "${tmpdir}" + mkdir -p "${tmpdir}" fi # Calls on-screen messages (bootstrap) From 6a7ad3db7f38116483ff48f771b06522fad03778 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 4 May 2017 23:03:30 +0100 Subject: [PATCH 069/216] filesdir is now serverfiles --- lgsm/functions/alert_email.sh | 2 +- lgsm/functions/check_system_dir.sh | 15 +++++++++++---- lgsm/functions/command_details.sh | 2 +- lgsm/functions/info_distro.sh | 6 +++--- lgsm/functions/install_server_files.sh | 4 ++-- tests/tests_jc2server.sh | 2 +- tests/tests_ts3server.sh | 2 +- 7 files changed, 20 insertions(+), 13 deletions(-) diff --git a/lgsm/functions/alert_email.sh b/lgsm/functions/alert_email.sh index a49dda347..36541706d 100644 --- a/lgsm/functions/alert_email.sh +++ b/lgsm/functions/alert_email.sh @@ -83,7 +83,7 @@ fn_details_disk(){ echo -e "Total: ${totalspace}" echo -e "Used: ${usedspace}" echo -e "Available: ${availspace}" - echo -e "Serverfiles: ${filesdirdu}" + echo -e "Serverfiles: ${serverfilesdu}" if [ -d "${backupdir}" ]; then echo -e "Backups: ${backupdirdu}" fi diff --git a/lgsm/functions/check_system_dir.sh b/lgsm/functions/check_system_dir.sh index 0e5c39718..c08fb33a7 100644 --- a/lgsm/functions/check_system_dir.sh +++ b/lgsm/functions/check_system_dir.sh @@ -2,15 +2,22 @@ # LinuxGSM check_system_dir.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com -# Description: Checks if systemdir is accessible. +# Description: Checks if systemdir/serverfiles is accessible. local commandname="CHECK" local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -if [ ! -d "${systemdir}" ]; then - fn_print_fail_nl "Cannot access ${systemdir}: No such directory" +if [ "${function_selfname}" != "command_validate.sh" ];then + checkdir="${serverfiles}" +else + checkdir="${systemdir}" +fi + +if [ ! -d "${checkdir}" ]; then + fn_print_fail_nl "Cannot access ${checkdir}: No such directory" if [ -d "${scriptlogdir}" ]; then - fn_script_log_fatal "Cannot access ${systemdir}: No such directory." + fn_script_log_fatal "Cannot access ${checkdir}: No such directory." fi core_exit.sh fi + diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index 106eb0041..843b09eaf 100644 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -83,7 +83,7 @@ fn_details_disk(){ echo -e "${blue}Used:\t${default}${usedspace}" echo -e "${blue}Available:\t${default}${availspace}" echo -e "${blue}LinuxGSM Total:\t${default}${rootdirdu}" - echo -e "${blue}Serverfiles:\t${default}${filesdirdu}" + echo -e "${blue}Serverfiles:\t${default}${serverfilesdu}" if [ -d "${backupdir}" ]; then echo -e "${blue}Backups:\t${default}${backupdirdu}" fi diff --git a/lgsm/functions/info_distro.sh b/lgsm/functions/info_distro.sh index c83dff8a1..d85d89fb6 100644 --- a/lgsm/functions/info_distro.sh +++ b/lgsm/functions/info_distro.sh @@ -95,9 +95,9 @@ if [ -z "${rootdirdu}" ]; then fi ## LinuxGSM used space in serverfiles dir. -filesdirdu=$(du -sh "${serverfiles}" 2> /dev/null | awk '{print $1}') -if [ -z "${filesdirdu}" ]; then - filesdirdu="0M" +serverfilesdu=$(du -sh "${serverfiles}" 2> /dev/null | awk '{print $1}') +if [ -z "${serverfilesdu}" ]; then + serverfilesdu="0M" fi ## LinuxGSM used space total minus backup dir. diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index 636f0dea5..916c3fbb8 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -86,10 +86,10 @@ fn_install_server_files_steamcmd(){ fi elif [ "${counter}" -ge "5" ]; then if [ "${engine}" == "goldsource" ]; then - ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${branch} -validate +quit + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${branch} validate +quit local exitcode=$? else - ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" ${branch} -validate +quit + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" ${branch} validate +quit local exitcode=$? fi fi diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index ae554e85a..edfeb983d 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -90,7 +90,7 @@ lgsmdir="${rootdir}/lgsm" functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" +serverfiles="${rootdir}/serverfiles" ## Server Specific Directories systemdir="${serverfiles}" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index d19223269..308c59a57 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -77,7 +77,7 @@ lgsmdir="${rootdir}/lgsm" functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" +serverfiles="${rootdir}/serverfiles" ## Server Specific Directories systemdir="${serverfiles}" From 73770c5696cc956be35be8210b6cd1380016f0d8 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 4 May 2017 23:11:20 +0100 Subject: [PATCH 070/216] fixes #880 if no telnet password is set it sets one. This will cause the telnet login attempt to fail rather than stall. --- lgsm/functions/command_stop.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index 3996f523e..fb30b4ad8 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -88,6 +88,9 @@ fn_stop_graceful_goldsource(){ # Attempts graceful of 7 Days To Die using telnet. fn_stop_telnet_sdtd(){ + if [ ! "${telnetpass}"]; then + telnetpass="NOTSET" + fi sdtd_telnet_shutdown=$( expect -c ' proc abort {} { puts "Timeout or EOF\n" From 980aae42ff58ab06ba0fc5db9c356eca54192788 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 4 May 2017 23:25:52 +0100 Subject: [PATCH 071/216] corrected if --- lgsm/functions/command_stop.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index fb30b4ad8..18a9c53dd 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -88,7 +88,7 @@ fn_stop_graceful_goldsource(){ # Attempts graceful of 7 Days To Die using telnet. fn_stop_telnet_sdtd(){ - if [ ! "${telnetpass}"]; then + if [ -z "${telnetpass}"]; then telnetpass="NOTSET" fi sdtd_telnet_shutdown=$( expect -c ' From b3bf65c424444c17cb9e2a6d551cde61cd114f15 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 4 May 2017 23:26:18 +0100 Subject: [PATCH 072/216] fixes #1152 --- lgsm/functions/alert_email.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/alert_email.sh b/lgsm/functions/alert_email.sh index 36541706d..c15b6df30 100644 --- a/lgsm/functions/alert_email.sh +++ b/lgsm/functions/alert_email.sh @@ -231,7 +231,7 @@ fn_details_disk fn_details_gameserver fn_alert_email_template_logs if [ -n "${emailfrom}" ]; then - mail -s "${alertsubject}" -a "From: ${emailfrom}" "${email}" < "${emaillog}" + mail -s "${alertsubject}" -r "${emailfrom}" "${email}" < "${emaillog}" else mail -s "${alertsubject}" "${email}" < "${emaillog}" fi From 3ef9d523ec25026666bc8cb42773d8513b824790 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 8 May 2017 21:57:37 +0100 Subject: [PATCH 073/216] reverted back to tmp dir --- lgsm/functions/command_update_linuxgsm.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/functions/command_update_linuxgsm.sh index fa3f08762..d009a3026 100644 --- a/lgsm/functions/command_update_linuxgsm.sh +++ b/lgsm/functions/command_update_linuxgsm.sh @@ -28,19 +28,19 @@ else fi echo -ne " checking linuxgsm.sh...\c" -tmp_script_diff=$(diff "${functionsdir}/linuxgsm.sh" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh")) +tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh")) if [ "${tmp_script_diff}" != "" ]; then fn_print_update_eol_nl fn_script_log_info "checking linuxgsm.sh: UPDATE" - rm -f "${functionsdir}/linuxgsm.sh" - fn_fetch_file_github "" "linuxgsm.sh" "${functionsdir}" "nochmodx" "norun" "noforcedl" "nomd5" + rm -f "${tmpdir}/linuxgsm.sh" + fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "nochmodx" "norun" "noforcedl" "nomd5" # Compare selfname against linuxgsm.sh in the tmp dir. Ignoring server specific vars. else fn_script_log_info "checking linuxgsm.sh: OK" fn_print_ok_eol_nl fi echo -ne " checking ${selfname}...\c" -script_diff=$(diff <(sed '/shortname/d;/servername/d;/gamename/d' "${functionsdir}/linuxgsm.sh") <(sed '/shortname/d;/servername/d;/gamename/d' "${rootdir}/${selfname}")) +script_diff=$(diff <(sed '/shortname/d;/servername/d;/gamename/d' "${tmpdir}/linuxgsm.sh") <(sed '/shortname/d;/servername/d;/gamename/d' "${rootdir}/${selfname}")) if [ "${script_diff}" != "" ]; then fn_print_update_eol_nl echo -ne " backup ${selfname}...\c" @@ -54,7 +54,7 @@ if [ "${script_diff}" != "" ]; then echo -e " Backup: ${tmpdir}/${selfname}-$(date +"%m_%d_%Y_%M").bak" fi echo -ne " fetching ${selfname}...\c" - cp "${functionsdir}/linuxgsm.sh" "${rootdir}/${selfname}" + cp "${tmpdir}/linuxgsm.sh" "${rootdir}/${selfname}" sed -i "s/shortname=\"core\"/shortname=\"${shortname}\"/g" "${rootdir}/${selfname}" sed -i "s/servername=\"core\"/servername=\"${servername}\"/g" "${rootdir}/${selfname}" sed -i "s/gamename=\"core\"/gamename=\"${gamename}\"/g" "${rootdir}/${selfname}" From 9d046fcb8e161d62916953309c5bc6b268f265ee Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 8 May 2017 22:05:32 +0100 Subject: [PATCH 074/216] Added optionto delete unknown functions in function dir should a non existant or random file be put in to the functions dir it will be removed --- lgsm/functions/command_update_linuxgsm.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/functions/command_update_linuxgsm.sh index d009a3026..9f916cc4c 100644 --- a/lgsm/functions/command_update_linuxgsm.sh +++ b/lgsm/functions/command_update_linuxgsm.sh @@ -75,8 +75,14 @@ if [ -n "${functionsdir}" ]; then for functionfile in * do echo -ne " checking function ${functionfile}...\c" - function_file_diff=$(diff "${functionsdir}/${functionfile}" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}")) - if [ "${function_file_diff}" != "" ]; then + function_file_diff=$(diff "${functionsdir}/${functionfile}" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}";exitcode=$?)) + exitcode=$? + if [ "${exitcode}" -ne 0 ]; then + fn_print_fail_eol_nl + echo -ne " removing unknown function ${functionfile}...\c" + fn_script_log_fatal "removing unknown function ${functionfile}" + rm -f "${functionfile}" + elif [ "${function_file_diff}" != "" ]; then fn_print_update_eol_nl fn_script_log_info "checking function ${functionfile}: UPDATE" rm -rf "${functionsdir}/${functionfile}" From a086d9fbbcd7d59b463ae91f1e58463d31b82710 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 8 May 2017 22:05:54 +0100 Subject: [PATCH 075/216] removed var --- lgsm/functions/command_update_linuxgsm.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/functions/command_update_linuxgsm.sh index 9f916cc4c..372f3f860 100644 --- a/lgsm/functions/command_update_linuxgsm.sh +++ b/lgsm/functions/command_update_linuxgsm.sh @@ -76,7 +76,6 @@ if [ -n "${functionsdir}" ]; then do echo -ne " checking function ${functionfile}...\c" function_file_diff=$(diff "${functionsdir}/${functionfile}" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}";exitcode=$?)) - exitcode=$? if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol_nl echo -ne " removing unknown function ${functionfile}...\c" From cc91a5ea3e512e74a0b6fdf969e70203deff5fd3 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 8 May 2017 22:11:29 +0100 Subject: [PATCH 076/216] improved exitcode --- lgsm/functions/command_update_linuxgsm.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/functions/command_update_linuxgsm.sh index 372f3f860..a1afd048c 100644 --- a/lgsm/functions/command_update_linuxgsm.sh +++ b/lgsm/functions/command_update_linuxgsm.sh @@ -75,8 +75,8 @@ if [ -n "${functionsdir}" ]; then for functionfile in * do echo -ne " checking function ${functionfile}...\c" - function_file_diff=$(diff "${functionsdir}/${functionfile}" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}";exitcode=$?)) - if [ "${exitcode}" -ne 0 ]; then + function_file_diff=$(diff "${functionsdir}/${functionfile}" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}")) + if [ $? -ne 0 ]; then fn_print_fail_eol_nl echo -ne " removing unknown function ${functionfile}...\c" fn_script_log_fatal "removing unknown function ${functionfile}" From baf6705ff562b75a0ac5b126cbef1d9abefb4d8d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 8 May 2017 22:11:43 +0100 Subject: [PATCH 077/216] reverted back to tmpdir --- linuxgsm.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index 16349de53..5e6a519b1 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -364,8 +364,8 @@ else source "${configdirserver}/${servicename}.cfg" fi # Load the linuxgsm.sh in to tmpdir. If missing download it - if [ ! -f "${functionsdir}/linuxgsm.sh" ];then - fn_fetch_file_github "" "linuxgsm.sh" "${functionsdir}" "chmodx" "norun" "noforcedl" "nomd5" + if [ ! -f "${tmpdir}/linuxgsm.sh" ];then + fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "chmodx" "norun" "noforcedl" "nomd5" fi getopt=$1 core_getopt.sh From 0839e549bcfa88370acf19fd989fc7c9e4b1e936 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 8 May 2017 22:18:40 +0100 Subject: [PATCH 078/216] added exit code for removal of stray functions --- lgsm/functions/command_update_linuxgsm.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/functions/command_update_linuxgsm.sh index a1afd048c..5436e05db 100644 --- a/lgsm/functions/command_update_linuxgsm.sh +++ b/lgsm/functions/command_update_linuxgsm.sh @@ -81,6 +81,12 @@ if [ -n "${functionsdir}" ]; then echo -ne " removing unknown function ${functionfile}...\c" fn_script_log_fatal "removing unknown function ${functionfile}" rm -f "${functionfile}" + if [ $? -ne 0 ]; then + fn_print_fail_eol_nl + core_exit.sh + else + fn_print_ok_eol_nl + fi elif [ "${function_file_diff}" != "" ]; then fn_print_update_eol_nl fn_script_log_info "checking function ${functionfile}: UPDATE" From 141916bd843549216b058e9db9638c8acef6fc29 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 8 May 2017 22:37:45 +0100 Subject: [PATCH 079/216] checks the file exists remotly currenlty doubles the http requests but not sure of a better way currently --- lgsm/functions/command_update_linuxgsm.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/functions/command_update_linuxgsm.sh index 5436e05db..5fbe32e6b 100644 --- a/lgsm/functions/command_update_linuxgsm.sh +++ b/lgsm/functions/command_update_linuxgsm.sh @@ -75,8 +75,10 @@ if [ -n "${functionsdir}" ]; then for functionfile in * do echo -ne " checking function ${functionfile}...\c" - function_file_diff=$(diff "${functionsdir}/${functionfile}" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}")) - if [ $? -ne 0 ]; then + get_function_file=$(${curlpath} --fail -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}") + exitcode=$? + function_file_diff=$(diff "${functionsdir}/${functionfile}" <(${curlpath} --fail -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}")) + if [ ${exitcode} -ne 0 ]; then fn_print_fail_eol_nl echo -ne " removing unknown function ${functionfile}...\c" fn_script_log_fatal "removing unknown function ${functionfile}" From 2bc7a638b4ee84434a69a1ea632b551d78b7eb41 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 8 May 2017 22:52:51 +0100 Subject: [PATCH 080/216] typo --- linuxgsm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index 5e6a519b1..0ca3f28e7 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -269,7 +269,7 @@ if [ "${shortname}" == "core" ]; then # Download the serverlist. This is the complete list of all supported servers. # Download to tmp dir fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${tmpdir}/data" "serverlist.csv" "nochmodx" "norun" "noforcedl" "nomd5" - # if missing in lgsm dir copy it accross + # if missing in lgsm dir copy it across if [ ! -f "${serverlist}" ]; then mkdir -p "${datadir}" cp -R "${serverlist_tmp}" "${serverlist}" From 4ebdad007fd0a75b82991d83fa2cf2c601999b88 Mon Sep 17 00:00:00 2001 From: compositebowman Date: Mon, 8 May 2017 18:57:35 -0400 Subject: [PATCH 081/216] Added Steam AppID fix for Red Orchestra --- lgsm/functions/fix_ro.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lgsm/functions/fix_ro.sh b/lgsm/functions/fix_ro.sh index 3498ee9c8..f4a9a7af4 100644 --- a/lgsm/functions/fix_ro.sh +++ b/lgsm/functions/fix_ro.sh @@ -17,6 +17,9 @@ echo "Applying WebAdmin CharSet fix." echo "http://forums.tripwireinteractive.com/showpost.php?p=442340&postcount=1" sed -i 's/CharSet="iso-8859-1"/CharSet="utf-8"/g' "${systemdir}/uweb.int" sleep 1 +echo "Applying Steam AppID fix." +sed -i 's/1210/1200/g' "${systemdir}/steam_appid.txt" +sleep 1 echo "applying server name fix." sleep 1 echo "forcing server restart..." @@ -26,4 +29,4 @@ sleep 5 command_stop.sh command_start.sh sleep 5 -command_stop.sh \ No newline at end of file +command_stop.sh From 8008501f5ad22c7172dd23c5c255212320e312a0 Mon Sep 17 00:00:00 2001 From: Marvin Lehmann Date: Thu, 11 May 2017 20:21:19 +0200 Subject: [PATCH 082/216] Added graceful shutdown for Terraria --- lgsm/functions/command_stop.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index 1443fac8d..37cc54c11 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -228,6 +228,34 @@ fn_stop_graceful_mta(){ fn_stop_tmux } +# Attempts graceful of source using rcon 'exit' command. +fn_stop_graceful_terraria(){ + fn_print_dots "Graceful: sending \"exit\"" + fn_script_log_info "Graceful: sending \"exit\"" + # sends exit + tmux send -t "${servicename}" exit ENTER > /dev/null 2>&1 + # waits up to 30 seconds giving the server time to shutdown gracefuly + for seconds in {1..30}; do + check_status.sh + if [ "${status}" == "0" ]; then + fn_print_ok "Graceful: sending \"exit\": ${seconds}: " + fn_print_ok_eol_nl + fn_script_log_pass "Graceful: sending \"exit\": OK: ${seconds} seconds" + break + fi + sleep 1 + fn_print_dots "Graceful: sending \"exit\": ${seconds}" + done + check_status.sh + if [ "${status}" != "0" ]; then + fn_print_error "Graceful: sending \"exit\": " + fn_print_fail_eol_nl + fn_script_log_error "Graceful: sending \"exit\": FAIL" + fi + sleep 1 + fn_stop_tmux +} + fn_stop_graceful_select(){ if [ "${gamename}" == "7 Days To Die" ]; then fn_stop_graceful_sdtd @@ -241,6 +269,8 @@ fn_stop_graceful_select(){ fn_stop_graceful_minecraft elif [ "${engine}" == "renderware" ]; then fn_stop_graceful_mta + elif [ "${engine}" == "terraria" ]; then + fn_stop_graceful_terraria else fn_stop_tmux fi From b8ef5f85a8b093b258d127b8320d61027b259706 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 11 May 2017 19:37:28 +0100 Subject: [PATCH 083/216] Legacy: core functions now download --- lgsm/functions/core_functions.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index d6dc9f09b..571f8ce5d 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -9,7 +9,11 @@ core_dl.sh(){ functionfile="${FUNCNAME}" -fn_bootstrap_fetch_file_github "lgsm/functions" "core_dl.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" +if [ -z $(type fn_bootstrap_fetch_file_github) ];then + fn_fetch_core_dl "lgsm/functions" "core_dl.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" +else + fn_bootstrap_fetch_file_github "lgsm/functions" "core_dl.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" +fi } core_exit.sh(){ @@ -553,6 +557,4 @@ core_messages.sh core_dl.sh # Calls the global Ctrl-C trap -core_trap.sh - - +core_trap.sh \ No newline at end of file From 115a8d61278071577d804444273b58257fa13a62 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 11 May 2017 19:44:25 +0100 Subject: [PATCH 084/216] Added legacy function to handle legacy scripts --- lgsm/functions/core_functions.sh | 28 ++++++++++++++++++++++------ lgsm/functions/core_legacy.sh | 9 +++++++++ 2 files changed, 31 insertions(+), 6 deletions(-) create mode 100644 lgsm/functions/core_legacy.sh diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 571f8ce5d..c319cd55a 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -9,13 +9,31 @@ core_dl.sh(){ functionfile="${FUNCNAME}" -if [ -z $(type fn_bootstrap_fetch_file_github) ];then +if [ "$(type fn_fetch_core_dl)" ];then fn_fetch_core_dl "lgsm/functions" "core_dl.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" else fn_bootstrap_fetch_file_github "lgsm/functions" "core_dl.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" fi } +core_messages.sh(){ +functionfile="${FUNCNAME}" +if [ "$(type fn_fetch_core_dl)" ];then + fn_fetch_core_dl "lgsm/functions" "core_messages.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" +else + fn_bootstrap_fetch_file_github "lgsm/functions" "core_messages.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" +fi +} + +core_legacy.sh(){ +functionfile="${FUNCNAME}" +if [ "$(type fn_fetch_core_dl)" ];then + fn_fetch_core_dl "lgsm/functions" "core_legacy.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" +else + fn_bootstrap_fetch_file_github "lgsm/functions" "core_legacy.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" +fi +} + core_exit.sh(){ functionfile="${FUNCNAME}" fn_fetch_function @@ -31,11 +49,6 @@ functionfile="${FUNCNAME}" fn_fetch_function } -core_messages.sh(){ -functionfile="${FUNCNAME}" -fn_bootstrap_fetch_file_github "lgsm/functions" "core_messages.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" -} - # Commands @@ -550,6 +563,9 @@ if [ ! -d "${tmpdir}" ]; then mkdir -p "${tmpdir}" fi +# Calls code required for legacy servers +core_legacy.sh + # Calls on-screen messages (bootstrap) core_messages.sh diff --git a/lgsm/functions/core_legacy.sh b/lgsm/functions/core_legacy.sh new file mode 100644 index 000000000..e7938e16d --- /dev/null +++ b/lgsm/functions/core_legacy.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# LinuxGSM core_legacy.sh function +# Author: Daniel Gibbs +# Website: https://gameservermanagers.com +# Description: Code for backwards compatability with older versions of LinuxGSM. + +if [ -z ${serverfiles} ]; then + serverfiles="${filesdir}" +fi \ No newline at end of file From 324fa47b2ad4595549135f29a426e30d36b4545c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 11 May 2017 19:57:54 +0100 Subject: [PATCH 085/216] Legacy: getting logs to work --- lgsm/functions/core_legacy.sh | 6 +++++- lgsm/functions/install_logs.sh | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lgsm/functions/core_legacy.sh b/lgsm/functions/core_legacy.sh index e7938e16d..f309894a6 100644 --- a/lgsm/functions/core_legacy.sh +++ b/lgsm/functions/core_legacy.sh @@ -4,6 +4,10 @@ # Website: https://gameservermanagers.com # Description: Code for backwards compatability with older versions of LinuxGSM. -if [ -z ${serverfiles} ]; then +if [ -z "${serverfiles}" ]; then serverfiles="${filesdir}" +fi + +if [ -z "${logdir}" ]; then + logdir="${rootdir}/log" fi \ No newline at end of file diff --git a/lgsm/functions/install_logs.sh b/lgsm/functions/install_logs.sh index 65a09ed18..bcadafc36 100644 --- a/lgsm/functions/install_logs.sh +++ b/lgsm/functions/install_logs.sh @@ -15,11 +15,11 @@ if [ "${checklogs}" != "1" ]; then fi sleep 1 # Create script and console log directories -mkdir -v "${logdir}" -mkdir -v "${scriptlogdir}" +mkdir -pv "${logdir}" +mkdir -pv "${scriptlogdir}" touch "${scriptlog}" if [ -n "${consolelogdir}" ]; then - mkdir -v "${consolelogdir}" + mkdir -pv "${consolelogdir}" touch "${consolelog}" fi From b3ae3cb7bc673e277ee4b7313ce094405c335621 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 11 May 2017 20:03:23 +0100 Subject: [PATCH 086/216] Legacy: Added steamcmddir --- lgsm/functions/core_legacy.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lgsm/functions/core_legacy.sh b/lgsm/functions/core_legacy.sh index f309894a6..de9d6408a 100644 --- a/lgsm/functions/core_legacy.sh +++ b/lgsm/functions/core_legacy.sh @@ -10,4 +10,8 @@ fi if [ -z "${logdir}" ]; then logdir="${rootdir}/log" -fi \ No newline at end of file +fi + +if [ -z "${steamcmddir}" ]; then + steamcmddir="${rootdir}/steamcmd" +fi From 441ff9071253086d1eb37ceb7eeb024db9309626 Mon Sep 17 00:00:00 2001 From: Marvin Lehmann Date: Thu, 11 May 2017 23:14:43 +0200 Subject: [PATCH 087/216] Fixed graceful select order --- lgsm/functions/command_stop.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index 37cc54c11..a66886a93 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -259,18 +259,18 @@ fn_stop_graceful_terraria(){ fn_stop_graceful_select(){ if [ "${gamename}" == "7 Days To Die" ]; then fn_stop_graceful_sdtd - elif [ "${gamename}" == "Factorio" ]||[ "${gamename}" == "Minecraft" ]||[ "${gamename}" == "Multi Theft Auto" ]||[ "${engine}" == "unity3d" ]||[ "${engine}" == "unreal4" ]||[ "${engine}" == "unreal3" ]||[ "${engine}" == "unreal2" ]||[ "${engine}" == "unreal" ]||[ "${gamename}" == "Mumble" ]; then - fn_stop_graceful_ctrlc - elif [ "${engine}" == "source" ]||[ "${engine}" == "quake" ]||[ "${engine}" == "idtech2" ]||[ "${engine}" == "idtech3" ]||[ "${engine}" == "idtech3_ql" ]||[ "${engine}" == "Just Cause 2" ]; then - fn_stop_graceful_quit - elif [ "${engine}" == "goldsource" ]; then - fn_stop_graceful_goldsource + elif [ "${gamename}" == "Terraria" ]; then + fn_stop_graceful_terraria elif [ "${engine}" == "lwjgl2" ]; then fn_stop_graceful_minecraft elif [ "${engine}" == "renderware" ]; then fn_stop_graceful_mta - elif [ "${engine}" == "terraria" ]; then - fn_stop_graceful_terraria + elif [ "${engine}" == "goldsource" ]; then + fn_stop_graceful_goldsource + elif [ "${gamename}" == "Factorio" ]||[ "${gamename}" == "Minecraft" ]||[ "${gamename}" == "Multi Theft Auto" ]||[ "${engine}" == "unity3d" ]||[ "${engine}" == "unreal4" ]||[ "${engine}" == "unreal3" ]||[ "${engine}" == "unreal2" ]||[ "${engine}" == "unreal" ]||[ "${gamename}" == "Mumble" ]; then + fn_stop_graceful_ctrlc + elif [ "${engine}" == "source" ]||[ "${engine}" == "quake" ]||[ "${engine}" == "idtech2" ]||[ "${engine}" == "idtech3" ]||[ "${engine}" == "idtech3_ql" ]||[ "${engine}" == "Just Cause 2" ]; then + fn_stop_graceful_quit else fn_stop_tmux fi From 1d41567c8b47bf06a9903793d6eaefccd8d9019f Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 11 May 2017 22:35:08 +0100 Subject: [PATCH 088/216] fixed config installation --- lgsm/functions/install_config.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index bca134421..7d3b118e4 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -20,9 +20,9 @@ fn_check_cfgdir(){ # Downloads default configs from Game-Server-Configs repo to lgsm/config-default fn_fetch_default_config(){ mkdir -p "${lgsmdir}/config-default/config-game" - githuburl="https://github.com/GameServerManagers/Game-Server-Configs/master" + githuburl="https://raw.githubusercontent.com/GameServerManagers/Game-Server-Configs/master" for config in "${array_configs[@]}"; do - fn_fetch_file "${githuburl}/${config}" "${lgsmdir}/config-default/config-game" "${config}" "nochmodx" "norun" "noforce" "nomd5" + fn_fetch_file "${githuburl}/${gamedirname}/${config}" "${lgsmdir}/config-default/config-game" "${config}" "nochmodx" "norun" "noforce" "nomd5" done } From 9225fce14788bd9bb68fed55cd615328d8dee197 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 11 May 2017 22:36:04 +0100 Subject: [PATCH 089/216] added mkdir -pv --- lgsm/functions/check_steamcmd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/check_steamcmd.sh b/lgsm/functions/check_steamcmd.sh index 2b8cb0f0b..9aab57f9f 100644 --- a/lgsm/functions/check_steamcmd.sh +++ b/lgsm/functions/check_steamcmd.sh @@ -8,7 +8,7 @@ local commandname="CHECK" fn_install_steamcmd(){ if [ ! -d "${steamcmddir}" ]; then - mkdir -v "${steamcmddir}" + mkdir -pv "${steamcmddir}" fi fn_fetch_file "http://media.steampowered.com/client/steamcmd_linux.tar.gz" "${tmpdir}" "steamcmd_linux.tar.gz" fn_dl_extract "${tmpdir}" "steamcmd_linux.tar.gz" "${steamcmddir}" From 898619be856a399b02c743e451aa6af0f5c00908 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 11 May 2017 22:50:51 +0100 Subject: [PATCH 090/216] Altered getopt to move update-lgsm --- lgsm/functions/core_getopt.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lgsm/functions/core_getopt.sh b/lgsm/functions/core_getopt.sh index 79275ed43..391b47665 100644 --- a/lgsm/functions/core_getopt.sh +++ b/lgsm/functions/core_getopt.sh @@ -17,15 +17,15 @@ cmd_restart=( "r;restart" "command_restart.sh" "Restart the server." ) cmd_details=( "dt;details" "command_details.sh" "Display server information." ) cmd_postdetails=( "pd;postdetails" "command_postdetails.sh" "Post details to hastebin (removing passwords)." ) cmd_backup=( "b;backup" "command_backup.sh" "Create backup archives of the server." ) -cmd_update_linuxgsm=( "ul;update-lgsm;uf;update-functions" "command_update_linuxgsm.sh" "Update LinuxGSM." ) +cmd_update_linuxgsm=( "ul;update-lgsm;uf;update-functions" "command_update_linuxgsm.sh" "Check and apply any LinuxGSM updates." ) cmd_test_alert=( "ta;test-alert" "command_test_alert.sh" "Send a test alert." ) cmd_monitor=( "m;monitor" "command_monitor.sh" "Check server status and restart if crashed." ) # Console servers only cmd_console=( "c;console" "command_console.sh" "Access server console." ) cmd_debug=( "d;debug" "command_debug.sh" "Start server directly in your terminal." ) # Update servers only -cmd_update=( "u;update" "command_update.sh" "Check and apply any updates." ) -cmd_force_update=( "fu;force-update;update-restart;ur" "forceupdate=1; command_update.sh" "Bypass update check and apply any updates." ) +cmd_update=( "u;update" "command_update.sh" "Check and apply any server updates." ) +cmd_force_update=( "fu;force-update;update-restart;ur" "forceupdate=1; command_update.sh" "Apply server updates bypassing check." ) # SteamCMD servers only cmd_validate=( "v;validate" "command_validate.sh" "Validate server files with SteamCMD." ) # Server with mods-install @@ -51,6 +51,9 @@ cmd_dev_detect_ldd=( "dl;detect-ldd" "command_dev_detect_ldd.sh" "Detect require currentopt=( "${cmd_start[@]}" "${cmd_stop[@]}" "${cmd_restart[@]}" "${cmd_monitor[@]}" "${cmd_test_alert[@]}" "${cmd_details[@]}" "${cmd_postdetails[@]}" ) +# Update LGSM +currentopt+=( "${cmd_update_linuxgsm[@]}" ) + # Exclude noupdate games here if [ "${gamename}" != "Battlefield: 1942" ]&&[ "${engine}" != "quake" ]&&[ "${engine}" != "idtech2" ]&&[ "${engine}" != "idtech3" ]&&[ "${engine}" != "iw2.0" ]&&[ "${engine}" != "iw3.0" ]; then currentopt+=( "${cmd_update[@]}" ) @@ -65,9 +68,6 @@ if [ -n "${appid}" ]; then currentopt+=( "${cmd_validate[@]}" ) fi -# Update LGSM -currentopt+=( "${cmd_update_linuxgsm[@]}" ) - #Backup currentopt+=( "${cmd_backup[@]}" ) From 4e2e9539129eed524c624be5e7cc710cf7de286a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 11 May 2017 23:06:56 +0100 Subject: [PATCH 091/216] corrected type if to dev/null errors the errors should not appear as it was breaking the if statement --- lgsm/functions/core_functions.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index c319cd55a..a417ca36c 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -9,7 +9,7 @@ core_dl.sh(){ functionfile="${FUNCNAME}" -if [ "$(type fn_fetch_core_dl)" ];then +if [ "$(type fn_fetch_core_dl 2>/dev/null)" ];then fn_fetch_core_dl "lgsm/functions" "core_dl.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" else fn_bootstrap_fetch_file_github "lgsm/functions" "core_dl.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" @@ -18,7 +18,7 @@ fi core_messages.sh(){ functionfile="${FUNCNAME}" -if [ "$(type fn_fetch_core_dl)" ];then +if [ "$(type fn_fetch_core_dl 2>/dev/null)" ];then fn_fetch_core_dl "lgsm/functions" "core_messages.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" else fn_bootstrap_fetch_file_github "lgsm/functions" "core_messages.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" @@ -27,7 +27,7 @@ fi core_legacy.sh(){ functionfile="${FUNCNAME}" -if [ "$(type fn_fetch_core_dl)" ];then +if [ "$(type fn_fetch_core_dl 2>/dev/null)" ];then fn_fetch_core_dl "lgsm/functions" "core_legacy.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" else fn_bootstrap_fetch_file_github "lgsm/functions" "core_legacy.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" From 40c36615cdb1b2c510aece11446fcabd27de7f12 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 11 May 2017 23:11:04 +0100 Subject: [PATCH 092/216] code tidy then --- lgsm/functions/check.sh | 2 +- lgsm/functions/check_system_dir.sh | 2 +- lgsm/functions/check_tmuxception.sh | 4 ++-- lgsm/functions/command_dev_detect_deps.sh | 2 +- lgsm/functions/command_dev_detect_glibc.sh | 2 +- lgsm/functions/command_start.sh | 2 +- lgsm/functions/core_functions.sh | 6 +++--- lgsm/functions/info_config.sh | 1 - lgsm/functions/install_gslt.sh | 4 ++-- lgsm/functions/mods_core.sh | 4 ++-- linuxgsm.sh | 12 ++++++------ 11 files changed, 20 insertions(+), 21 deletions(-) diff --git a/lgsm/functions/check.sh b/lgsm/functions/check.sh index 58933851e..c8e17cb05 100644 --- a/lgsm/functions/check.sh +++ b/lgsm/functions/check.sh @@ -13,7 +13,7 @@ local commandname="CHECK" check_root.sh check_tmuxception.sh -if [ "${function_selfname}" != "command_monitor.sh" ];then +if [ "${function_selfname}" != "command_monitor.sh" ]; then check_permissions.sh fi diff --git a/lgsm/functions/check_system_dir.sh b/lgsm/functions/check_system_dir.sh index c08fb33a7..f10f09a9d 100644 --- a/lgsm/functions/check_system_dir.sh +++ b/lgsm/functions/check_system_dir.sh @@ -7,7 +7,7 @@ local commandname="CHECK" local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -if [ "${function_selfname}" != "command_validate.sh" ];then +if [ "${function_selfname}" != "command_validate.sh" ]; then checkdir="${serverfiles}" else checkdir="${systemdir}" diff --git a/lgsm/functions/check_tmuxception.sh b/lgsm/functions/check_tmuxception.sh index 53f6febd5..528e85966 100644 --- a/lgsm/functions/check_tmuxception.sh +++ b/lgsm/functions/check_tmuxception.sh @@ -8,7 +8,7 @@ local commandname="check" fn_check_is_in_tmux(){ - if [ -n "${TMUX}" ];then + if [ -n "${TMUX}" ]; then fn_print_fail_nl "tmuxception error: Sorry Cobb you cannot start a tmux session inside of a tmux session." fn_script_log_fatal "Tmuxception error: Attempted to start a tmux session inside of a tmux session." fn_print_information_nl "LinuxGSM creates a tmux session when starting the server." @@ -18,7 +18,7 @@ fn_check_is_in_tmux(){ fi } fn_check_is_in_screen(){ - if [ -n "${STY}" ];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 "LinuxGSM creates a tmux session when starting the server." diff --git a/lgsm/functions/command_dev_detect_deps.sh b/lgsm/functions/command_dev_detect_deps.sh index 8f7cde8bb..1ee46b238 100644 --- a/lgsm/functions/command_dev_detect_deps.sh +++ b/lgsm/functions/command_dev_detect_deps.sh @@ -23,7 +23,7 @@ fi files=$(find ${filesdir} | wc -l) find "${filesdir}" -type f -print0 | while IFS= read -r -d $'\0' line; do - if [ "${readelf}" == "eu-readelf" ];then + if [ "${readelf}" == "eu-readelf" ]; then ${readelf} -d "${line}" 2>/dev/null|grep NEEDED|awk '{ print $4 }'|sed 's/\[//g;s/\]//g' >> "${tmpdir}/.depdetect_readelf" else ${readelf} -d "${line}" 2>/dev/null|grep NEEDED|awk '{ print $5 }'|sed 's/\[//g;s/\]//g' >> "${tmpdir}/.depdetect_readelf" diff --git a/lgsm/functions/command_dev_detect_glibc.sh b/lgsm/functions/command_dev_detect_glibc.sh index 6f085a590..bfb7a80cf 100644 --- a/lgsm/functions/command_dev_detect_glibc.sh +++ b/lgsm/functions/command_dev_detect_glibc.sh @@ -32,7 +32,7 @@ files=$(find ${serverfiles} | wc -l) find ${serverfiles} -type f -print0 | while IFS= read -r -d $'\0' line; do glibcversion=$(objdump -T "${line}" 2>/dev/null|grep -oP "GLIBC[^ ]+" |grep -v GLIBCXX|sort|uniq|sort -r --version-sort| head -n 1) - if [ "${glibcversion}" ];then + if [ "${glibcversion}" ]; then echo "${glibcversion}: ${line}" >>"${tmpdir}/detect_glibc_files.tmp" fi objdump -T "${line}" 2>/dev/null|grep -oP "GLIBC[^ ]+" >>"${tmpdir}/detect_glibc.tmp" diff --git a/lgsm/functions/command_start.sh b/lgsm/functions/command_start.sh index a912e77ed..e1db4ab5f 100644 --- a/lgsm/functions/command_start.sh +++ b/lgsm/functions/command_start.sh @@ -37,7 +37,7 @@ fn_start_teamspeak3(){ # Create lockfile date > "${rootdir}/${lockselfname}" cd "${executabledir}" - if [ "${ts3serverpass}" == "1" ];then + if [ "${ts3serverpass}" == "1" ]; then ./ts3server_startscript.sh start serveradmin_password="${newpassword}" inifile="${servercfgfullpath}" > /dev/null 2>&1 else ./ts3server_startscript.sh start inifile="${servercfgfullpath}" > /dev/null 2>&1 diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index a417ca36c..b95ef9e66 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -9,7 +9,7 @@ core_dl.sh(){ functionfile="${FUNCNAME}" -if [ "$(type fn_fetch_core_dl 2>/dev/null)" ];then +if [ "$(type fn_fetch_core_dl 2>/dev/null)" ]; then fn_fetch_core_dl "lgsm/functions" "core_dl.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" else fn_bootstrap_fetch_file_github "lgsm/functions" "core_dl.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" @@ -18,7 +18,7 @@ fi core_messages.sh(){ functionfile="${FUNCNAME}" -if [ "$(type fn_fetch_core_dl 2>/dev/null)" ];then +if [ "$(type fn_fetch_core_dl 2>/dev/null)" ]; then fn_fetch_core_dl "lgsm/functions" "core_messages.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" else fn_bootstrap_fetch_file_github "lgsm/functions" "core_messages.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" @@ -27,7 +27,7 @@ fi core_legacy.sh(){ functionfile="${FUNCNAME}" -if [ "$(type fn_fetch_core_dl 2>/dev/null)" ];then +if [ "$(type fn_fetch_core_dl 2>/dev/null)" ]; then fn_fetch_core_dl "lgsm/functions" "core_legacy.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" else fn_bootstrap_fetch_file_github "lgsm/functions" "core_legacy.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index a179efbb4..80ec3ce68 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -21,7 +21,6 @@ fn_info_config_avalanche(){ maxplayers="${zero}" port="${zero}" else - servername=$(grep "Name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/Name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') serverpassword=$(grep "Password" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') diff --git a/lgsm/functions/install_gslt.sh b/lgsm/functions/install_gslt.sh index 5f62539d7..954a78af1 100644 --- a/lgsm/functions/install_gslt.sh +++ b/lgsm/functions/install_gslt.sh @@ -26,7 +26,7 @@ fn_script_log_info "Get more info and a token here:" fn_script_log_info "https://gameservermanagers.com/gslt" echo "" if [ -z "${autoinstall}" ]; then - if [ "${gamename}" != "Tower Unite" ];then + if [ "${gamename}" != "Tower Unite" ]; then echo "Enter token below (Can be blank)." echo -n "GSLT TOKEN: " read token @@ -34,7 +34,7 @@ if [ -z "${autoinstall}" ]; then fi fi sleep 1 -if [ "${gamename}" == "Tower Unite" ];then +if [ "${gamename}" == "Tower Unite" ]; then echo "The GSLT can be changed by editing ${servercfg}." fn_script_log_info "The GSLT can be changed by editing ${servercfg}." else diff --git a/lgsm/functions/mods_core.sh b/lgsm/functions/mods_core.sh index 7e9c1cdf9..b5bf221fc 100644 --- a/lgsm/functions/mods_core.sh +++ b/lgsm/functions/mods_core.sh @@ -230,7 +230,7 @@ fn_mods_installed_list(){ # Increment line check ((installedmodsline++)) done - if [ -n "${installedmodscount}" ] ;then + if [ -n "${installedmodscount}" ] ; then fn_script_log_info "${installedmodscount} addons/mods are currently installed" fi } @@ -345,7 +345,7 @@ fn_mod_compatible_test(){ # Create mods files and directories if it doesn't exist fn_create_mods_dir(){ # Create lgsm data modsdir - if [ ! -d "${modsdir}" ];then + if [ ! -d "${modsdir}" ]; then echo -en "creating LinuxGSM mods data directory ${modsdir}..." mkdir -p "${modsdir}" exitcode=$? diff --git a/linuxgsm.sh b/linuxgsm.sh index 0ca3f28e7..0f85c5070 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -281,7 +281,7 @@ if [ "${shortname}" == "core" ]; then fi fi - if [ ! -f "${serverlist}" ];then + if [ ! -f "${serverlist}" ]; then echo "[ FAIL ] serverlist.csv could not be loaded." exit 1 fi @@ -318,11 +318,11 @@ else # Load LinuxGSM configs # These are required to get all the default variables for the specific server. # Load the default config. If missing download it. If changed reload it. - if [ ! -f "${configdirdefault}/config-lgsm/${servername}/_default.cfg" ];then + if [ ! -f "${configdirdefault}/config-lgsm/${servername}/_default.cfg" ]; then mkdir -p "${configdirdefault}/config-lgsm/${servername}" fn_fetch_config "lgsm/config-default/config-lgsm/${servername}" "_default.cfg" "${configdirdefault}/config-lgsm/${servername}" "_default.cfg" "nochmodx" "norun" "noforcedl" "nomd5" fi - if [ ! -f "${configdirserver}/_default.cfg" ];then + if [ ! -f "${configdirserver}/_default.cfg" ]; then mkdir -p "${configdirserver}" echo -ne " copying _default.cfg...\c" cp -R "${configdirdefault}/config-lgsm/${servername}/_default.cfg" "${configdirserver}/_default.cfg" @@ -350,21 +350,21 @@ else fi source "${configdirserver}/_default.cfg" # Load the common.cfg config. If missing download it - if [ ! -f "${configdirserver}/common.cfg" ];then + if [ ! -f "${configdirserver}/common.cfg" ]; then fn_fetch_config "lgsm/config-default/config-lgsm" "common-template.cfg" "${configdirserver}" "common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nomd5" source "${configdirserver}/common.cfg" else source "${configdirserver}/common.cfg" fi # Load the instance.cfg config. If missing download it - if [ ! -f "${configdirserver}/${servicename}.cfg" ];then + if [ ! -f "${configdirserver}/${servicename}.cfg" ]; then fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${servicename}.cfg" "nochmodx" "norun" "noforcedl" "nomd5" source "${configdirserver}/${servicename}.cfg" else source "${configdirserver}/${servicename}.cfg" fi # Load the linuxgsm.sh in to tmpdir. If missing download it - if [ ! -f "${tmpdir}/linuxgsm.sh" ];then + if [ ! -f "${tmpdir}/linuxgsm.sh" ]; then fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "chmodx" "norun" "noforcedl" "nomd5" fi getopt=$1 From e82deb4a918ff153367986834d7d28feeec76c42 Mon Sep 17 00:00:00 2001 From: Marvin Lehmann Date: Fri, 12 May 2017 00:34:10 +0200 Subject: [PATCH 093/216] Compare gamename instead of engine for MC and MTA - removed unneeded checks - corrected comments --- lgsm/functions/command_stop.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index a66886a93..30f391b8a 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -172,7 +172,7 @@ fn_stop_graceful_sdtd(){ fn_stop_tmux } -# Attempts graceful of source using rcon 'stop' command. +# Attempts graceful of Minecraft using rcon 'stop' command. fn_stop_graceful_minecraft(){ fn_print_dots "Graceful: sending \"stop\"" fn_script_log_info "Graceful: sending \"stop\"" @@ -228,7 +228,7 @@ fn_stop_graceful_mta(){ fn_stop_tmux } -# Attempts graceful of source using rcon 'exit' command. +# Attempts graceful of Terraria using 'exit' console command. fn_stop_graceful_terraria(){ fn_print_dots "Graceful: sending \"exit\"" fn_script_log_info "Graceful: sending \"exit\"" @@ -261,13 +261,13 @@ fn_stop_graceful_select(){ fn_stop_graceful_sdtd elif [ "${gamename}" == "Terraria" ]; then fn_stop_graceful_terraria - elif [ "${engine}" == "lwjgl2" ]; then + elif [ "${gamename}" == "Minecraft" ]; then fn_stop_graceful_minecraft - elif [ "${engine}" == "renderware" ]; then + elif [ "${gamename}" == "Multi Theft Auto" ]; then fn_stop_graceful_mta elif [ "${engine}" == "goldsource" ]; then fn_stop_graceful_goldsource - elif [ "${gamename}" == "Factorio" ]||[ "${gamename}" == "Minecraft" ]||[ "${gamename}" == "Multi Theft Auto" ]||[ "${engine}" == "unity3d" ]||[ "${engine}" == "unreal4" ]||[ "${engine}" == "unreal3" ]||[ "${engine}" == "unreal2" ]||[ "${engine}" == "unreal" ]||[ "${gamename}" == "Mumble" ]; then + elif [ "${gamename}" == "Factorio" ]||[ "${engine}" == "unity3d" ]||[ "${engine}" == "unreal4" ]||[ "${engine}" == "unreal3" ]||[ "${engine}" == "unreal2" ]||[ "${engine}" == "unreal" ]||[ "${gamename}" == "Mumble" ]; then fn_stop_graceful_ctrlc elif [ "${engine}" == "source" ]||[ "${engine}" == "quake" ]||[ "${engine}" == "idtech2" ]||[ "${engine}" == "idtech3" ]||[ "${engine}" == "idtech3_ql" ]||[ "${engine}" == "Just Cause 2" ]; then fn_stop_graceful_quit From 905e854227fed5a13130004fa2df93cfedaff3ae Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 12 May 2017 16:31:56 +0100 Subject: [PATCH 094/216] space --- MultiTheftAuto/mtaserver | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MultiTheftAuto/mtaserver b/MultiTheftAuto/mtaserver index f252e247a..c627879e4 100644 --- a/MultiTheftAuto/mtaserver +++ b/MultiTheftAuto/mtaserver @@ -26,7 +26,7 @@ version="170501" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters # Edit with care fn_parms(){ -parms=" " +parms="" } #### LinuxGSM Settings #### From 3ee3fcb484920a8a169f3950345dba79ad32c1b3 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 12 May 2017 17:02:47 +0100 Subject: [PATCH 095/216] removec rconpassword --- lgsm/functions/info_config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 80ec3ce68..79c80919f 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -210,8 +210,8 @@ fn_info_config_factorio(){ # Not Set servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} maxplayers=${maxplayers=:-"0"} - rconpassword=${rconpassword=:-"NOT SET"} fi } From b72381c16820455f24a9ced7973a79675a0a4d9e Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 12 May 2017 17:04:05 +0100 Subject: [PATCH 096/216] added /save-${servicename}.zip to identify the save --- Factorio/fctrserver | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Factorio/fctrserver b/Factorio/fctrserver index a149b4684..12423a73d 100644 --- a/Factorio/fctrserver +++ b/Factorio/fctrserver @@ -30,7 +30,7 @@ ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters fn_parms(){ -parms="--start-server ${filesdir}/save1.zip --server-settings ${servercfgfullpath} --port ${port} --rcon-port ${rconport} --rcon-password ${rconpassword}" +parms="--start-server ${filesdir}/save-${servicename}.zip --server-settings ${servercfgfullpath} --port ${port} --rcon-port ${rconport} --rcon-password ${rconpassword}" } #### LinuxGSM Settings #### From bbbcb94dfdcd9c858bfd54bc7b49cb06785a57e0 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 12 May 2017 17:09:12 +0100 Subject: [PATCH 097/216] Added more DST details --- lgsm/functions/command_details.sh | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index 843b09eaf..b3250325e 100644 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -153,9 +153,14 @@ fn_details_gameserver(){ echo -e "${blue}Tick rate:\t${default}${tickrate}" fi - # Cluster (Don't Starve Together) - if [ -n "${cluster}" ]; then - echo -e "${blue}Cluster:\t${default}${cluster}" + # Sharding (Don't Starve Together) + if [ -n "${sharding}" ]; then + echo -e "${blue}Sharding:\t${default}${sharding}" + fi + + # Master (Don't Starve Together) + if [ -n "${master}" ]; then + echo -e "${blue}Master:\t${default}${master}" fi # Shard (Don't Starve Together) @@ -163,6 +168,16 @@ fn_details_gameserver(){ echo -e "${blue}Shard:\t${default}${shard}" fi + # Cluster (Don't Starve Together) + if [ -n "${cluster}" ]; then + echo -e "${blue}Cluster:\t${default}${cluster}" + fi + + # Cave (Don't Starve Together) + if [ -n "${cave}" ]; then + echo -e "${blue}Cave:\t${default}${cave}" + fi + # TeamSpeak dbplugin if [ -n "${dbplugin}" ]; then echo -e "${blue}dbplugin:\t${default}${dbplugin}" From 2717fedd2d3e671ef53991f9a01009b12a06ad58 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 12 May 2017 17:35:58 +0100 Subject: [PATCH 098/216] Working on info_parms --- lgsm/functions/info_parms.sh | 176 +++++++++++++---------------------- 1 file changed, 66 insertions(+), 110 deletions(-) diff --git a/lgsm/functions/info_parms.sh b/lgsm/functions/info_parms.sh index 17be983fd..c20fe39f0 100644 --- a/lgsm/functions/info_parms.sh +++ b/lgsm/functions/info_parms.sh @@ -2,7 +2,7 @@ # LinuxGSM info_parms.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com -# Description: Gets specific details from server parameters. +# Description: If specific parms are not set then this will be displayed in details. local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" @@ -15,139 +15,95 @@ local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" unavailable="${red}UNAVAILABLE${default}" zero="${red}0${default}" -fn_info_config_quakelive(){ - # Not Set - port=${port:-"NOT SET"} +fn_info_parms_ark(){ + port=${port:-"0"} + queryport=${queryport:-"0"} rconport=${rconport:-"0"} - rconpassword=${rconpassword:-"NOT SET"} - statsport=${statsport:-"0"} - statspassword=${statspassword:-"NOT SET"} - mappool=${mappool:-"NOT SET"} - rconpassword=${rconpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} } -fn_info_config_source(){ +fn_info_parms_realvirtuality(){ + port=${port:-"0"} +} + +fn_info_parms_cod(){ defaultmap=${defaultmap:-"NOT SET"} maxplayers=${maxplayers:-"0"} port=${port:-"0"} - clientport=${clientport:-"0"} } -fn_info_config_spark(){ - # Not Set +fn_info_parms_dst(){ + sharding=${sharding:-"NOT SET"} + master=${master:-"NOT SET"} + shard=${shard:-"NOT SET"} + cluster=${cluster:-"NOT SET"} + cave=${cave:-"NOT SET"} + +fn_info_parms_factorio(){ port=${port:-"0"} - queryport=$((port + 1)) - maxplayers=${maxplayers:-"0"} - webadminuser=${webadminuser:-"NOT SET"} - webadminpass=${webadminpass:-"NOT SET"} - webadminport=${webadminport:-"0"} + rconport=${rconport:-"0"} + rconpassword=${rconpassword:-"NOT SET"} } -fn_info_config_teeworlds(){ - if [ ! -f "${servercfgfullpath}" ]; then - servername="unnamed server" - serverpassword="${unavailable}" - rconpassword="${unavailable}" - port="8303" - maxplayers="12" - else - servername=$(grep "sv_name" "${servercfgfullpath}" | sed 's/sv_name //g' | sed 's/"//g') - serverpassword=$(grep "password " "${servercfgfullpath}" | awk '!/sv_rcon_password/'| sed 's/password //g' | tr -d '=\"; ') - rconpassword=$(grep "sv_rcon_password" "${servercfgfullpath}" | sed 's/sv_rcon_password //g' | tr -d '=\"; ') - port=$(grep "sv_port" "${servercfgfullpath}" | tr -cd '[:digit:]') - maxplayers=$(grep "sv_max_clients" "${servercfgfullpath}" | tr -cd '[:digit:]') +fn_info_parms_hurtworld(){ + servername=${defaultmap:-"NOT SET"} + port=${port:-"0"} + queryport=${queryport:-"0"} + maxplayers=${maxplayers:-"0"} + defaultmap=${defaultmap:-"NOT SET"} + creativemode=${creativemode:-"NOT SET"} + x64mode=${creativemode:-"NOT SET"} + admins="" - # Not Set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - rconpassword=${rconpassword:-"NOT SET"} - port=${port:-"8303"} - maxplayers=${maxplayers:-"12"} - fi + ## Advanced Server Start Settings + # Rollback server state (remove after start command) + loadsave="" + # Use unstable 64 bit server executable (O/1) + x64mode="0" } -fn_info_config_terraria(){ - if [ ! -f "${servercfgfullpath}" ]; then - port="0" - else - port=$(grep "port=" "${servercfgfullpath}" | tr -cd '[:digit:]') - - # Not Set - port=${port:-"0"} - fi +fn_info_parms_source(){ + defaultmap=${defaultmap:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"0"} + clientport=${clientport:-"0"} } -fn_info_config_unreal(){ - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - adminpassword="${unavailable}" - port="${zero}" - gsqueryport="${zero}" - webadminenabled="${unavailable}" - webadminport="${zero}" - webadminuser="${unavailable}" - webadminpass="${unavailable}" - else - servername=$(grep "ServerName=" "${servercfgfullpath}" | sed 's/ServerName=//g') - serverpassword=$(grep "GamePassword=" "${servercfgfullpath}" | sed 's/GamePassword=//g') - adminpassword=$(grep "AdminPassword=" "${servercfgfullpath}" | sed 's/AdminPassword=//g') - port=$(grep "Port=" "${servercfgfullpath}" | grep -v "Master" | grep -v "LAN" | grep -v "Proxy" | grep -v "Listen" | tr -d '\r' | tr -cd '[:digit:]') - gsqueryport=$(grep "OldQueryPortNumber=" "${servercfgfullpath}" | tr -d '\r' | tr -cd '[:digit:]') - webadminenabled=$(grep "bEnabled=" "${servercfgfullpath}" | sed 's/bEnabled=//g' | tr -d '\r') - webadminport=$(grep "ListenPort=" "${servercfgfullpath}" | tr -d '\r' | tr -cd '[:digit:]') - if [ "${engine}" == "unreal" ]; then - webadminuser=$(grep "AdminUsername=" "${servercfgfullpath}" | sed 's/\AdminUsername=//g') - webadminpass=$(grep "UTServerAdmin.UTServerAdmin" "${servercfgfullpath}" -A 2 | grep "AdminPassword=" | sed 's/\AdminPassword=//g') - else - webadminuser=$(grep "AdminName=" "${servercfgfullpath}" | sed 's/\AdminName=//g') - webadminpass=$(grep "AdminPassword=" "${servercfgfullpath}" | sed 's/\AdminPassword=//g') - fi +fn_info_parms_spark(){ + defaultmap=${defaultmap:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"0"} + queryport=$((port + 1)) + servername=${servername:-"NOT SET"} + webadminuser=${webadminuser:-"NOT SET"} + webadminpass=${webadminpass:-"NOT SET"} + webadminport=${webadminport:-"0"} + mods=${mods:-"NOT SET"} + password=${password:-"NOT SET"} +} - # Not Set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - adminpassword=${adminpassword:-"NOT SET"} - port=${port:-"0"} - gsqueryport=${gsqueryport:-"NOT SET"} - webadminenabled=${webadminenabled:-"NOT SET"} - webadminport=${webadminport:-"NOT SET"} - webadminuser=${webadminuser:-"NOT SET"} - webadminpass=${webadminpass:-"NOT SET"} - fi +fn_info_parms_unreal(){ +: } -## Just Cause 2 -if [ "${engine}" == "avalanche" ]; then - fn_info_config_avalanche -## Dont Starve Together -elif [ "${engine}" == "dontstarve" ]; then - fn_info_config_dontstarve -## Project Zomboid -elif [ "${engine}" == "projectzomboid" ]; then - fn_info_config_projectzomboid -# Quake Live -elif [ "${gamename}" == "Quake Live" ]; then - fn_info_config_quakelive +# ARK: Survival Evolved +if [ "${gamename}" == "ARK: Survival Evolved" ]; then +fn_info_parms_ark # ARMA 3 elif [ "${engine}" == "realvirtuality" ]; then - fn_info_config_realvirtuality -# Serious Sam -elif [ "${engine}" == "seriousengine35" ]; then - fn_info_config_seriousengine35 -# Source Engine Games +fn_info_parms_realvirtuality +# Call of Duty +elif [ "${gamename}" == "Call of Duty" ]||[ "${gamename}" == "Call of Duty: United Offensive" ]||[ "${engine}" == "iw2.0" ]||[ "${engine}" == "iw3.0" ]; then + fn_info_parms_cod +# Factorio +elif [ "${gamename}" == "Factorio" ]; then + fn_info_parms_factorio elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then - fn_info_config_source + fn_info_parms_source # Spark elif [ "${engine}" == "spark" ]; then - fn_info_config_spark -# Teeworlds -elif [ "${engine}" == "teeworlds" ]; then - fn_info_config_teeworlds -# Terraria -elif [ "${engine}" == "terraria" ]; then - fn_info_config_terraria + fn_info_parms_spark # Unreal/Unreal 2 engine elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then - fn_info_config_unreal + fn_info_parms_unreal fi From a7e25ac613aa3512790ec719386d5fadba400ca1 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 12 May 2017 17:37:43 +0100 Subject: [PATCH 099/216] changed map to defaultmap --- Hurtworld/hwserver | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Hurtworld/hwserver b/Hurtworld/hwserver index fb118edf3..1db590f8f 100644 --- a/Hurtworld/hwserver +++ b/Hurtworld/hwserver @@ -28,7 +28,7 @@ ip="0.0.0.0" port="12871" queryport="12881" maxplayers="20" -map="" #Optional +defaultmap="" #Optional creativemode="0" #Free Build: creativemode="1" logfile="gamelog.txt" @@ -45,7 +45,7 @@ x64mode="0" ## 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}\" " +parms="-batchmode -nographics -exec \"host ${port} ${defaultmap} ${loadsave};queryport ${queryport};maxplayers ${maxplayers};servername ${servername};creativemode ${creativemode};${admins}\" -logfile \"${logfile}\" " } #### LinuxGSM Settings #### From b15fb7b4640b16932c95962b6a7958cc324d76c5 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 12 May 2017 17:40:57 +0100 Subject: [PATCH 100/216] Creative mode for hurtworld --- lgsm/functions/command_details.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index b3250325e..55df65e9d 100644 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -178,6 +178,11 @@ fn_details_gameserver(){ echo -e "${blue}Cave:\t${default}${cave}" fi + # Creativemode (Hurtworld) + if [ -n "${creativemode}" ]; then + echo -e "${blue}Creativemode:\t${default}${creativemode}" + fi + # TeamSpeak dbplugin if [ -n "${dbplugin}" ]; then echo -e "${blue}dbplugin:\t${default}${dbplugin}" From 51d9a7623b04f433c145168ebede0f4b4a48bae4 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 12 May 2017 22:33:31 +0100 Subject: [PATCH 101/216] added unreal --- lgsm/functions/info_parms.sh | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/lgsm/functions/info_parms.sh b/lgsm/functions/info_parms.sh index c20fe39f0..166dbcd3b 100644 --- a/lgsm/functions/info_parms.sh +++ b/lgsm/functions/info_parms.sh @@ -52,14 +52,6 @@ fn_info_parms_hurtworld(){ maxplayers=${maxplayers:-"0"} defaultmap=${defaultmap:-"NOT SET"} creativemode=${creativemode:-"NOT SET"} - x64mode=${creativemode:-"NOT SET"} - admins="" - - ## Advanced Server Start Settings - # Rollback server state (remove after start command) - loadsave="" - # Use unstable 64 bit server executable (O/1) - x64mode="0" } fn_info_parms_source(){ @@ -83,15 +75,15 @@ fn_info_parms_spark(){ } fn_info_parms_unreal(){ -: + defaultmap=${defaultmap:-"NOT SET"} } # ARK: Survival Evolved if [ "${gamename}" == "ARK: Survival Evolved" ]; then -fn_info_parms_ark + fn_info_parms_ark # ARMA 3 elif [ "${engine}" == "realvirtuality" ]; then -fn_info_parms_realvirtuality + fn_info_parms_realvirtuality # Call of Duty elif [ "${gamename}" == "Call of Duty" ]||[ "${gamename}" == "Call of Duty: United Offensive" ]||[ "${engine}" == "iw2.0" ]||[ "${engine}" == "iw3.0" ]; then fn_info_parms_cod From 3b4659262a62b86aaa20f4dee9a0ded91c6bf459 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 12 May 2017 22:47:04 +0100 Subject: [PATCH 102/216] Changed to serverpassword show it will now show in details --- NS2Combat/ns2cserver | 4 ++-- NaturalSelection2/ns2server | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/NS2Combat/ns2cserver b/NS2Combat/ns2cserver index f5357d570..99dfc1c00 100644 --- a/NS2Combat/ns2cserver +++ b/NS2Combat/ns2cserver @@ -36,10 +36,10 @@ webadminuser="admin" webadminpass="admin" webadminport="8080" mods="" -password="" +serverpassword="" # Add the following line to the parms if you want a private server. Ensuring # that the password variable above is not left empty. -# -password \"${password}\" +# -password \"${serverpassword}\" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters fn_parms(){ diff --git a/NaturalSelection2/ns2server b/NaturalSelection2/ns2server index 514f6aaae..91f0e9ea4 100644 --- a/NaturalSelection2/ns2server +++ b/NaturalSelection2/ns2server @@ -36,10 +36,10 @@ webadminuser="admin" webadminpass="admin" webadminport="8080" mods="" -password="" +serverpassword="" # Add the following line to the parms if you want a private server. Ensuring # that the password variable above is not left empty. -# -password \"${password}\" +# -password \"${serverpassword}\" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters fn_parms(){ From fffde74161a9a9f54f4c1b325f2a6d4d9a42919e Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 13 May 2017 01:00:12 +0100 Subject: [PATCH 103/216] Added Quake World --- lgsm/functions/info_config.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 79c80919f..cf4a2546c 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -301,6 +301,24 @@ fn_info_config_projectzomboid(){ fi } +fn_info_config_quakeworld(){ + if [ ! -f "${servercfgfullpath}" ]; then + rconpassword="${unavailable}" + servername="${unavailable}" + serverpassword="${unavailable}" + maxplayers="${zero}" + else + rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + + # Not Set + rconpassword=${rconpassword:-"NOT SET"} + servername=${servername:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + fi +} + fn_info_config_quake2(){ if [ ! -f "${servercfgfullpath}" ]; then rconpassword="${unavailable}" @@ -732,6 +750,9 @@ elif [ "${engine}" == "dontstarve" ]; then # Factorio elif [ "${gamename}" == "Factorio" ]; then fn_info_config_factorio +# QuakeWorld +elif [ "${gamename}" == "QuakeWorld" ]; then + fn_info_config_quakeworld # Quake 2 elif [ "${gamename}" == "Quake 2" ]; then fn_info_config_quake2 From c5d9b0c8d108d6a1f50a8972a6c1e508feb28728 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 13 May 2017 01:00:24 +0100 Subject: [PATCH 104/216] Added more games --- lgsm/functions/info_parms.sh | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/info_parms.sh b/lgsm/functions/info_parms.sh index 166dbcd3b..4839cfa66 100644 --- a/lgsm/functions/info_parms.sh +++ b/lgsm/functions/info_parms.sh @@ -46,7 +46,7 @@ fn_info_parms_factorio(){ } fn_info_parms_hurtworld(){ - servername=${defaultmap:-"NOT SET"} + servername=${servername:-"NOT SET"} port=${port:-"0"} queryport=${queryport:-"0"} maxplayers=${maxplayers:-"0"} @@ -54,6 +54,19 @@ fn_info_parms_hurtworld(){ creativemode=${creativemode:-"NOT SET"} } +fn_info_parms_projectzomboid(){ + adminpassword=${adminpassword:-"NOT SET"} +} + +fn_info_parms_quakeworld(){ + port=${port:-"0"} +} + +fn_info_parms_quake2(){ + port=${port:-"0"} + defaultmap=${defaultmap:-"NOT SET"} +} + fn_info_parms_source(){ defaultmap=${defaultmap:-"NOT SET"} maxplayers=${maxplayers:-"0"} @@ -67,11 +80,11 @@ fn_info_parms_spark(){ port=${port:-"0"} queryport=$((port + 1)) servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} webadminuser=${webadminuser:-"NOT SET"} webadminpass=${webadminpass:-"NOT SET"} webadminport=${webadminport:-"0"} mods=${mods:-"NOT SET"} - password=${password:-"NOT SET"} } fn_info_parms_unreal(){ @@ -90,6 +103,13 @@ elif [ "${gamename}" == "Call of Duty" ]||[ "${gamename}" == "Call of Duty: Unit # Factorio elif [ "${gamename}" == "Factorio" ]; then fn_info_parms_factorio +# Project Zomboid +elif [ "${engine}" == "projectzomboid" ]; then + fn_info_parms_projectzomboid +elif [ "${gamename}" == "QuakeWorld" ]; then + fn_info_parms_quakeworld +elif [ "${gamename}" == "Quake 2" ]||[ "${gamename}" == "Quake 3: Arena" ]; then + fn_info_parms_quake2 elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then fn_info_parms_source # Spark From fc84e30d95a768ad5b8ae16855710c24c958adfa Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 14 May 2017 19:42:14 +0100 Subject: [PATCH 105/216] Added more servers --- lgsm/functions/info_parms.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/lgsm/functions/info_parms.sh b/lgsm/functions/info_parms.sh index 4839cfa66..2101dc706 100644 --- a/lgsm/functions/info_parms.sh +++ b/lgsm/functions/info_parms.sh @@ -67,6 +67,17 @@ fn_info_parms_quake2(){ defaultmap=${defaultmap:-"NOT SET"} } +fn_info_parms_rust(){ + servername=${servername:-"NOT SET"} + port=${port:-"0"} + rconport=${rconport:-"0"} + rconpassword=${rconpassword:-"NOT SET"} + rconweb=${rconweb:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + saveinterval=${saveinterval:-"0"} + tickrate=${tickrate:-"0"} +} + fn_info_parms_source(){ defaultmap=${defaultmap:-"NOT SET"} maxplayers=${maxplayers:-"0"} @@ -87,6 +98,11 @@ fn_info_parms_spark(){ mods=${mods:-"NOT SET"} } +fn_info_config_towerunite(){ + port=${port:-"0"} + queryport=${queryport:-"0"} +} + fn_info_parms_unreal(){ defaultmap=${defaultmap:-"NOT SET"} } @@ -110,11 +126,19 @@ elif [ "${gamename}" == "QuakeWorld" ]; then fn_info_parms_quakeworld elif [ "${gamename}" == "Quake 2" ]||[ "${gamename}" == "Quake 3: Arena" ]; then fn_info_parms_quake2 +# Rust +elif [ "${gamename}" == "Rust" ]; then + fn_info_parms_rust +# Serious Sam +elif [ "${engine}" == "seriousengine35" ]; then + fn_info_config_seriousengine35 elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then fn_info_parms_source # Spark elif [ "${engine}" == "spark" ]; then fn_info_parms_spark +elif [ "${gamename}" == "Tower Unite" ]; then + fn_info_config_towerunite # Unreal/Unreal 2 engine elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then fn_info_parms_unreal From 016f321125c508f6abd139205df4cb7e4c857bd5 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 14 May 2017 19:42:29 +0100 Subject: [PATCH 106/216] Added extra rust details --- lgsm/functions/command_details.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index 55df65e9d..4ac96281f 100644 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -123,6 +123,11 @@ fn_details_gameserver(){ echo -e "${blue}RCON password:\t${default}${rconpassword}" fi + # RCON web (Rust) + if [ -n "${rconweb}" ]; then + echo -e "${blue}RCON web:\t${default}${rconweb}" + fi + # Admin password if [ -n "${adminpassword}" ]; then echo -e "${blue}Admin password:\t${default}${adminpassword}" @@ -193,6 +198,11 @@ fn_details_gameserver(){ echo -e "${blue}ASE:\t${default}${ase}" fi + # Save interval (Rust) + if [ -n "${saveinterval}" ]; then + echo -e "${blue}ASE:\t${default}${saveinterval} s" + fi + # Online status if [ "${status}" == "0" ]; then echo -e "${blue}Status:\t${red}OFFLINE${default}" From 9798fa6f5ccbb19f20f2204cdf4bb8756b2462c3 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 14 May 2017 20:08:56 +0100 Subject: [PATCH 107/216] Added unreal3 details --- lgsm/functions/info_config.sh | 7 +++++++ lgsm/functions/info_parms.sh | 12 ++++++++++++ 2 files changed, 19 insertions(+) diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index cf4a2546c..18f772050 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -607,6 +607,10 @@ fn_info_config_unreal(){ fi } +fn_info_config_unreal3(){ + servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') +} + fn_info_config_sdtd(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -800,6 +804,9 @@ elif [ "${gamename}" == "Tower Unite" ]; then # Unreal/Unreal 2 engine elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then fn_info_config_unreal +# Unreal 3 engine +elif [ "${engine}" == "unreal3" ]; then + fn_info_config_unreal3 # 7 Day To Die (unity3d) elif [ "${gamename}" == "7 Days To Die" ]; then fn_info_config_sdtd diff --git a/lgsm/functions/info_parms.sh b/lgsm/functions/info_parms.sh index 2101dc706..d1bdd5b41 100644 --- a/lgsm/functions/info_parms.sh +++ b/lgsm/functions/info_parms.sh @@ -107,6 +107,15 @@ fn_info_parms_unreal(){ defaultmap=${defaultmap:-"NOT SET"} } +fn_info_parms_unreal3(){ + port=${port:-"0"} + queryport=${queryport:-"0"} + defaultmap=${defaultmap:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + serverpassword=${serverpassword:-"NOT SET"} + adminpassword=${adminpassword:-"NOT SET"} +} + # ARK: Survival Evolved if [ "${gamename}" == "ARK: Survival Evolved" ]; then fn_info_parms_ark @@ -142,4 +151,7 @@ elif [ "${gamename}" == "Tower Unite" ]; then # Unreal/Unreal 2 engine elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then fn_info_parms_unreal +# Unreal/Unreal 2 engine +elif [ "${engine}" == "unreal3" ]; then + fn_info_parms_unreal3 fi From 4d3d20c61b09a3a1c8c898c3bfc086a950b2db68 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 14 May 2017 22:58:46 +0100 Subject: [PATCH 108/216] Added -ini= as was not applying the config --- UnrealTournament3/ut3server | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UnrealTournament3/ut3server b/UnrealTournament3/ut3server index bffcbb5d9..d5476d837 100644 --- a/UnrealTournament3/ut3server +++ b/UnrealTournament3/ut3server @@ -40,7 +40,7 @@ maxplayers="32" ## 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}" +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} -ini=${servercfgfullpath}"" } #### LinuxGSM Settings #### From 93f31b254686e4cd6d1f1c699223a31de8d693c8 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 14 May 2017 23:04:30 +0100 Subject: [PATCH 109/216] Added details for ut3 --- lgsm/functions/info_config.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 18f772050..22b7520af 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -608,7 +608,17 @@ fn_info_config_unreal(){ } fn_info_config_unreal3(){ - servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + webadminpass="${unavailable}" + else + servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + webadminpass=$(grep grep "AdminPassword" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + + # Not Set + servername=${servername:-"NOT SET"} + webadminpass=${webadminpass:-"NOT SET"} + fi } fn_info_config_sdtd(){ From b9d40f7e64a4a4f193f7db15908b5bc97f3b6695 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 14 May 2017 23:13:44 +0100 Subject: [PATCH 110/216] added legacymode flag --- lgsm/functions/core_legacy.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/lgsm/functions/core_legacy.sh b/lgsm/functions/core_legacy.sh index de9d6408a..e61a74817 100644 --- a/lgsm/functions/core_legacy.sh +++ b/lgsm/functions/core_legacy.sh @@ -5,6 +5,7 @@ # Description: Code for backwards compatability with older versions of LinuxGSM. if [ -z "${serverfiles}" ]; then + legacymode=1 serverfiles="${filesdir}" fi From 68e4f8ef9d24db8d6e6d8dba70d1115f0b03223d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 14 May 2017 23:15:52 +0100 Subject: [PATCH 111/216] If legacymode is on then bypass certain updates --- lgsm/functions/command_update_linuxgsm.sh | 92 ++++++++++++----------- 1 file changed, 47 insertions(+), 45 deletions(-) diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/functions/command_update_linuxgsm.sh index 5fbe32e6b..a91781c1b 100644 --- a/lgsm/functions/command_update_linuxgsm.sh +++ b/lgsm/functions/command_update_linuxgsm.sh @@ -14,58 +14,60 @@ check.sh fn_script_log_info "Updating LinuxGSM" echo -ne "\n" -# Check and update _default.cfg -echo -ne " checking config _default.cfg...\c" -config_file_diff=$(diff "${configdirdefault}/config-lgsm/${servername}/_default.cfg" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${servername}/_default.cfg")) -if [ "${config_file_diff}" != "" ]; then - fn_print_update_eol_nl - fn_script_log_info "checking config _default.cfg: UPDATE" - rm -f "${configdirdefault}/config-lgsm/${servername}/_default.cfg" - fn_fetch_config "lgsm/config-default/config-lgsm/${servername}" "_default.cfg" "${configdirdefault}/config-lgsm/${servername}" "_default.cfg" "nochmodx" "norun" "noforce" "nomd5" -else - fn_print_ok_eol_nl - fn_script_log_info "checking config _default.cfg: OK" -fi +if [ -z "${legacymode}" ];then + # Check and update _default.cfg + echo -ne " checking config _default.cfg...\c" + config_file_diff=$(diff "${configdirdefault}/config-lgsm/${servername}/_default.cfg" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${servername}/_default.cfg")) + if [ "${config_file_diff}" != "" ]; then + fn_print_update_eol_nl + fn_script_log_info "checking config _default.cfg: UPDATE" + rm -f "${configdirdefault}/config-lgsm/${servername}/_default.cfg" + fn_fetch_config "lgsm/config-default/config-lgsm/${servername}" "_default.cfg" "${configdirdefault}/config-lgsm/${servername}" "_default.cfg" "nochmodx" "norun" "noforce" "nomd5" + else + fn_print_ok_eol_nl + fn_script_log_info "checking config _default.cfg: OK" + fi -echo -ne " checking linuxgsm.sh...\c" -tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh")) -if [ "${tmp_script_diff}" != "" ]; then - fn_print_update_eol_nl - fn_script_log_info "checking linuxgsm.sh: UPDATE" - rm -f "${tmpdir}/linuxgsm.sh" - fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "nochmodx" "norun" "noforcedl" "nomd5" - # Compare selfname against linuxgsm.sh in the tmp dir. Ignoring server specific vars. -else - fn_script_log_info "checking linuxgsm.sh: OK" - fn_print_ok_eol_nl -fi -echo -ne " checking ${selfname}...\c" -script_diff=$(diff <(sed '/shortname/d;/servername/d;/gamename/d' "${tmpdir}/linuxgsm.sh") <(sed '/shortname/d;/servername/d;/gamename/d' "${rootdir}/${selfname}")) -if [ "${script_diff}" != "" ]; then - fn_print_update_eol_nl - echo -ne " backup ${selfname}...\c" - mkdir -p "${backupdir}/script/" - cp "${rootdir}/${selfname}" "${backupdir}/script/${selfname}-$(date +"%m_%d_%Y_%M").bak" - if [ $? -ne 0 ]; then - fn_print_fail_eol_nl - core_exit.sh + echo -ne " checking linuxgsm.sh...\c" + tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh")) + if [ "${tmp_script_diff}" != "" ]; then + fn_print_update_eol_nl + fn_script_log_info "checking linuxgsm.sh: UPDATE" + rm -f "${tmpdir}/linuxgsm.sh" + fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "nochmodx" "norun" "noforcedl" "nomd5" + # Compare selfname against linuxgsm.sh in the tmp dir. Ignoring server specific vars. else + fn_script_log_info "checking linuxgsm.sh: OK" fn_print_ok_eol_nl - echo -e " Backup: ${tmpdir}/${selfname}-$(date +"%m_%d_%Y_%M").bak" fi - echo -ne " fetching ${selfname}...\c" - cp "${tmpdir}/linuxgsm.sh" "${rootdir}/${selfname}" - sed -i "s/shortname=\"core\"/shortname=\"${shortname}\"/g" "${rootdir}/${selfname}" - sed -i "s/servername=\"core\"/servername=\"${servername}\"/g" "${rootdir}/${selfname}" - sed -i "s/gamename=\"core\"/gamename=\"${gamename}\"/g" "${rootdir}/${selfname}" - if [ $? -ne 0 ]; then - fn_print_fail_eol_nl - core_exit.sh + echo -ne " checking ${selfname}...\c" + script_diff=$(diff <(sed '/shortname/d;/servername/d;/gamename/d' "${tmpdir}/linuxgsm.sh") <(sed '/shortname/d;/servername/d;/gamename/d' "${rootdir}/${selfname}")) + if [ "${script_diff}" != "" ]; then + fn_print_update_eol_nl + echo -ne " backup ${selfname}...\c" + mkdir -p "${backupdir}/script/" + cp "${rootdir}/${selfname}" "${backupdir}/script/${selfname}-$(date +"%m_%d_%Y_%M").bak" + if [ $? -ne 0 ]; then + fn_print_fail_eol_nl + core_exit.sh + else + fn_print_ok_eol_nl + echo -e " Backup: ${tmpdir}/${selfname}-$(date +"%m_%d_%Y_%M").bak" + fi + echo -ne " fetching ${selfname}...\c" + cp "${tmpdir}/linuxgsm.sh" "${rootdir}/${selfname}" + sed -i "s/shortname=\"core\"/shortname=\"${shortname}\"/g" "${rootdir}/${selfname}" + sed -i "s/servername=\"core\"/servername=\"${servername}\"/g" "${rootdir}/${selfname}" + sed -i "s/gamename=\"core\"/gamename=\"${gamename}\"/g" "${rootdir}/${selfname}" + if [ $? -ne 0 ]; then + fn_print_fail_eol_nl + core_exit.sh + else + fn_print_ok_eol_nl + fi else fn_print_ok_eol_nl fi -else - fn_print_ok_eol_nl fi # Check and update functions From bb1c120208262157a09b0ea8c8accc7b81466000 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 14 May 2017 23:24:34 +0100 Subject: [PATCH 112/216] corrected bug --- lgsm/functions/install_server_files.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index c839027d6..34814f3c6 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -34,7 +34,7 @@ fn_install_server_files(){ elif [ "${gamename}" == "Unreal Tournament 99" ]; then remote_fileurl="http://files.gameservermanagers.com/UnrealTournament99/ut99-server-451-ultimate-linux.tar.bz2"; local_filedir="${tmpdir}"; local_filedir="ut99-server-451-ultimate-linux.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="49cb24d0550ff6ddeaba6007045c6edd" elif [ "${gamename}" == "Unreal Tournament" ]; then - fileurl="https://s3.amazonaws.com/unrealtournament/UnrealTournament-Server-XAN-3395761-Linux.zip"; filedir="${tmpdir}"; filename="UnrealTournament-Server-XAN-3395761-Linux.zip"; executecmd="noexecute" run="norun"; force="noforce"; md5="f04ad5b96865b19613303331ff4075eb" + fileurl="https://s3.amazonaws.com/unrealtournament/UnrealTournament-Client-XAN-3395761-Linux.zip"; filedir="${tmpdir}"; filename="UnrealTournament-Server-XAN-3395761-Linux.zip"; chmodx="noexecute" run="norun"; force="noforce"; md5="f04ad5b96865b19613303331ff4075eb" elif [ "${gamename}" == "Unreal Tournament 3" ]; then remote_fileurl="http://files.gameservermanagers.com/UnrealTournament3/UT3-linux-server-2.1.tar.bz2"; local_filedir="${tmpdir}"; local_filedir="UT3-linux-server-2.1.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="2527437b46f1b47f20228d27d72395a6" elif [ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then From d95edc3f7d39eb4084984eafa452426e640bb3ff Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 14 May 2017 23:41:13 +0100 Subject: [PATCH 113/216] corrected ut files bug --- lgsm/functions/install_server_files.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index 34814f3c6..592ab2810 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -34,7 +34,7 @@ fn_install_server_files(){ elif [ "${gamename}" == "Unreal Tournament 99" ]; then remote_fileurl="http://files.gameservermanagers.com/UnrealTournament99/ut99-server-451-ultimate-linux.tar.bz2"; local_filedir="${tmpdir}"; local_filedir="ut99-server-451-ultimate-linux.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="49cb24d0550ff6ddeaba6007045c6edd" elif [ "${gamename}" == "Unreal Tournament" ]; then - fileurl="https://s3.amazonaws.com/unrealtournament/UnrealTournament-Client-XAN-3395761-Linux.zip"; filedir="${tmpdir}"; filename="UnrealTournament-Server-XAN-3395761-Linux.zip"; chmodx="noexecute" run="norun"; force="noforce"; md5="f04ad5b96865b19613303331ff4075eb" + remote_fileurl="https://s3.amazonaws.com/unrealtournament/UnrealTournament-Client-XAN-3395761-Linux.zip"; local_filedir="${tmpdir}"; local_filedir="UnrealTournament-Server-XAN-3395761-Linux.zip"; chmodx="noexecute" run="norun"; force="noforce"; md5="f04ad5b96865b19613303331ff4075eb" elif [ "${gamename}" == "Unreal Tournament 3" ]; then remote_fileurl="http://files.gameservermanagers.com/UnrealTournament3/UT3-linux-server-2.1.tar.bz2"; local_filedir="${tmpdir}"; local_filedir="UT3-linux-server-2.1.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="2527437b46f1b47f20228d27d72395a6" elif [ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then From 85290d6b72c90051599ff8674e5ac7eddeae6bbe Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 14 May 2017 23:46:59 +0100 Subject: [PATCH 114/216] corrected download settings --- lgsm/functions/install_server_files.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index 592ab2810..f68a7db2f 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -40,7 +40,7 @@ fn_install_server_files(){ elif [ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then remote_fileurl="http://files.gameservermanagers.com/WolfensteinEnemyTerritory/enemy-territory.260b.tar.bz2"; local_filedir="${tmpdir}"; local_filedir="enemy-territory.260b.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="f833f514bfcdd46b42c111f83350c5a7" fi - fn_fetch_file "${fileurl}" "${filedir}" "${filename}" "${executecmd}" "${run}" "${force}" "${md5}" + fn_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" fn_dl_extract "${filedir}" "${filename}" "${serverfiles}" } From 4f8eb26f0099cd5f75c3e43aa26ebbaf90954e24 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 14 May 2017 23:54:52 +0100 Subject: [PATCH 115/216] corrected local_filename --- lgsm/functions/install_server_files.sh | 30 +++++++++++++------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index f68a7db2f..6cdcd6dc9 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -10,35 +10,35 @@ local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" fn_install_server_files(){ if [ "${gamename}" == "Battlefield: 1942" ]; then - remote_fileurl="http://files.gameservermanagers.com/BattleField1942/bf1942_lnxded-1.61-hacked-to-1.612.full.tar.bz2"; local_filedir="${tmpdir}"; local_filedir="bf1942_lnxded-1.61-hacked-to-1.612.full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="a86a5d3cd64ca59abcc9bb9f777c2e5d" + remote_fileurl="http://files.gameservermanagers.com/BattleField1942/bf1942_lnxded-1.61-hacked-to-1.612.full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="bf1942_lnxded-1.61-hacked-to-1.612.full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="a86a5d3cd64ca59abcc9bb9f777c2e5d" elif [ "${gamename}" == "Call of Duty" ]; then - remote_fileurl="http://files.gameservermanagers.com/CallOfDuty/cod-lnxded-1.5b-full.tar.bz2"; local_filedir="${tmpdir}"; local_filedir="cod-lnxded-1.5-large.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="19629895a4cf6fd8f6d1ee198b5304cd" + remote_fileurl="http://files.gameservermanagers.com/CallOfDuty/cod-lnxded-1.5b-full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="cod-lnxded-1.5-large.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="19629895a4cf6fd8f6d1ee198b5304cd" elif [ "${gamename}" == "Call of Duty: United Offensive" ]; then - remote_fileurl="http://files.gameservermanagers.com/CallOfDutyUnitedOffensive/coduo-lnxded-1.51b-full.tar.bz2"; local_filedir="${tmpdir}"; local_filedir="coduo-lnxded-1.51b-full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="f1804ef13036e2b4ab535db000b19e97" + remote_fileurl="http://files.gameservermanagers.com/CallOfDutyUnitedOffensive/coduo-lnxded-1.51b-full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="coduo-lnxded-1.51b-full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="f1804ef13036e2b4ab535db000b19e97" elif [ "${gamename}" == "Call of Duty 2" ]; then - remote_fileurl="http://files.gameservermanagers.com/CallOfDuty2/cod2-lnxded-1.3-full.tar.bz2"; local_filedir="${tmpdir}"; local_filedir="cod2-lnxded-1.3-full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="078128f83d06dc3d7699428dc2870214" + remote_fileurl="http://files.gameservermanagers.com/CallOfDuty2/cod2-lnxded-1.3-full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="cod2-lnxded-1.3-full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="078128f83d06dc3d7699428dc2870214" elif [ "${gamename}" == "Call of Duty 4" ]; then - remote_fileurl="http://files.gameservermanagers.com/CallOfDuty4/cod4x18_dedrun.tar.bz2"; local_filedir="${tmpdir}"; local_filedir="cod4x18_dedrun.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="bebdfc1755626462bdaad49f6f926c08" + remote_fileurl="http://files.gameservermanagers.com/CallOfDuty4/cod4x18_dedrun.tar.bz2"; local_filedir="${tmpdir}"; local_filename="cod4x18_dedrun.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="bebdfc1755626462bdaad49f6f926c08" elif [ "${gamename}" == "Call of Duty: World at War" ]; then - remote_fileurl="http://files.gameservermanagers.com/CallOfDutyWorldAtWar/codwaw-lnxded-1.7-full.tar.bz2"; local_filedir="${tmpdir}"; local_filedir="codwaw-lnxded-1.7-full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="0489697ff3bf678c109bfb377d1b7895" + remote_fileurl="http://files.gameservermanagers.com/CallOfDutyWorldAtWar/codwaw-lnxded-1.7-full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="codwaw-lnxded-1.7-full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="0489697ff3bf678c109bfb377d1b7895" elif [ "${gamename}" == "GoldenEye: Source" ]; then - remote_fileurl="http://files.gameservermanagers.com/GoldenEyeSource/GoldenEye_Source_v5.0.1_full_server_linux.tar.bz2"; local_filedir="${tmpdir}"; local_filedir="GoldenEye_Source_v5.0.1_server_full_Linux.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="ea227a150300abe346e757380325f84c" + remote_fileurl="http://files.gameservermanagers.com/GoldenEyeSource/GoldenEye_Source_v5.0.1_full_server_linux.tar.bz2"; local_filedir="${tmpdir}"; local_filename="GoldenEye_Source_v5.0.1_server_full_Linux.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="ea227a150300abe346e757380325f84c" elif [ "${gamename}" == "Quake 2" ]; then - remote_fileurl="http://files.gameservermanagers.com/Quake2/quake2-3.20-glibc-i386-full-linux2.0.tar.bz2"; local_filedir="${tmpdir}"; local_filedir="quake2-3.20-glibc-i386-full-linux2.0.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="0b8c7e2d51f40b56b328c69e986e7c5f" + remote_fileurl="http://files.gameservermanagers.com/Quake2/quake2-3.20-glibc-i386-full-linux2.0.tar.bz2"; local_filedir="${tmpdir}"; local_filename="quake2-3.20-glibc-i386-full-linux2.0.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="0b8c7e2d51f40b56b328c69e986e7c5f" elif [ "${gamename}" == "Quake 3: Arena" ]; then - remote_fileurl="http://files.gameservermanagers.com/Quake3/quake3-1.32c-x86-full-linux.tar.bz2"; local_filedir="${tmpdir}"; local_filedir="quake3-1.32c-x86-full-linux.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="fd7258d827474f67663dda297bff4306" + remote_fileurl="http://files.gameservermanagers.com/Quake3/quake3-1.32c-x86-full-linux.tar.bz2"; local_filedir="${tmpdir}"; local_filename="quake3-1.32c-x86-full-linux.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="fd7258d827474f67663dda297bff4306" elif [ "${gamename}" == "QuakeWorld" ]; then - remote_fileurl="http://files.gameservermanagers.com/QuakeWorld/nquake.server.linux.083116.full.tar.bz2"; local_filedir="${tmpdir}"; local_filedir="nquake.server.linux.083116.full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="75a409cf08d808f075e4dacdc7b21b78" + remote_fileurl="http://files.gameservermanagers.com/QuakeWorld/nquake.server.linux.083116.full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="nquake.server.linux.083116.full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="75a409cf08d808f075e4dacdc7b21b78" elif [ "${gamename}" == "Unreal Tournament 2004" ]; then - remote_fileurl="http://files.gameservermanagers.com/UnrealTournament2004/ut2004-server-3339-ultimate-linux.tar.bz2"; local_filedir="${tmpdir}"; local_filedir="ut2004-server-3339-ultimate-linux.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="67c5e2cd9c2a4b04f163962ee41eff54" + remote_fileurl="http://files.gameservermanagers.com/UnrealTournament2004/ut2004-server-3339-ultimate-linux.tar.bz2"; local_filedir="${tmpdir}"; local_filename="ut2004-server-3339-ultimate-linux.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="67c5e2cd9c2a4b04f163962ee41eff54" elif [ "${gamename}" == "Unreal Tournament 99" ]; then - remote_fileurl="http://files.gameservermanagers.com/UnrealTournament99/ut99-server-451-ultimate-linux.tar.bz2"; local_filedir="${tmpdir}"; local_filedir="ut99-server-451-ultimate-linux.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="49cb24d0550ff6ddeaba6007045c6edd" + remote_fileurl="http://files.gameservermanagers.com/UnrealTournament99/ut99-server-451-ultimate-linux.tar.bz2"; local_filedir="${tmpdir}"; local_filename="ut99-server-451-ultimate-linux.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="49cb24d0550ff6ddeaba6007045c6edd" elif [ "${gamename}" == "Unreal Tournament" ]; then - remote_fileurl="https://s3.amazonaws.com/unrealtournament/UnrealTournament-Client-XAN-3395761-Linux.zip"; local_filedir="${tmpdir}"; local_filedir="UnrealTournament-Server-XAN-3395761-Linux.zip"; chmodx="noexecute" run="norun"; force="noforce"; md5="f04ad5b96865b19613303331ff4075eb" + remote_fileurl="https://s3.amazonaws.com/unrealtournament/UnrealTournament-Client-XAN-3395761-Linux.zip"; local_filedir="${tmpdir}"; local_filename="UnrealTournament-Server-XAN-3395761-Linux.zip"; chmodx="noexecute" run="norun"; force="noforce"; md5="f04ad5b96865b19613303331ff4075eb" elif [ "${gamename}" == "Unreal Tournament 3" ]; then - remote_fileurl="http://files.gameservermanagers.com/UnrealTournament3/UT3-linux-server-2.1.tar.bz2"; local_filedir="${tmpdir}"; local_filedir="UT3-linux-server-2.1.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="2527437b46f1b47f20228d27d72395a6" + remote_fileurl="http://files.gameservermanagers.com/UnrealTournament3/UT3-linux-server-2.1.tar.bz2"; local_filedir="${tmpdir}"; local_filename="UT3-linux-server-2.1.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="2527437b46f1b47f20228d27d72395a6" elif [ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then - remote_fileurl="http://files.gameservermanagers.com/WolfensteinEnemyTerritory/enemy-territory.260b.tar.bz2"; local_filedir="${tmpdir}"; local_filedir="enemy-territory.260b.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="f833f514bfcdd46b42c111f83350c5a7" + remote_fileurl="http://files.gameservermanagers.com/WolfensteinEnemyTerritory/enemy-territory.260b.tar.bz2"; local_filedir="${tmpdir}"; local_filename="enemy-territory.260b.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="f833f514bfcdd46b42c111f83350c5a7" fi fn_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" fn_dl_extract "${filedir}" "${filename}" "${serverfiles}" From 2becb1e700f0caa6c934e6d2da58f713ed1d7fa9 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 15 May 2017 00:13:47 +0100 Subject: [PATCH 116/216] corrected extract vars --- lgsm/functions/install_server_files.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index 6cdcd6dc9..84ca7264e 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -41,7 +41,7 @@ fn_install_server_files(){ remote_fileurl="http://files.gameservermanagers.com/WolfensteinEnemyTerritory/enemy-territory.260b.tar.bz2"; local_filedir="${tmpdir}"; local_filename="enemy-territory.260b.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="f833f514bfcdd46b42c111f83350c5a7" fi fn_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" - fn_dl_extract "${filedir}" "${filename}" "${serverfiles}" + fn_dl_extract "${local_filedir}" "${local_filename}" "${serverfiles}" } fn_install_server_files_steamcmd(){ From 6d5ea2090cf7d65f4485851fa0c2ba66c8f695c7 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 15 May 2017 15:36:04 +0100 Subject: [PATCH 117/216] renamed var to branch for continuity with steamCMD --- Factorio/fctrserver | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Factorio/fctrserver b/Factorio/fctrserver index d1d35192c..2c26f5754 100644 --- a/Factorio/fctrserver +++ b/Factorio/fctrserver @@ -49,7 +49,8 @@ channeltag="" ## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update updateonstart="off" -updatebranch="stable" +# Branch: stable or experimental +branch="stable" ## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup maxbackups="4" From a4cca5164945dd18582d37135b658ad27d185c2e Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 15 May 2017 15:37:12 +0100 Subject: [PATCH 118/216] Added branch to details --- lgsm/functions/command_details.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index 4ac96281f..5be6c9cc7 100644 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -110,6 +110,11 @@ fn_details_gameserver(){ echo -e "${blue}Server name:\t${default}${servername}" fi + # Branch + if [ -n "${branch}" ]; then + echo -e "${blue}Branch:\t${default}${branch}" + fi + # Server ip echo -e "${blue}Server IP:\t${default}${ip}:${port}" From 910024ec2c35ae472bb21a177b1fa3ba13e9f7c1 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 15 May 2017 17:08:59 +0100 Subject: [PATCH 119/216] Added info on available output and input in the console Servers like Rust done output anything in the console and dont allow input. This confuses many users. Added an if statement to display details about this. Other servers will also benefit from this. However I dont know which servers these messages apply to currently. --- lgsm/functions/command_console.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lgsm/functions/command_console.sh b/lgsm/functions/command_console.sh index 0a93a94fb..dd17de843 100644 --- a/lgsm/functions/command_console.sh +++ b/lgsm/functions/command_console.sh @@ -10,8 +10,15 @@ local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" check.sh fn_print_header +if [ "${gamename}" == "Rust" ]; then + fn_print_information_nl "${gamename} does not produce a verbose output to the console" +fi +if [ "${gamename}" == "Rust" ]; then + fn_print_information_nl "${gamename} does not allow server commands to be entered in to the console" +fi fn_print_information_nl "Press \"CTRL+b\" then \"d\" to exit console." fn_print_warning_nl "Do NOT press CTRL+c to exit." +echo " * https://github.com/GameServerManagers/LinuxGSM/wiki/Console" echo "" if ! fn_prompt_yn "Continue?" Y; then echo Exiting; return From a7e79a53500f581cba1a23b8922d3b25e28e5229 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 15 May 2017 19:27:26 +0100 Subject: [PATCH 120/216] renamed scriptlog to lgsmlog Since there are so many types of logs beign used now changing script to lgsm will clarify what you are working with --- .../config-lgsm/arkserver/_default.cfg | 8 ++--- .../config-lgsm/arma3server/_default.cfg | 9 ++--- .../config-lgsm/csgoserver/_default.cfg | 8 ++--- .../config-lgsm/sdtdserver/_default.cfg | 9 ++--- lgsm/functions/alert_email.sh | 14 ++++---- lgsm/functions/check_executable.sh | 2 +- lgsm/functions/check_logs.sh | 2 +- lgsm/functions/check_permissions.sh | 4 +-- lgsm/functions/check_root.sh | 2 +- lgsm/functions/check_steamcmd.sh | 4 +-- lgsm/functions/check_system_dir.sh | 2 +- lgsm/functions/command_backup.sh | 4 +-- lgsm/functions/command_start.sh | 18 +++++----- lgsm/functions/command_stop.sh | 8 ++--- lgsm/functions/command_validate.sh | 4 +-- lgsm/functions/core_dl.sh | 12 +++---- lgsm/functions/core_messages.sh | 36 +++++++++---------- lgsm/functions/fix_steamcmd.sh | 14 ++++---- lgsm/functions/install_logs.sh | 10 +++--- lgsm/functions/logs.sh | 36 ++++++++----------- lgsm/functions/update_steamcmd.sh | 6 ++-- linuxgsm.sh | 6 ++-- tests/tests_jc2server.sh | 8 ++--- tests/tests_ts3server.sh | 8 ++--- 24 files changed, 116 insertions(+), 118 deletions(-) diff --git a/lgsm/config-default/config-lgsm/arkserver/_default.cfg b/lgsm/config-default/config-lgsm/arkserver/_default.cfg index 4d4e4325e..3c9aa13e6 100644 --- a/lgsm/config-default/config-lgsm/arkserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/arkserver/_default.cfg @@ -79,12 +79,12 @@ backupdir="${lgsmdir}/backup" ## Logging Directories logdir="${logdir}" gamelogdir="${systemdir}/Saved/Logs" -scriptlogdir="${logdir}/script" +lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" ## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/config-default/config-lgsm/arma3server/_default.cfg b/lgsm/config-default/config-lgsm/arma3server/_default.cfg index bcc5c06bf..f6b32f513 100644 --- a/lgsm/config-default/config-lgsm/arma3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/arma3server/_default.cfg @@ -88,13 +88,14 @@ networkcfgfullpath="${servercfgdir}/${networkcfg}" backupdir="${lgsmdir}/backup" ## Logging Directories +logdir="${logdir}" #gamelogdir="" # No server logs available -scriptlogdir="${logdir}/script" +lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" ## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg index 7c36ed20f..9167c6bf9 100644 --- a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg @@ -102,12 +102,12 @@ backupdir="${lgsmdir}/backup" ## Logging Directories gamelogdir="${systemdir}/logs" -scriptlogdir="${logdir}/script" +lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" ## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg index 47f6b2157..6871a329f 100644 --- a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg @@ -77,14 +77,15 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories +logdir="${logdir}" gamelogdir="${logdir}/server" -scriptlogdir="${logdir}/script" +lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" gamelog="${gamelogdir}/${servicename}-game.log" -scriptlog="${scriptlogdir}/${servicename}-script.log" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" ## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/functions/alert_email.sh b/lgsm/functions/alert_email.sh index c15b6df30..b017e0b63 100644 --- a/lgsm/functions/alert_email.sh +++ b/lgsm/functions/alert_email.sh @@ -173,15 +173,15 @@ fn_alert_email_template_logs(){ echo -e "${servicename} Logs" echo -e "=================================" - if [ -n "${scriptlog}" ]; then + if [ -n "${lgsmlog}" ]; then echo -e "\nScript log\n===================" - if [ ! "$(ls -A ${scriptlogdir})" ]; then - echo "${scriptlogdir} (NO LOG FILES)" - elif [ ! -s "${scriptlog}" ]; then - echo "${scriptlog} (LOG FILE IS EMPTY)" + if [ ! "$(ls -A ${lgsmlogdir})" ]; then + echo "${lgsmlogdir} (NO LOG FILES)" + elif [ ! -s "${lgsmlog}" ]; then + echo "${lgsmlog} (LOG FILE IS EMPTY)" else - echo "${scriptlog}" - tail -25 "${scriptlog}" + echo "${lgsmlog}" + tail -25 "${lgsmlog}" fi echo "" fi diff --git a/lgsm/functions/check_executable.sh b/lgsm/functions/check_executable.sh index cc90b435d..46effd85a 100644 --- a/lgsm/functions/check_executable.sh +++ b/lgsm/functions/check_executable.sh @@ -10,7 +10,7 @@ local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" # Check if executable exists if [ ! -f "${executabledir}/${execname}" ]; then fn_script_log_warn "Executable was not found: ${executabledir}/${execname}" - if [ -d "${scriptlogdir}" ]; then + if [ -d "${lgsmlogdir}" ]; then fn_print_fail_nl "Executable was not found:" echo " * ${executabledir}/${execname}" fi diff --git a/lgsm/functions/check_logs.sh b/lgsm/functions/check_logs.sh index bc4f13bdf..c57d7ebbf 100644 --- a/lgsm/functions/check_logs.sh +++ b/lgsm/functions/check_logs.sh @@ -16,7 +16,7 @@ fn_check_logs(){ } # Create directories for the script and console logs -if [ ! -d "${scriptlogdir}" ]||[ ! -d "${consolelogdir}" ]&&[ "${gamename}" != "TeamSpeak 3" ]; then +if [ ! -d "${lgsmlogdir}" ]||[ ! -d "${consolelogdir}" ]&&[ "${gamename}" != "TeamSpeak 3" ]; then fn_check_logs fi diff --git a/lgsm/functions/check_permissions.sh b/lgsm/functions/check_permissions.sh index 61cd9d472..2fdbfefe6 100644 --- a/lgsm/functions/check_permissions.sh +++ b/lgsm/functions/check_permissions.sh @@ -40,7 +40,7 @@ fn_check_ownership(){ find "${serverfiles}" -not -user $(whoami) -printf "%u\t\t%g\t%p\n" fi - } | column -s $'\t' -t | tee -a "${scriptlog}" + } | column -s $'\t' -t | tee -a "${lgsmlog}" echo "" fn_print_information_nl "please see https://github.com/GameServerManagers/LinuxGSM/wiki/FAQ#-fail--starting-game-server-ownership-issues-found" fn_script_log "For more information, please see https://github.com/GameServerManagers/LinuxGSM/wiki/FAQ#-fail--starting-game-server-ownership-issues-found" @@ -62,7 +62,7 @@ fn_check_permissions(){ { echo -e "File\n" find "${functionsdir}" -type f -not -executable -printf "%p\n" - } | column -s $'\t' -t | tee -a "${scriptlog}" + } | column -s $'\t' -t | tee -a "${lgsmlog}" if [ "${monitorflag}" == 1 ]; then alert="permissions" alert.sh diff --git a/lgsm/functions/check_root.sh b/lgsm/functions/check_root.sh index a71c993d2..710f88cea 100644 --- a/lgsm/functions/check_root.sh +++ b/lgsm/functions/check_root.sh @@ -9,7 +9,7 @@ local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" if [ $(whoami) = "root" ]; then fn_print_fail_nl "Do NOT run this script as root!" - if [ -d "${scriptlogdir}" ]; then + if [ -d "${lgsmlogdir}" ]; then fn_script_log_fatal "${selfname} attempted to run as root." fi core_exit.sh diff --git a/lgsm/functions/check_steamcmd.sh b/lgsm/functions/check_steamcmd.sh index 9aab57f9f..dc4f66b8b 100644 --- a/lgsm/functions/check_steamcmd.sh +++ b/lgsm/functions/check_steamcmd.sh @@ -20,14 +20,14 @@ fn_check_steamcmd_user(){ if [ "${steamuser}" == "username" ]; then fn_print_fail_nl "Steam login not set. Update steamuser in ${selfname}" echo " * Change steamuser=\"username\" to a valid steam login." - if [ -d "${scriptlogdir}" ]; then + if [ -d "${lgsmlogdir}" ]; then fn_script_log_fatal "Steam login not set. Update steamuser in ${selfname}" fi core_exit.sh fi # Anonymous user is set if steamuser is missing if [ -z "${steamuser}" ]; then - if [ -d "${scriptlogdir}" ]; then + if [ -d "${lgsmlogdir}" ]; then fn_script_log_info "Using anonymous Steam login" fi steamuser="anonymous" diff --git a/lgsm/functions/check_system_dir.sh b/lgsm/functions/check_system_dir.sh index f10f09a9d..68acc3065 100644 --- a/lgsm/functions/check_system_dir.sh +++ b/lgsm/functions/check_system_dir.sh @@ -15,7 +15,7 @@ fi if [ ! -d "${checkdir}" ]; then fn_print_fail_nl "Cannot access ${checkdir}: No such directory" - if [ -d "${scriptlogdir}" ]; then + if [ -d "${lgsmlogdir}" ]; then fn_script_log_fatal "Cannot access ${checkdir}: No such directory." fi core_exit.sh diff --git a/lgsm/functions/command_backup.sh b/lgsm/functions/command_backup.sh index 2ef072b0a..7448308cf 100644 --- a/lgsm/functions/command_backup.sh +++ b/lgsm/functions/command_backup.sh @@ -18,7 +18,7 @@ fn_backup_trap(){ fn_print_canceled_eol_nl fn_script_log_info "Backup ${backupname}.tar.gz: CANCELED" sleep 1 - rm -f "${backupdir}/${backupname}.tar.gz" | tee -a "${scriptlog}" + rm -f "${backupdir}/${backupname}.tar.gz" | tee -a "${lgsmlog}" echo -ne "backup ${backupname}.tar.gz..." fn_print_removed_eol_nl fn_script_log_info "Backup ${backupname}.tar.gz: REMOVED" @@ -118,7 +118,7 @@ fn_backup_compression(){ if [ ${exitcode} -ne 0 ]; then fn_print_fail_eol fn_script_log_fatal "Backup in progress: FAIL" - echo "${tarcmd}" | tee -a "${scriptlog}" + echo "${tarcmd}" | tee -a "${lgsmlog}" fn_print_fail_nl "Starting backup" fn_script_log_fatal "Starting backup" else diff --git a/lgsm/functions/command_start.sh b/lgsm/functions/command_start.sh index e1db4ab5f..0c8d30395 100644 --- a/lgsm/functions/command_start.sh +++ b/lgsm/functions/command_start.sh @@ -31,8 +31,8 @@ fn_start_teamspeak3(){ fn_script_log_error "${servername} is already running" core_exit.sh fi - if [ -f "${scriptlog}" ]; then - mv "${scriptlog}" "${scriptlogdate}" + if [ -f "${lgsmlog}" ]; then + mv "${lgsmlog}" "${lgsmlogdate}" fi # Create lockfile date > "${rootdir}/${lockselfname}" @@ -79,7 +79,7 @@ fn_start_tmux(){ mv "${gamelog}" "${gamelogdate}" fi fi - mv "${scriptlog}" "${scriptlogdate}" + mv "${lgsmlog}" "${lgsmlogdate}" mv "${consolelog}" "${consolelogdate}" fi @@ -94,7 +94,7 @@ fn_start_tmux(){ # Create lockfile date > "${rootdir}/${lockselfname}" cd "${executabledir}" - tmux new-session -d -x "${sessionheight}" -y "${sessionwidth}" -s "${servicename}" "${executable} ${parms}" 2> "${scriptlogdir}/.${servicename}-tmux-error.tmp" + tmux new-session -d -x "${sessionheight}" -y "${sessionwidth}" -s "${servicename}" "${executable} ${parms}" 2> "${lgsmlogdir}/.${servicename}-tmux-error.tmp" # tmux pipe-pane not supported in tmux versions < 1.6 if [ "$(tmux -V|sed "s/tmux //"|sed -n '1 p'|tr -cd '[:digit:]')" -lt "16" ] 2>/dev/null; then # Tmux compiled from source will not return a number, therefore bypass this check and trash the error @@ -127,20 +127,20 @@ fn_start_tmux(){ fn_print_fail_nl "Unable to start ${servername}" fn_script_log_fatal "Unable to start ${servername}" sleep 1 - if [ -s "${scriptlogdir}/.${servicename}-tmux-error.tmp" ]; then + if [ -s "${lgsmlogdir}/.${servicename}-tmux-error.tmp" ]; then fn_print_fail_nl "Unable to start ${servername}: Tmux error:" fn_script_log_fatal "Unable to start ${servername}: Tmux error:" echo "" echo "Command" echo "=================================" - echo "tmux new-session -d -s \"${servicename}\" \"${executable} ${parms}\"" | tee -a "${scriptlog}" + echo "tmux new-session -d -s \"${servicename}\" \"${executable} ${parms}\"" | tee -a "${lgsmlog}" echo "" echo "Error" echo "=================================" - cat "${scriptlogdir}/.${servicename}-tmux-error.tmp" | tee -a "${scriptlog}" + cat "${lgsmlogdir}/.${servicename}-tmux-error.tmp" | tee -a "${lgsmlog}" # Detected error https://gameservermanagers.com/support - if [ $(grep -c "Operation not permitted" "${scriptlogdir}/.${servicename}-tmux-error.tmp") ]; then + if [ $(grep -c "Operation not permitted" "${lgsmlogdir}/.${servicename}-tmux-error.tmp") ]; then echo "" echo "Fix" echo "=================================" @@ -172,7 +172,7 @@ fn_start_tmux(){ fn_print_ok "${servername}" fn_script_log_pass "Started ${servername}" fi - rm "${scriptlogdir}/.${servicename}-tmux-error.tmp" + rm "${lgsmlogdir}/.${servicename}-tmux-error.tmp" echo -en "\n" } diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index 805cda4e3..071915aee 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -161,10 +161,10 @@ fn_stop_graceful_sdtd(){ fn_print_error_nl "Graceful: telnet: Unknown error" fn_script_log_error "Graceful: telnet: Unknown error" fi - echo -en "\n" | tee -a "${scriptlog}" - echo -en "Telnet output:" | tee -a "${scriptlog}" - echo -en "\n ${sdtd_telnet_shutdown}" | tee -a "${scriptlog}" - echo -en "\n\n" | tee -a "${scriptlog}" + echo -en "\n" | tee -a "${lgsmlog}" + echo -en "Telnet output:" | tee -a "${lgsmlog}" + echo -en "\n ${sdtd_telnet_shutdown}" | tee -a "${lgsmlog}" + echo -en "\n\n" | tee -a "${lgsmlog}" fi else fn_print_warn "Graceful: telnet: expect not installed: " diff --git a/lgsm/functions/command_validate.sh b/lgsm/functions/command_validate.sh index 15b35eacd..392eab2b7 100644 --- a/lgsm/functions/command_validate.sh +++ b/lgsm/functions/command_validate.sh @@ -27,9 +27,9 @@ fn_validation(){ fi if [ "${engine}" == "goldsource" ]; then - ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" ${branch} +app_update "${appid}" ${branch} validate +quit| tee -a "${scriptlog}" + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" ${branch} +app_update "${appid}" ${branch} validate +quit| tee -a "${lgsmlog}" else - ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" ${branch} validate +quit| tee -a "${scriptlog}" + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" ${branch} validate +quit| tee -a "${lgsmlog}" fi if [ $? != 0 ]; then fn_print_fail_nl "Validating files: SteamCMD" diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index 512aa22fe..7afe93d21 100644 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -69,7 +69,7 @@ fn_dl_extract(){ if [ ${exitcode} -ne 0 ]; then fn_print_fail_eol_nl fn_script_log_fatal "Extracting download: FAIL" - echo "${extractcmd}" | tee -a "${scriptlog}" + echo "${extractcmd}" | tee -a "${lgsmlog}" core_exit.sh else fn_print_ok_eol_nl @@ -84,7 +84,7 @@ fn_fetch_trap(){ fn_print_canceled_eol_nl fn_script_log_info "Downloading ${local_filename}...CANCELED" sleep 1 - rm -f "${local_filedir}/${local_filename}" | tee -a "${scriptlog}" + rm -f "${local_filedir}/${local_filename}" | tee -a "${lgsmlog}" echo -ne "downloading ${local_filename}..." fn_print_removed_eol_nl fn_script_log_info "Downloading ${local_filename}...REMOVED" @@ -120,15 +120,15 @@ fn_fetch_file(){ local exitcode=$? if [ ${exitcode} -ne 0 ]; then fn_print_fail_eol_nl - if [ -f "${scriptlog}" ]; then + if [ -f "${lgsmlog}" ]; then fn_script_log_fatal "Downloading ${local_filename}: FAIL" fi - echo -e "${remote_fileurl}" | tee -a "${scriptlog}" - echo "${curlcmd}" | tee -a "${scriptlog}" + echo -e "${remote_fileurl}" | tee -a "${lgsmlog}" + echo "${curlcmd}" | tee -a "${lgsmlog}" core_exit.sh else fn_print_ok_eol_nl - if [ -f "${scriptlog}" ]; then + if [ -f "${lgsmlog}" ]; then fn_script_log_pass "Downloading ${local_filename}: OK" fi fi diff --git a/lgsm/functions/core_messages.sh b/lgsm/functions/core_messages.sh index 2e1286d7e..f38139d12 100644 --- a/lgsm/functions/core_messages.sh +++ b/lgsm/functions/core_messages.sh @@ -27,22 +27,22 @@ fi ######################## ## Feb 28 14:56:58 ut99-server: Monitor: fn_script_log(){ - if [ -d "${scriptlogdir}" ]; then + if [ -d "${lgsmlogdir}" ]; then if [ -n "${commandname}" ]; then - echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: ${commandname}: ${1}" >> "${scriptlog}" + echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: ${commandname}: ${1}" >> "${lgsmlog}" else - echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: ${1}" >> "${scriptlog}" + echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: ${1}" >> "${lgsmlog}" fi fi } ## Feb 28 14:56:58 ut99-server: Monitor: PASS: fn_script_log_pass(){ - if [ -d "${scriptlogdir}" ]; then + if [ -d "${lgsmlogdir}" ]; then if [ -n "${commandname}" ]; then - echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: ${commandname}: PASS: ${1}" >> "${scriptlog}" + echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: ${commandname}: PASS: ${1}" >> "${lgsmlog}" else - echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: PASS: ${1}" >> "${scriptlog}" + echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: PASS: ${1}" >> "${lgsmlog}" fi fi exitcode=0 @@ -50,11 +50,11 @@ fn_script_log_pass(){ ## Feb 28 14:56:58 ut99-server: Monitor: FATAL: fn_script_log_fatal(){ - if [ -d "${scriptlogdir}" ]; then + if [ -d "${lgsmlogdir}" ]; then if [ -n "${commandname}" ]; then - echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: ${commandname}: FATAL: ${1}" >> "${scriptlog}" + echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: ${commandname}: FATAL: ${1}" >> "${lgsmlog}" else - echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: FATAL: ${1}" >> "${scriptlog}" + echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: FATAL: ${1}" >> "${lgsmlog}" fi fi exitcode=1 @@ -62,11 +62,11 @@ fn_script_log_fatal(){ ## Feb 28 14:56:58 ut99-server: Monitor: ERROR: fn_script_log_error(){ - if [ -d "${scriptlogdir}" ]; then + if [ -d "${lgsmlogdir}" ]; then if [ -n "${commandname}" ]; then - echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: ${commandname}: ERROR: ${1}" >> "${scriptlog}" + echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: ${commandname}: ERROR: ${1}" >> "${lgsmlog}" else - echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: ERROR: ${1}" >> "${scriptlog}" + echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: ERROR: ${1}" >> "${lgsmlog}" fi fi exitcode=2 @@ -74,11 +74,11 @@ fn_script_log_error(){ ## Feb 28 14:56:58 ut99-server: Monitor: WARN: fn_script_log_warn(){ - if [ -d "${scriptlogdir}" ]; then + if [ -d "${lgsmlogdir}" ]; then if [ -n "${commandname}" ]; then - echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: ${commandname}: WARN: ${1}" >> "${scriptlog}" + echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: ${commandname}: WARN: ${1}" >> "${lgsmlog}" else - echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: WARN: ${1}" >> "${scriptlog}" + echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: WARN: ${1}" >> "${lgsmlog}" fi fi exitcode=3 @@ -86,11 +86,11 @@ fn_script_log_warn(){ ## Feb 28 14:56:58 ut99-server: Monitor: INFO: fn_script_log_info(){ - if [ -d "${scriptlogdir}" ]; then + if [ -d "${lgsmlogdir}" ]; then if [ -n "${commandname}" ]; then - echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: ${commandname}: INFO: ${1}" >> "${scriptlog}" + echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: ${commandname}: INFO: ${1}" >> "${lgsmlog}" else - echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: INFO: ${1}" >> "${scriptlog}" + echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: INFO: ${1}" >> "${lgsmlog}" fi fi } diff --git a/lgsm/functions/fix_steamcmd.sh b/lgsm/functions/fix_steamcmd.sh index 693398739..e1380d9e3 100644 --- a/lgsm/functions/fix_steamcmd.sh +++ b/lgsm/functions/fix_steamcmd.sh @@ -12,8 +12,8 @@ local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" if [ ! -f "${HOME}/.steam/sdk32/steamclient.so" ]; then fixname="steamclient.so general" fn_fix_msg_start - mkdir -pv "${HOME}/.steam/sdk32" >> "${scriptlog}" - cp -v "${steamcmddir}/linux32/steamclient.so" "${HOME}/.steam/sdk32/steamclient.so" >> "${scriptlog}" + mkdir -pv "${HOME}/.steam/sdk32" >> "${lgsmlog}" + cp -v "${steamcmddir}/linux32/steamclient.so" "${HOME}/.steam/sdk32/steamclient.so" >> "${lgsmlog}" fn_fix_msg_end fi @@ -22,8 +22,8 @@ if [ "${gamename}" == "Serious Sam 3: BFE" ]; then if [ ! -f "${HOME}/.steam/bin32/libsteam.so" ]; then fixname="libsteam.so" fn_fix_msg_start - mkdir -pv "${HOME}/.steam/bin32" >> "${scriptlog}" - cp -v "${serverfiles}/Bin/libsteam.so" "${HOME}/.steam/bin32/libsteam.so" >> "${scriptlog}" + mkdir -pv "${HOME}/.steam/bin32" >> "${lgsmlog}" + cp -v "${serverfiles}/Bin/libsteam.so" "${HOME}/.steam/bin32/libsteam.so" >> "${lgsmlog}" fn_fix_msg_end fi elif [ "${gamename}" == "Hurtworld" ]; then @@ -31,13 +31,13 @@ elif [ "${gamename}" == "Hurtworld" ]; then if [ ! -f "${serverfiles}/Hurtworld_Data/Plugins/x86/steamclient.so" ]; then fixname="steamclient.so x86" fn_fix_msg_start - cp -v "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86/steamclient.so" >> "${scriptlog}" + cp -v "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86/steamclient.so" >> "${lgsmlog}" fn_fix_msg_end fi if [ ! -f "${serverfiles}/Hurtworld_Data/Plugins/x86_64/steamclient.so" ]; then fixname="steamclient.so x86_64" fn_fix_msg_start - cp -v "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86_64/steamclient.so" >> "${scriptlog}" + cp -v "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86_64/steamclient.so" >> "${lgsmlog}" fn_fix_msg_end fi elif [ "${gamename}" == "Tower Unite" ]; then @@ -45,7 +45,7 @@ elif [ "${gamename}" == "Tower Unite" ]; then if [ ! -f "${executabledir}/steamclient.so" ]; then fixname="steamclient.so" fn_fix_msg_start - cp -v "${serverfiles}/linux64/steamclient.so" "${executabledir}/steamclient.so" >> "${scriptlog}" + cp -v "${serverfiles}/linux64/steamclient.so" "${executabledir}/steamclient.so" >> "${lgsmlog}" fn_fix_msg_end fi fi diff --git a/lgsm/functions/install_logs.sh b/lgsm/functions/install_logs.sh index bcadafc36..12d7002c4 100644 --- a/lgsm/functions/install_logs.sh +++ b/lgsm/functions/install_logs.sh @@ -14,16 +14,18 @@ if [ "${checklogs}" != "1" ]; then echo "=================================" fi sleep 1 -# Create script and console log directories +# Create LinuxGSM logs mkdir -pv "${logdir}" -mkdir -pv "${scriptlogdir}" -touch "${scriptlog}" +mkdir -pv "${lgsmlogdir}" +touch "${lgsmlog}" + +# Create Console logs if [ -n "${consolelogdir}" ]; then mkdir -pv "${consolelogdir}" touch "${consolelog}" fi -# Create gamelogdir if variable exists but directory does not +# Create Game logs if [ -n "${gamelogdir}" ]&&[ ! -d "${gamelogdir}" ]; then mkdir -pv "${gamelogdir}" fi diff --git a/lgsm/functions/logs.sh b/lgsm/functions/logs.sh index 2fd0fc626..6e877140c 100644 --- a/lgsm/functions/logs.sh +++ b/lgsm/functions/logs.sh @@ -28,7 +28,7 @@ if [ "${status}" != "0" ] && [ "${function_selfname}" == "command_start.sh" ] && fi # Log manager will start the cleanup if it finds logs older than "${logdays}" -if [ $(find "${scriptlogdir}"/ -type f -mtime +"${logdays}"|wc -l) -ne "0" ]; then +if [ $(find "${lgsmlogdir}"/ -type f -mtime +"${logdays}"|wc -l) -ne "0" ]; then fn_print_dots "Starting" # Set common logs directories commonlogs="${systemdir}/logs" @@ -46,29 +46,29 @@ if [ $(find "${scriptlogdir}"/ -type f -mtime +"${logdays}"|wc -l) -ne "0" ]; th fn_script_log_info "Removing logs older than "${logdays}" days" # Logging logfiles to be removed according to "${logdays}", counting and removing them # Script logfiles - find "${scriptlogdir}"/ -type f -mtime +"${logdays}"| tee >> "${scriptlog}" - scriptcount=$(find "${scriptlogdir}"/ -type f -mtime +"${logdays}"|wc -l) - find "${scriptlogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \; + find "${lgsmlogdir}"/ -type f -mtime +"${logdays}"| tee >> "${lgsmlog}" + scriptcount=$(find "${lgsmlogdir}"/ -type f -mtime +"${logdays}"|wc -l) + find "${lgsmlogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \; # SRCDS and unreal logfiles if [ "${engine}" == "unreal2" ]||[ "${engine}" == "source" ]; then - find "${gamelogdir}"/ -type f -mtime +"${logdays}"| tee >> "${scriptlog}" + find "${gamelogdir}"/ -type f -mtime +"${logdays}"| tee >> "${lgsmlog}" gamecount=$(find "${gamelogdir}"/ -type f -mtime +"${logdays}"|wc -l) find "${gamelogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \; fi # Console logfiles if [ -n "${consolelog}" ]; then - find "${consolelogdir}"/ -type f -mtime +"${logdays}"| tee >> "${scriptlog}" + find "${consolelogdir}"/ -type f -mtime +"${logdays}"| tee >> "${lgsmlog}" consolecount=$(find "${consolelogdir}"/ -type f -mtime +"${logdays}"|wc -l) find "${consolelogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \; fi # Common logfiles - if [ -d ${commonlogs} ]; then - find "${commonlogs}"/ -type f -mtime +"${logdays}"| tee >> "${scriptlog}" + if [ -d "${commonlogs}" ]; then + find "${commonlogs}"/ -type f -mtime +"${logdays}"| tee >> "${lgsmlog}" smcount=$(find "${commonlogs}"/ -type f -mtime +"${logdays}"|wc -l) find "${commonlogs}"/ -mtime +"${logdays}" -type f -exec rm -f {} \; fi if [ -d ${commonsourcelogs} ]; then - find "${commonsourcelogs}"/* -type f -mtime +"${logdays}"| tee >> "${scriptlog}" + find "${commonsourcelogs}"/* -type f -mtime +"${logdays}"| tee >> "${lgsmlog}" smcount=$(find "${commonsourcelogs}"/* -type f -mtime +"${logdays}"|wc -l) find "${commonsourcelogs}"/* -mtime +"${logdays}" -type f -exec rm -f {} \; fi @@ -76,7 +76,7 @@ if [ $(find "${scriptlogdir}"/ -type f -mtime +"${logdays}"|wc -l) -ne "0" ]; th if [ "${engine}" == "source" ]; then # SourceMod logfiles if [ -d "${sourcemodlogdir}" ]; then - find "${sourcemodlogdir}"/ -type f -mtime +"${logdays}"| tee >> "${scriptlog}" + find "${sourcemodlogdir}"/ -type f -mtime +"${logdays}"| tee >> "${lgsmlog}" smcount=$(find "${sourcemodlogdir}"/ -type f -mtime +"${logdays}"|wc -l) find "${sourcemodlogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \; fi @@ -84,28 +84,22 @@ if [ $(find "${scriptlogdir}"/ -type f -mtime +"${logdays}"|wc -l) -ne "0" ]; th if [ "${gamename}" == "Garry's Mod" ]; then # ULX logfiles if [ -d "${ulxlogdir}" ]; then - find "${ulxlogdir}"/ -type f -mtime +"${logdays}"| tee >> "${scriptlog}" + find "${ulxlogdir}"/ -type f -mtime +"${logdays}"| tee >> "${lgsmlog}" ulxcount=$(find "${ulxlogdir}"/ -type f -mtime +"${logdays}"|wc -l) find "${ulxlogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \; fi # DarkRP logfiles if [ -d "${darkrplogdir}" ]; then - find "${darkrplogdir}"/ -type f -mtime +"${logdays}"| tee >> "${scriptlog}" + find "${darkrplogdir}"/ -type f -mtime +"${logdays}"| tee >> "${lgsmlog}" darkrpcount=$(find "${darkrplogdir}"/ -type f -mtime +"${logdays}"|wc -l) find "${darkrplogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \; fi fi fi - # Legacy support - if [ -d "${legacyserverlogdir}" ]; then - find "${legacyserverlogdir}"/ -type f -mtime +"${logdays}"| tee >> "${scriptlog}" - legacycount=$(find "${legacyserverlogdir}"/ -type f -mtime +"${logdays}"|wc -l) - find "${legacyserverlogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \; - fi # Count total amount of files removed - count=$((${scriptcount} + ${consolecount} + ${gamecount} + ${srcdscount} + ${smcount} + ${ulxcount} + ${darkrpcount} + ${legacycount})) + countlogs=$((${scriptcount} + ${consolecount} + ${gamecount} + ${srcdscount} + ${smcount} + ${ulxcount} + ${darkrpcount})) # Job done - fn_print_ok_nl "Removed ${count} log files" - fn_script_log "Removed ${count} log files" + fn_print_ok_nl "Removed ${countlogs} log files" + fn_script_log "Removed ${countlogs} log files" fi diff --git a/lgsm/functions/update_steamcmd.sh b/lgsm/functions/update_steamcmd.sh index d75be3b05..1b09f3295 100644 --- a/lgsm/functions/update_steamcmd.sh +++ b/lgsm/functions/update_steamcmd.sh @@ -27,11 +27,11 @@ fn_update_steamcmd_dl(){ cd "${steamcmddir}" if [ "${engine}" == "goldsource" ]; then - ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" ${branch} +quit | tee -a "${scriptlog}" + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" ${branch} +quit | tee -a "${lgsmlog}" else - ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" ${branch} +quit | tee -a "${scriptlog}" + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" ${branch} +quit | tee -a "${lgsmlog}" if [ "${gamename}" == "Classic Offensive" ]; then - ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid_co}" ${branch} +quit | tee -a "${scriptlog}" + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid_co}" ${branch} +quit | tee -a "${lgsmlog}" fi fi diff --git a/linuxgsm.sh b/linuxgsm.sh index 0f85c5070..01da46b56 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -81,9 +81,9 @@ fn_bootstrap_fetch_file(){ local exitcode=$? if [ ${exitcode} -ne 0 ]; then echo -e "\e[0;31mFAIL\e[0m\n" - if [ -f "${scriptlog}" ]; then - echo -e "${remote_fileurl}" | tee -a "${scriptlog}" - echo "${curlcmd}" | tee -a "${scriptlog}" + if [ -f "${lgsmlog}" ]; then + echo -e "${remote_fileurl}" | tee -a "${lgsmlog}" + echo "${curlcmd}" | tee -a "${lgsmlog}" fi exit 1 else diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index ce9323db7..f990a20ca 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -106,14 +106,14 @@ backupdir="${rootdir}/backups" ## Logging Directories #gamelogdir="" # No server logs available -scriptlogdir="${rootdir}/log/script" +lgsmlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" ## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" ######################## diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 4371e6b20..2da2fdb87 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -93,12 +93,12 @@ backupdir="${rootdir}/backups" ## Logging Directories gamelogdir="${serverfiles}/logs" -scriptlogdir="${rootdir}/log/script" -scriptlog="${scriptlogdir}/${servicename}-script.log" -emaillog="${scriptlogdir}/${servicename}-email.log" +lgsmlogdir="${rootdir}/log/script" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" ## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" ######################## ######## Script ######## From c9d9a42511f8aef6aa94054809f59abb5c11cdad Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 15 May 2017 20:27:08 +0100 Subject: [PATCH 121/216] Corrected logdir location --- lgsm/config-default/config-lgsm/arkserver/_default.cfg | 2 +- lgsm/config-default/config-lgsm/arma3server/_default.cfg | 2 +- lgsm/config-default/config-lgsm/sdtdserver/_default.cfg | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lgsm/config-default/config-lgsm/arkserver/_default.cfg b/lgsm/config-default/config-lgsm/arkserver/_default.cfg index 3c9aa13e6..b0ebe82c7 100644 --- a/lgsm/config-default/config-lgsm/arkserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/arkserver/_default.cfg @@ -77,7 +77,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${logdir}" +logdir="${rootdir}/log" gamelogdir="${systemdir}/Saved/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/arma3server/_default.cfg b/lgsm/config-default/config-lgsm/arma3server/_default.cfg index f6b32f513..6e6c9e80b 100644 --- a/lgsm/config-default/config-lgsm/arma3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/arma3server/_default.cfg @@ -88,7 +88,7 @@ networkcfgfullpath="${servercfgdir}/${networkcfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${logdir}" +logdir="${rootdir}/log" #gamelogdir="" # No server logs available lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg index 6871a329f..4e38b147b 100644 --- a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg @@ -77,7 +77,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${logdir}" +logdir="${rootdir}/log" gamelogdir="${logdir}/server" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" From aae6c321cc5bd296897f900fa626252507cfaf25 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 15 May 2017 21:21:28 +0100 Subject: [PATCH 122/216] new solution to prevent symlink from being created when not required If the gamelogdir is within the logdir then no symlink is created. --- lgsm/functions/install_logs.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/install_logs.sh b/lgsm/functions/install_logs.sh index 12d7002c4..054d19445 100644 --- a/lgsm/functions/install_logs.sh +++ b/lgsm/functions/install_logs.sh @@ -30,9 +30,12 @@ if [ -n "${gamelogdir}" ]&&[ ! -d "${gamelogdir}" ]; then mkdir -pv "${gamelogdir}" fi -# Symlink gamelogdir to lgsm logs if variable exists +# Symlink to gamelogdir +# unless gamelogdir is within logdir +# e.g serverfiles/log is not within log/: symlink created +# log/server is in log/: symlink not created if [ -n "${gamelogdir}" ]; then - if [ ! -h "${logdir}/server" ]; then + if [ "${gamelogdir:0:${#logdir}}" != "${logdir}" ];then ln -nfsv "${gamelogdir}" "${logdir}/server" fi fi From 94880d2e5630268c2ee3078907c304aaebebaeed Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 15 May 2017 21:28:28 +0100 Subject: [PATCH 123/216] added logdir --- lgsm/config-default/config-lgsm/csgoserver/_default.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg index 9167c6bf9..8859f933b 100644 --- a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg @@ -101,6 +101,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories +logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" From 2a4948071368b84ecc8cbe9208366cd81dff41b8 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 15 May 2017 21:28:36 +0100 Subject: [PATCH 124/216] changed -h to -L --- lgsm/functions/install_logs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/install_logs.sh b/lgsm/functions/install_logs.sh index 054d19445..2f3fb7379 100644 --- a/lgsm/functions/install_logs.sh +++ b/lgsm/functions/install_logs.sh @@ -42,7 +42,7 @@ fi # If server uses SteamCMD create a symbolic link to the Steam logs if [ -d "${rootdir}/Steam/logs" ]; then - if [ ! -h "${logdir}/steamcmd" ]; then + if [ ! -L "${logdir}/steamcmd" ]; then ln -nfsv "${rootdir}/Steam/logs" "${logdir}/steamcmd" fi fi From 28b5d3ff5a2cb912ccee122edf1aceccc7b0419e Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 15 May 2017 21:46:07 +0100 Subject: [PATCH 125/216] now correctly checks if gamelogdir is missing and needs installing --- lgsm/functions/check_logs.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/check_logs.sh b/lgsm/functions/check_logs.sh index c57d7ebbf..f82d7babd 100644 --- a/lgsm/functions/check_logs.sh +++ b/lgsm/functions/check_logs.sh @@ -20,7 +20,8 @@ if [ ! -d "${lgsmlogdir}" ]||[ ! -d "${consolelogdir}" ]&&[ "${gamename}" != "Te fn_check_logs fi -# Create gamelogdir if variable exist but dir does not exist -if [ -n "${gamelogdir}" ]&&[ ! -d "${gamelogdir}" ]; then +# Create gamelogdir +# If variable exists gamelogdir exists and log/server does not +if [ -n "${gamelogdir}" ]&&[ -d "${gamelogdir}" ]&&[ ! -d "${logdir}/server" ]; then fn_check_logs fi From e1d6adfa0e24871ee8bce2a07e1338e042441794 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 15 May 2017 22:03:01 +0100 Subject: [PATCH 126/216] added scriptlogdir to legacy vars --- lgsm/functions/core_legacy.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lgsm/functions/core_legacy.sh b/lgsm/functions/core_legacy.sh index e61a74817..28293c787 100644 --- a/lgsm/functions/core_legacy.sh +++ b/lgsm/functions/core_legacy.sh @@ -13,6 +13,10 @@ if [ -z "${logdir}" ]; then logdir="${rootdir}/log" fi +if [ -z "${lgsmlogdir}" ]; then + lgsmlogdir="${scriptlogdir}" +fi + if [ -z "${steamcmddir}" ]; then steamcmddir="${rootdir}/steamcmd" fi From a8811b39cdf134f21efc713a8f5d48b8fc828c25 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 15 May 2017 22:12:38 +0100 Subject: [PATCH 127/216] added scriptlog to legacy vars --- lgsm/functions/core_legacy.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lgsm/functions/core_legacy.sh b/lgsm/functions/core_legacy.sh index 28293c787..1f13cc72a 100644 --- a/lgsm/functions/core_legacy.sh +++ b/lgsm/functions/core_legacy.sh @@ -17,6 +17,14 @@ if [ -z "${lgsmlogdir}" ]; then lgsmlogdir="${scriptlogdir}" fi +if [ -z "${lgsmlog}" ]; then + lgsmlog="${scriptlog}" +fi + +if [ -z "${scriptlogdate}" ]; then + lgsmlogdate="${scriptlogdate}" +fi + if [ -z "${steamcmddir}" ]; then steamcmddir="${rootdir}/steamcmd" fi From eaf1f78842607421faca1eda1dc96eb6712b06da Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 15 May 2017 22:18:27 +0100 Subject: [PATCH 128/216] Added scriptlogdir to legacy vars --- lgsm/functions/core_legacy.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lgsm/functions/core_legacy.sh b/lgsm/functions/core_legacy.sh index 1f13cc72a..938aeb845 100644 --- a/lgsm/functions/core_legacy.sh +++ b/lgsm/functions/core_legacy.sh @@ -21,6 +21,10 @@ if [ -z "${lgsmlog}" ]; then lgsmlog="${scriptlog}" fi +if [ -z "${lgsmlogdir}" ]; then + lgsmlogdir="${scriptlogdir}" +fi + if [ -z "${scriptlogdate}" ]; then lgsmlogdate="${scriptlogdate}" fi From 96ece6a4de2a24aa547f500286146ac87415c52c Mon Sep 17 00:00:00 2001 From: Digital-Storm Date: Tue, 16 May 2017 19:57:28 -0400 Subject: [PATCH 129/216] renamed var to branch for continuity with steamCMD Renamed updatebranch variable to branch to coincide with the change to the fctrserver.sh variable change in commit 6d5ea2090cf7d65f4485851fa0c2ba66c8f695c7 --- lgsm/functions/update_factorio.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/update_factorio.sh b/lgsm/functions/update_factorio.sh index 5b9d64e8d..4ef1c4bfb 100644 --- a/lgsm/functions/update_factorio.sh +++ b/lgsm/functions/update_factorio.sh @@ -76,7 +76,7 @@ fn_update_factorio_arch(){ fn_update_factorio_availablebuild(){ # Gets latest build info. - availablebuild=$(curl -s https://www.factorio.com/download-headless/"${updatebranch}" | grep 'headless/linux64' | head -n 1 | grep -oP '(?<=get-download/).*?(?=/)') + availablebuild=$(curl -s https://www.factorio.com/download-headless/"${branch}" | grep 'headless/linux64' | head -n 1 | grep -oP '(?<=get-download/).*?(?=/)') sleep 1 # Checks if availablebuild variable has been set From babf94ef8ad9727b30f2ecfad6f15e83283c600c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 17 May 2017 22:39:15 +0100 Subject: [PATCH 130/216] created _default.cfg --- .../config-lgsm/arkserver/_default.cfg | 4 +- .../config-lgsm/arma3server/_default.cfg | 9 +- .../config-lgsm/bb2server/_default.cfg | 116 ++++++++++++ .../config-lgsm/bf1942server/_default.cfg | 172 ++++++++++++++++++ .../config-lgsm/bmdmserver/_default.cfg | 117 ++++++++++++ .../config-lgsm/boserver/_default.cfg | 109 +++++++++++ .../config-lgsm/bsserver/_default.cfg | 114 ++++++++++++ .../config-lgsm/ccserver/_default.cfg | 111 +++++++++++ .../config-lgsm/cod2server/_default.cfg | 98 ++++++++++ .../config-lgsm/cod4server/_default.cfg | 98 ++++++++++ .../config-lgsm/codserver/_default.cfg | 97 ++++++++++ .../config-lgsm/coduoserver/_default.cfg | 98 ++++++++++ .../config-lgsm/codwawserver/_default.cfg | 98 ++++++++++ .../config-lgsm/coserver/_default.cfg | 139 ++++++++++++++ .../config-lgsm/csserver/_default.cfg | 111 +++++++++++ 15 files changed, 1488 insertions(+), 3 deletions(-) create mode 100644 lgsm/config-default/config-lgsm/bb2server/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/bf1942server/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/bmdmserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/boserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/bsserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/ccserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/cod2server/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/cod4server/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/codserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/coduoserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/codwawserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/coserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/csserver/_default.cfg diff --git a/lgsm/config-default/config-lgsm/arkserver/_default.cfg b/lgsm/config-default/config-lgsm/arkserver/_default.cfg index b0ebe82c7..ec10b2529 100644 --- a/lgsm/config-default/config-lgsm/arkserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/arkserver/_default.cfg @@ -3,8 +3,8 @@ ################################## # DO NOT EDIT WILL BE OVERWRITTEN! # Copy settings from here and use them in either -# common.cfg - applys settings to every instance -# [instance].cfg - applys settings to specific instance +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance #### Server Settings #### diff --git a/lgsm/config-default/config-lgsm/arma3server/_default.cfg b/lgsm/config-default/config-lgsm/arma3server/_default.cfg index 6e6c9e80b..3bed76e5d 100644 --- a/lgsm/config-default/config-lgsm/arma3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/arma3server/_default.cfg @@ -1,3 +1,11 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + #### Server Settings #### ## SteamCMD Login | https://github.com/GameServerManagers/LinuxGSM/wiki/SteamCMD#steamcmd-login @@ -89,7 +97,6 @@ backupdir="${lgsmdir}/backup" ## Logging Directories logdir="${rootdir}/log" -#gamelogdir="" # No server logs available lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${servicename}-script.log" diff --git a/lgsm/config-default/config-lgsm/bb2server/_default.cfg b/lgsm/config-default/config-lgsm/bb2server/_default.cfg new file mode 100644 index 000000000..0dd6c3bdd --- /dev/null +++ b/lgsm/config-default/config-lgsm/bb2server/_default.cfg @@ -0,0 +1,116 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## 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" + +## 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 +fn_parms(){ +parms="-game brainbread2 -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -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" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="475370" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## Github Branch Select +# Allows for the use of different function files +# from a different repo and/or branch. +githubuser="GameServerManagers" +githubrepo="LinuxGSM" +githubbranch="master" + +## LinuxGSM Server Details +# Do not edit +gamename="BrainBread 2" +engine="source" + +## 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" +lgsmdir="${rootdir}/lgsm" +functionsdir="${lgsmdir}/functions" +libdir="${lgsmdir}/lib" +tmpdir="${lgsmdir}/tmp" +filesdir="${rootdir}/serverfiles" + +## Server Specific Directories +systemdir="${filesdir}/brainbread2" +executabledir="${filesdir}" +executable="./srcds_run" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}/cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/bf1942server/_default.cfg b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg new file mode 100644 index 000000000..7f97d2dfb --- /dev/null +++ b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg @@ -0,0 +1,172 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="+hostServer 1 +dedicated 1" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + + +#### Advanced Variables #### + +# Github Branch Select +# Allows for the use of different function files +# from a different repo and/or branch. +githubuser="GameServerManagers" +githubrepo="LinuxGSM" +githubbranch="master" + +## LinuxGSM Server Details +# Do not edit +gamename="Battlefield: 1942" +engine="refractor" + +## 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" +lgsmdir="${rootdir}/lgsm" +functionsdir="${lgsmdir}/functions" +libdir="${lgsmdir}/lib" +tmpdir="${lgsmdir}/tmp" +filesdir="${rootdir}/serverfiles" + +## Server Specific Directories +systemdir="${filesdir}" +executabledir="${systemdir}" +executable="./start.sh" +servercfg="serversettings.con" +servercfgdefault="serversettings.con" +servercfgdir="${systemdir}/mods/bf1942/settings" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${filesdir}/Logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +######################## +######## Script ######## +###### Do not edit ##### +######################## + +# Fetches core_dl for file downloads +fn_fetch_core_dl(){ +github_file_url_dir="lgsm/functions" +github_file_url_name="${functionfile}" +filedir="${functionsdir}" +filename="${github_file_url_name}" +githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" +# If the file is missing, then download +if [ ! -f "${filedir}/${filename}" ]; then + if [ ! -d "${filedir}" ]; then + mkdir -p "${filedir}" + fi + echo -e " fetching ${filename}...\c" + # Check curl exists and use available path + curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" + for curlcmd in ${curlpaths} + do + if [ -x "${curlcmd}" ]; then + break + fi + done + # If curl exists download file + if [ "$(basename ${curlcmd})" == "curl" ]; then + curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) + if [ $? -ne 0 ]; then + echo -e "\e[0;31mFAIL\e[0m\n" + echo "${curlfetch}" + echo -e "${githuburl}\n" + exit 1 + else + echo -e "\e[0;32mOK\e[0m" + fi + else + echo -e "\e[0;31mFAIL\e[0m\n" + echo "Curl is not installed!" + echo -e "" + exit 1 + fi + chmod +x "${filedir}/${filename}" +fi +source "${filedir}/${filename}" +} + +core_dl.sh(){ +# Functions are defined in core_functions.sh. +functionfile="${FUNCNAME}" +fn_fetch_core_dl +} + +core_functions.sh(){ +# Functions are defined in core_functions.sh. +functionfile="${FUNCNAME}" +fn_fetch_core_dl +} + +# Prevent from running this script as root. +if [ "$(whoami)" = "root" ]; then + if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then + echo "[ FAIL ] Do NOT run this script as root!" + exit 1 + else + core_functions.sh + check_root.sh + fi +fi + +core_dl.sh +core_functions.sh +getopt=$1 +core_getopt.sh diff --git a/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg new file mode 100644 index 000000000..1cc5aaff6 --- /dev/null +++ b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg @@ -0,0 +1,117 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## 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" + +## 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 +fn_parms(){ +parms="-game bms -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -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" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## Github Branch Select +# Allows for the use of different function files +# from a different repo and/or branch. +githubuser="GameServerManagers" +githubrepo="LinuxGSM" +githubbranch="master" + +## SteamCMD Settings +# Server appid +appid="346680" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Black Mesa: Deathmatch" +engine="source" + +## 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" +lgsmdir="${rootdir}/lgsm" +functionsdir="${lgsmdir}/functions" +libdir="${lgsmdir}/lib" +tmpdir="${lgsmdir}/tmp" +filesdir="${rootdir}/serverfiles" + +## Server Specific Directories +systemdir="${filesdir}/bms" +executabledir="${filesdir}" +executable="./srcds_run" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}/cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" + + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/config-default/config-lgsm/boserver/_default.cfg b/lgsm/config-default/config-lgsm/boserver/_default.cfg new file mode 100644 index 000000000..d55c4b30e --- /dev/null +++ b/lgsm/config-default/config-lgsm/boserver/_default.cfg @@ -0,0 +1,109 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Optional: Game Server Login Token +# GSLT can be used for running a public server. +# More info: https://gameservermanagers.com/gslt +gslt="" +ip="" +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms=" -batchmode -nographics -dedicated -configfile=${servercfgfullpath}" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## Github Branch Select +# Allows for the use of different function files +# from a different repo and/or branch. +githubuser="GameServerManagers" +githubrepo="LinuxGSM" +githubbranch="master" + +## SteamCMD Settings +# Server appid +appid="416880" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Ballistic Overkill" +engine="unity3d" + +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="bo-server" + +#### Directories #### +# Edit with care + +## Work Directories +rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" +selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" +lockselfname=".${servicename}.lock" +lgsmdir="${rootdir}/lgsm" +functionsdir="${lgsmdir}/functions" +libdir="${lgsmdir}/lib" +tmpdir="${lgsmdir}/tmp" +filesdir="${rootdir}/serverfiles" + +## Server Specific Directories +systemdir="${filesdir}" +executabledir="${filesdir}" +executable="./BODS.x86" +servercfg="${servicename}.txt" +servercfgdefault="config.txt" +servercfgdir="${systemdir}" +servercfgfullpath="${servercfgdir}/${servercfg}" + + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/config-default/config-lgsm/bsserver/_default.cfg b/lgsm/config-default/config-lgsm/bsserver/_default.cfg new file mode 100644 index 000000000..76ddbe299 --- /dev/null +++ b/lgsm/config-default/config-lgsm/bsserver/_default.cfg @@ -0,0 +1,114 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### 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 +defaultmap="duel_winter" +maxplayers="16" +port="27015" +sourcetvport="27020" +clientport="27005" +ip="0.0.0.0" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="-autoupdate -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -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" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="228780" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## Github Branch Select +# Allows for the use of different function files +# from a different repo and/or branch. +githubuser="GameServerManagers" +githubrepo="LinuxGSM" +githubbranch="master" + +## LinuxGSM Server Details +# Do not edit +gamename="Blade Symphony" +engine="source" + +## 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" +lgsmdir="${rootdir}/lgsm" +functionsdir="${lgsmdir}/functions" +libdir="${lgsmdir}/lib" +tmpdir="${lgsmdir}/tmp" +filesdir="${rootdir}/serverfiles" + +## Server Specific Directories +systemdir="${filesdir}/berimbau" +executabledir="${filesdir}" +executable="./srcds_run.sh" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}/cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.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" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/ccserver/_default.cfg b/lgsm/config-default/config-lgsm/ccserver/_default.cfg new file mode 100644 index 000000000..0e9835728 --- /dev/null +++ b/lgsm/config-default/config-lgsm/ccserver/_default.cfg @@ -0,0 +1,111 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## 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" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="-game cure -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -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" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="383410" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## Github Branch Select +# Allows for the use of different function files +# from a different repo and/or branch. +githubuser="GameServerManagers" +githubrepo="LinuxGSM" +githubbranch="master" + +## LinuxGSM Server Details +# Do not edit +gamename="Codename CURE" +engine="source" + +## 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" +lgsmdir="${rootdir}/lgsm" +functionsdir="${lgsmdir}/functions" +libdir="${lgsmdir}/lib" +tmpdir="${lgsmdir}/tmp" +filesdir="${rootdir}/serverfiles" + +## Server Specific Directories +systemdir="${filesdir}/cure" +executabledir="${filesdir}" +executable="./srcds_run" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}/cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/cod2server/_default.cfg b/lgsm/config-default/config-lgsm/cod2server/_default.cfg new file mode 100644 index 000000000..d9ced17cd --- /dev/null +++ b/lgsm/config-default/config-lgsm/cod2server/_default.cfg @@ -0,0 +1,98 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +defaultmap="mp_leningrad" +maxclients="20" +port="28960" +ip="0.0.0.0" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="+set sv_punkbuster 0 +set fs_basepath ${filesdir} +set dedicated 1 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxclients} +exec ${servercfg} +map ${defaultmap}" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### Advanced Variables #### + +## Github Branch Select +# Allows for the use of different function files +# from a different repo and/or branch. +githubuser="GameServerManagers" +githubrepo="LinuxGSM" +githubbranch="master" + +## LinuxGSM Server Details +# Do not edit +gamename="Call of Duty 2" +engine="iw2.0" + +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="cod2-server" + +#### Directories #### +# Edit with care + +## Work Directories +rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" +selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" +lockselfname=".${servicename}.lock" +lgsmdir="${rootdir}/lgsm" +functionsdir="${lgsmdir}/functions" +libdir="${lgsmdir}/lib" +tmpdir="${lgsmdir}/tmp" +filesdir="${rootdir}/serverfiles" + +## Server Specific Directories +systemdir="${filesdir}" +executabledir="${filesdir}" +executable="./cod2_lnxded" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}/main" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${filesdir}/Logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/cod4server/_default.cfg b/lgsm/config-default/config-lgsm/cod4server/_default.cfg new file mode 100644 index 000000000..8295442e1 --- /dev/null +++ b/lgsm/config-default/config-lgsm/cod4server/_default.cfg @@ -0,0 +1,98 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +defaultmap="mp_crossfire" +maxclients="32" +port="28960" +ip="0.0.0.0" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="+set sv_punkbuster 0 +set fs_basepath ${filesdir} +set dedicated 1 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxclients} +exec ${servercfg} +map ${defaultmap}" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### Advanced Variables #### + +## Github Branch Select +# Allows for the use of different function files +# from a different repo and/or branch. +githubuser="GameServerManagers" +githubrepo="LinuxGSM" +githubbranch="master" + +## LinuxGSM Server Details +# Do not edit +gamename="Call of Duty 4" +engine="iw3.0" + +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="cod4-server" + +#### Directories #### +# Edit with care + +## Work Directories +rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" +selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" +lockselfname=".${servicename}.lock" +lgsmdir="${rootdir}/lgsm" +functionsdir="${lgsmdir}/functions" +libdir="${lgsmdir}/lib" +tmpdir="${lgsmdir}/tmp" +filesdir="${rootdir}/serverfiles" + +## Server Specific Directories +systemdir="${filesdir}" +executabledir="${filesdir}" +executable="./cod4x18_dedrun" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}/main" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${filesdir}/Logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/codserver/_default.cfg b/lgsm/config-default/config-lgsm/codserver/_default.cfg new file mode 100644 index 000000000..68aa5f7c0 --- /dev/null +++ b/lgsm/config-default/config-lgsm/codserver/_default.cfg @@ -0,0 +1,97 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +defaultmap="mp_neuville" +maxclients="20" +port="28960" +ip="0.0.0.0" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="+set sv_punkbuster 0 +set fs_basepath ${filesdir} +set dedicated 1 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxclients} +exec ${servercfg} +map ${defaultmap}" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### Advanced Variables #### + +## Github Branch Select +# Allows for the use of different function files +# from a different repo and/or branch. +githubuser="GameServerManagers" +githubrepo="LinuxGSM" +githubbranch="master" + +## LinuxGSM Server Details +# Do not edit +gamename="Call of Duty" +engine="idtech3" + +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="cod-server" + +#### Directories #### +# Edit with care + +## Work Directories +rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" +selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" +lockselfname=".${servicename}.lock" +lgsmdir="${rootdir}/lgsm" +functionsdir="${lgsmdir}/functions" +libdir="${lgsmdir}/lib" +tmpdir="${lgsmdir}/tmp" +filesdir="${rootdir}/serverfiles" + +## Server Specific Directories +systemdir="${filesdir}" +executabledir="${filesdir}" +executable="./cod_lnxded" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}/main" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +gamelogdir="${filesdir}/Logs" +scriptlogdir="${rootdir}/log/script" +consolelogdir="${rootdir}/log/console" +scriptlog="${scriptlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${scriptlogdir}/${servicename}-email.log" + +## Logs Naming +scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg new file mode 100644 index 000000000..1d3627536 --- /dev/null +++ b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg @@ -0,0 +1,98 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +defaultmap="mp_cassino" +maxclients="20" +port="28960" +ip="0.0.0.0" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="+set sv_punkbuster 0 +set fs_basepath ${filesdir} +set dedicated 1 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxclients} +exec ${servercfg} +map ${defaultmap}" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### Advanced Variables #### + +## Github Branch Select +# Allows for the use of different function files +# from a different repo and/or branch. +githubuser="GameServerManagers" +githubrepo="LinuxGSM" +githubbranch="master" + +## LinuxGSM Server Details +# Do not edit +gamename="Call of Duty: United Offensive" +engine="idtech3" + +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="coduo-server" + +#### Directories #### +# Edit with care + +## Work Directories +rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" +selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" +lockselfname=".${servicename}.lock" +lgsmdir="${rootdir}/lgsm" +functionsdir="${lgsmdir}/functions" +libdir="${lgsmdir}/lib" +tmpdir="${lgsmdir}/tmp" +filesdir="${rootdir}/serverfiles" + +## Server Specific Directories +systemdir="${filesdir}" +executabledir="${filesdir}" +executable="./coduo_lnxded" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}/uo" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${filesdir}/Logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg new file mode 100644 index 000000000..5a097121c --- /dev/null +++ b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg @@ -0,0 +1,98 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +defaultmap="mp_castle" +maxclients="20" +port="28960" +ip="0.0.0.0" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="+set sv_punkbuster 0 +set fs_basepath ${filesdir} +set dedicated 1 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxclients} +exec ${servercfg} +map ${defaultmap}" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### Advanced Variables #### + +## Github Branch Select +# Allows for the use of different function files +# from a different repo and/or branch. +githubuser="GameServerManagers" +githubrepo="LinuxGSM" +githubbranch="master" + +## LinuxGSM Server Details +# Do not edit +gamename="Call of Duty: World at War" +engine="iw3.0" + +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="codwaw-server" + +#### Directories #### +# Edit with care + +## Work Directories +rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" +selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" +lockselfname=".${servicename}.lock" +lgsmdir="${rootdir}/lgsm" +functionsdir="${lgsmdir}/functions" +libdir="${lgsmdir}/lib" +tmpdir="${lgsmdir}/tmp" +filesdir="${rootdir}/serverfiles" + +## Server Specific Directories +systemdir="${filesdir}" +executabledir="${filesdir}" +executable="./codwaw_lnxded" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}/main" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${filesdir}/Logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/coserver/_default.cfg b/lgsm/config-default/config-lgsm/coserver/_default.cfg new file mode 100644 index 000000000..4d2eeb5ea --- /dev/null +++ b/lgsm/config-default/config-lgsm/coserver/_default.cfg @@ -0,0 +1,139 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +# https://developer.valvesoftware.com/wiki/Counter-Strike:_Global_Offensive_Dedicated_Servers#Starting_the_Server +# [Game Modes] gametype gamemode +# Arms Race 1 0 +# Classic Casual 0 0 +# Classic Competitive 0 1 +# Demolition 1 1 +# Deathmatch 1 2 +gametype="0" +gamemode="0" +defaultmap="de_mirage" +mapgroup="mg_active" +maxplayers="16" +tickrate="64" +port="27015" +sourcetvport="27020" +clientport="27005" +ip="0.0.0.0" + +## Required: Game Server Login Token +# GSLT is required for running a public server. +# More info: https://gameservermanagers.com/gslt +gslt="" + +## Optional: Workshop Parameters +# https://developer.valvesoftware.com/wiki/CSGO_Workshop_For_Server_Operators +# To get an authkey visit - http://steamcommunity.com/dev/apikey +# authkey="" +# ws_collection_id="" +# ws_start_map="" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="-game csco -usercon -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} -tickrate ${tickrate} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers_override ${maxplayers} +mapgroup ${mapgroup} +game_mode ${gamemode} +game_type ${gametype} +host_workshop_collection ${ws_collection_id} +workshop_start_map ${ws_start_map} -authkey ${authkey}" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="740" +appid_co="600380" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## SteamCMD Login | https://github.com/GameServerManagers/LinuxGSM/wiki/SteamCMD#steamcmd-login +steamuser="username" +steampass='password' + +## Github Branch Select +# Allows for the use of different function files +# from a different repo and/or branch. +githubuser="GameServerManagers" +githubrepo="LinuxGSM" +githubbranch="master" + +## LinuxGSM Server Details +# Do not edit +gamename="Classic Offensive" +engine="source" + +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="co-server" + +#### Directories #### +# Edit with care + +## Work Directories +rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" +selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" +lockselfname=".${servicename}.lock" +lgsmdir="${rootdir}/lgsm" +functionsdir="${lgsmdir}/functions" +libdir="${lgsmdir}/lib" +tmpdir="${lgsmdir}/tmp" +filesdir="${rootdir}/serverfiles" + +## Server Specific Directories +systemdir="${filesdir}/csco" +executabledir="${filesdir}" +executable="./srcds_run" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}/cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/csserver/_default.cfg b/lgsm/config-default/config-lgsm/csserver/_default.cfg new file mode 100644 index 000000000..d79a1a7cd --- /dev/null +++ b/lgsm/config-default/config-lgsm/csserver/_default.cfg @@ -0,0 +1,111 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## 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" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +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" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### Advanced Variables #### + +## 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" + +## LinuxGSM Server Details +# Do not edit +gamename="Counter-Strike 1.6" +engine="goldsource" + +## 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" +lgsmdir="${rootdir}/lgsm" +functionsdir="${lgsmdir}/functions" +libdir="${lgsmdir}/lib" +tmpdir="${lgsmdir}/tmp" +filesdir="${rootdir}/serverfiles" + +## Server Specific Directories +systemdir="${filesdir}/cstrike" +executabledir="${filesdir}" +executable="./hlds_run" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file From f7409b6206e12e53de1327b20ed43d8112cfd109 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 17 May 2017 22:49:08 +0100 Subject: [PATCH 131/216] Added if lgsmlog --- lgsm/functions/core_dl.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index 7afe93d21..13e9d8951 100644 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -69,7 +69,10 @@ fn_dl_extract(){ if [ ${exitcode} -ne 0 ]; then fn_print_fail_eol_nl fn_script_log_fatal "Extracting download: FAIL" - echo "${extractcmd}" | tee -a "${lgsmlog}" + if [ -f "${lgsmlog}" ]; then + echo "${extractcmd}" >> "${lgsmlog}" + fi + echo "${extractcmd}" core_exit.sh else fn_print_ok_eol_nl @@ -84,7 +87,7 @@ fn_fetch_trap(){ fn_print_canceled_eol_nl fn_script_log_info "Downloading ${local_filename}...CANCELED" sleep 1 - rm -f "${local_filedir}/${local_filename}" | tee -a "${lgsmlog}" + rm -f "${local_filedir}/${local_filename}" echo -ne "downloading ${local_filename}..." fn_print_removed_eol_nl fn_script_log_info "Downloading ${local_filename}...REMOVED" @@ -122,9 +125,11 @@ fn_fetch_file(){ fn_print_fail_eol_nl if [ -f "${lgsmlog}" ]; then fn_script_log_fatal "Downloading ${local_filename}: FAIL" + echo -e "${remote_fileurl}" >> "${lgsmlog}" + echo "${curlcmd}" >> "${lgsmlog}" fi - echo -e "${remote_fileurl}" | tee -a "${lgsmlog}" - echo "${curlcmd}" | tee -a "${lgsmlog}" + echo -e "${remote_fileurl}" + echo "${curlcmd}" core_exit.sh else fn_print_ok_eol_nl From 7448417599c277df985fe560d2470a02f182dc1e Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 17 May 2017 23:06:17 +0100 Subject: [PATCH 132/216] removed branch select in _default.cfg has to be set in linuxgsm.sh --- lgsm/config-default/config-lgsm/codserver/_default.cfg | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lgsm/config-default/config-lgsm/codserver/_default.cfg b/lgsm/config-default/config-lgsm/codserver/_default.cfg index 68aa5f7c0..0c913ed2b 100644 --- a/lgsm/config-default/config-lgsm/codserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codserver/_default.cfg @@ -44,13 +44,6 @@ logdays="7" #### Advanced Variables #### -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - ## LinuxGSM Server Details # Do not edit gamename="Call of Duty" From 8b4ae10dc7b67bc5e1a230a84a76812f6e9242e7 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 17 May 2017 23:25:02 +0100 Subject: [PATCH 133/216] Corrected logdirs --- lgsm/config-default/config-lgsm/codserver/_default.cfg | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lgsm/config-default/config-lgsm/codserver/_default.cfg b/lgsm/config-default/config-lgsm/codserver/_default.cfg index 0c913ed2b..dbc36f59a 100644 --- a/lgsm/config-default/config-lgsm/codserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codserver/_default.cfg @@ -78,12 +78,13 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${rootdir}/backups" ## Logging Directories +logdir="${rootdir}/log" gamelogdir="${filesdir}/Logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -scriptlog="${scriptlogdir}/${servicename}-script.log" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" -emaillog="${scriptlogdir}/${servicename}-email.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" ## Logs Naming scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" From fced24a75d60342a30c3e28b087ce85a9148dedb Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 17 May 2017 23:47:21 +0100 Subject: [PATCH 134/216] added error checking to log installing --- lgsm/functions/install_logs.sh | 60 +++++++++++++++++++++++++++++++--- 1 file changed, 55 insertions(+), 5 deletions(-) diff --git a/lgsm/functions/install_logs.sh b/lgsm/functions/install_logs.sh index 2f3fb7379..7efaee162 100644 --- a/lgsm/functions/install_logs.sh +++ b/lgsm/functions/install_logs.sh @@ -15,19 +15,55 @@ if [ "${checklogs}" != "1" ]; then fi sleep 1 # Create LinuxGSM logs -mkdir -pv "${logdir}" -mkdir -pv "${lgsmlogdir}" -touch "${lgsmlog}" +echo -ne "installing log dir: ${logdir}..." +mkdir -p "${logdir}" +if [ $? -ne 0 ]; then + fn_print_fail_eol_nl + core_exit.sh +else + fn_print_ok_eol_nl +fi +echo -ne "installing LinuxGSM log dir: ${lgsmlogdir}..." +mkdir -v "${lgsmlogdir}" +if [ $? -ne 0 ]; then + fn_print_fail_eol_nl + core_exit.sh +else + fn_print_ok_eol_nl +fi +echo -ne "creating LinuxGSM log: ${lgsmlog}..." +touch -v "${lgsmlog}" +if [ $? -ne 0 ]; then + fn_print_fail_eol_nl + core_exit.sh +else + fn_print_ok_eol_nl +fi # Create Console logs if [ -n "${consolelogdir}" ]; then - mkdir -pv "${consolelogdir}" + echo -ne "installing console log dir: ${consolelogdir}..." + mkdir -v "${consolelogdir}" + if [ $? -ne 0 ]; then + fn_print_fail_eol_nl + core_exit.sh + else + fn_print_ok_eol_nl + fi + echo -ne "creating console log:" touch "${consolelog}" fi # Create Game logs if [ -n "${gamelogdir}" ]&&[ ! -d "${gamelogdir}" ]; then - mkdir -pv "${gamelogdir}" + echo -ne "installing game log dir: ${gamelogdir}..." + mkdir -v "${gamelogdir}" + if [ $? -ne 0 ]; then + fn_print_fail_eol_nl + core_exit.sh + else + fn_print_ok_eol_nl + fi fi # Symlink to gamelogdir @@ -36,14 +72,28 @@ fi # log/server is in log/: symlink not created if [ -n "${gamelogdir}" ]; then if [ "${gamelogdir:0:${#logdir}}" != "${logdir}" ];then + echo -ne "creating symlink to game log dir: ${gamelogdir} > ${logdir}/server..." ln -nfsv "${gamelogdir}" "${logdir}/server" + if [ $? -ne 0 ]; then + fn_print_fail_eol_nl + core_exit.sh + else + fn_print_ok_eol_nl + fi fi fi # If server uses SteamCMD create a symbolic link to the Steam logs if [ -d "${rootdir}/Steam/logs" ]; then if [ ! -L "${logdir}/steamcmd" ]; then + echo -ne "creating symlink to steam log dir: ${rootdir}/Steam/logs > ${logdir}/steamcmd..." ln -nfsv "${rootdir}/Steam/logs" "${logdir}/steamcmd" + if [ $? -ne 0 ]; then + fn_print_fail_eol_nl + core_exit.sh + else + fn_print_ok_eol_nl + fi fi fi sleep 1 From ae6338f5edefbcc9f5f3ad97ed96b96ed524abe1 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 17 May 2017 23:47:49 +0100 Subject: [PATCH 135/216] removed -v option from touch --- lgsm/functions/install_logs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/install_logs.sh b/lgsm/functions/install_logs.sh index 7efaee162..0b17ad3bc 100644 --- a/lgsm/functions/install_logs.sh +++ b/lgsm/functions/install_logs.sh @@ -33,7 +33,7 @@ else fn_print_ok_eol_nl fi echo -ne "creating LinuxGSM log: ${lgsmlog}..." -touch -v "${lgsmlog}" +touch "${lgsmlog}" if [ $? -ne 0 ]; then fn_print_fail_eol_nl core_exit.sh From 921e5ebb0fe37554442a4e36f5b0df8c46e70355 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 17 May 2017 23:52:59 +0100 Subject: [PATCH 136/216] removed v option from mkdir --- lgsm/functions/install_logs.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lgsm/functions/install_logs.sh b/lgsm/functions/install_logs.sh index 0b17ad3bc..dfa25e8a4 100644 --- a/lgsm/functions/install_logs.sh +++ b/lgsm/functions/install_logs.sh @@ -25,7 +25,7 @@ else fi echo -ne "installing LinuxGSM log dir: ${lgsmlogdir}..." -mkdir -v "${lgsmlogdir}" +mkdir -p "${lgsmlogdir}" if [ $? -ne 0 ]; then fn_print_fail_eol_nl core_exit.sh @@ -43,7 +43,7 @@ fi # Create Console logs if [ -n "${consolelogdir}" ]; then echo -ne "installing console log dir: ${consolelogdir}..." - mkdir -v "${consolelogdir}" + mkdir -p "${consolelogdir}" if [ $? -ne 0 ]; then fn_print_fail_eol_nl core_exit.sh @@ -57,7 +57,7 @@ fi # Create Game logs if [ -n "${gamelogdir}" ]&&[ ! -d "${gamelogdir}" ]; then echo -ne "installing game log dir: ${gamelogdir}..." - mkdir -v "${gamelogdir}" + mkdir -p "${gamelogdir}" if [ $? -ne 0 ]; then fn_print_fail_eol_nl core_exit.sh From 2350a8b4c0cc66c5badadb6bb62a4817d295844e Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 18 May 2017 00:03:27 +0100 Subject: [PATCH 137/216] corrected some variables --- .../config-lgsm/bb2server/_default.cfg | 2 +- .../config-lgsm/bf1942server/_default.cfg | 2 +- .../config-lgsm/bmdmserver/_default.cfg | 2 +- .../config-lgsm/boserver/_default.cfg | 2 +- .../config-lgsm/bsserver/_default.cfg | 2 +- .../config-lgsm/ccserver/_default.cfg | 2 +- .../config-lgsm/cod2server/_default.cfg | 2 +- .../config-lgsm/cod4server/_default.cfg | 2 +- .../config-lgsm/codserver/_default.cfg | 17 ++--------------- .../config-lgsm/coduoserver/_default.cfg | 2 +- .../config-lgsm/codwawserver/_default.cfg | 2 +- .../config-lgsm/coserver/_default.cfg | 2 +- .../config-lgsm/csserver/_default.cfg | 2 +- 13 files changed, 14 insertions(+), 27 deletions(-) diff --git a/lgsm/config-default/config-lgsm/bb2server/_default.cfg b/lgsm/config-default/config-lgsm/bb2server/_default.cfg index 0dd6c3bdd..ca24739e7 100644 --- a/lgsm/config-default/config-lgsm/bb2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bb2server/_default.cfg @@ -112,5 +112,5 @@ consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${lgsmlogdir}/${servicename}-email.log" ## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +lgsmlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/bf1942server/_default.cfg b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg index 7f97d2dfb..a1fd9189c 100644 --- a/lgsm/config-default/config-lgsm/bf1942server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg @@ -92,7 +92,7 @@ consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${lgsmlogdir}/${servicename}-email.log" ## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +lgsmlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" ######################## diff --git a/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg index 1cc5aaff6..a54c2b910 100644 --- a/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg @@ -113,5 +113,5 @@ consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${lgsmlogdir}/${servicename}-email.log" ## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +lgsmlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/config-default/config-lgsm/boserver/_default.cfg b/lgsm/config-default/config-lgsm/boserver/_default.cfg index d55c4b30e..32251d5ee 100644 --- a/lgsm/config-default/config-lgsm/boserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/boserver/_default.cfg @@ -105,5 +105,5 @@ consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${lgsmlogdir}/${servicename}-email.log" ## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +lgsmlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/config-default/config-lgsm/bsserver/_default.cfg b/lgsm/config-default/config-lgsm/bsserver/_default.cfg index 76ddbe299..234b2dba0 100644 --- a/lgsm/config-default/config-lgsm/bsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bsserver/_default.cfg @@ -110,5 +110,5 @@ lgsmlog="${lgsmlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${lgsmlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +lgsmlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/ccserver/_default.cfg b/lgsm/config-default/config-lgsm/ccserver/_default.cfg index 0e9835728..994ee8d8d 100644 --- a/lgsm/config-default/config-lgsm/ccserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ccserver/_default.cfg @@ -107,5 +107,5 @@ consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${lgsmlogdir}/${servicename}-email.log" ## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +lgsmlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/cod2server/_default.cfg b/lgsm/config-default/config-lgsm/cod2server/_default.cfg index d9ced17cd..6fdaa8aaf 100644 --- a/lgsm/config-default/config-lgsm/cod2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cod2server/_default.cfg @@ -94,5 +94,5 @@ consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${lgsmlogdir}/${servicename}-email.log" ## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +lgsmlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/cod4server/_default.cfg b/lgsm/config-default/config-lgsm/cod4server/_default.cfg index 8295442e1..b992b08ed 100644 --- a/lgsm/config-default/config-lgsm/cod4server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cod4server/_default.cfg @@ -94,5 +94,5 @@ consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${lgsmlogdir}/${servicename}-email.log" ## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +lgsmlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/codserver/_default.cfg b/lgsm/config-default/config-lgsm/codserver/_default.cfg index dbc36f59a..5f6de5d88 100644 --- a/lgsm/config-default/config-lgsm/codserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codserver/_default.cfg @@ -42,29 +42,16 @@ stoponbackup="on" consolelogging="on" logdays="7" -#### Advanced Variables #### +#### LinuxGSM Advanced Settings #### ## LinuxGSM Server Details # Do not edit gamename="Call of Duty" engine="idtech3" -## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers -servicename="cod-server" - #### Directories #### # Edit with care -## Work Directories -rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" -selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -lockselfname=".${servicename}.lock" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - ## Server Specific Directories systemdir="${filesdir}" executabledir="${filesdir}" @@ -87,5 +74,5 @@ consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${lgsmlogdir}/${servicename}-email.log" ## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +lgsmlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg index 1d3627536..06e82f46a 100644 --- a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg @@ -94,5 +94,5 @@ consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${lgsmlogdir}/${servicename}-email.log" ## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +lgsmlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg index 5a097121c..dfef61085 100644 --- a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg @@ -94,5 +94,5 @@ consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${lgsmlogdir}/${servicename}-email.log" ## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +lgsmlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/coserver/_default.cfg b/lgsm/config-default/config-lgsm/coserver/_default.cfg index 4d2eeb5ea..b5d2b700a 100644 --- a/lgsm/config-default/config-lgsm/coserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/coserver/_default.cfg @@ -135,5 +135,5 @@ consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${lgsmlogdir}/${servicename}-email.log" ## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +lgsmlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/csserver/_default.cfg b/lgsm/config-default/config-lgsm/csserver/_default.cfg index d79a1a7cd..34d147e03 100644 --- a/lgsm/config-default/config-lgsm/csserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csserver/_default.cfg @@ -107,5 +107,5 @@ consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${lgsmlogdir}/${servicename}-email.log" ## Logs Naming -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +lgsmlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file From 26269a04a8a074d1577866e0c32eafafb999cf71 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 18 May 2017 00:08:20 +0100 Subject: [PATCH 138/216] added error check for touch consolelog --- lgsm/functions/install_logs.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lgsm/functions/install_logs.sh b/lgsm/functions/install_logs.sh index dfa25e8a4..f7591af22 100644 --- a/lgsm/functions/install_logs.sh +++ b/lgsm/functions/install_logs.sh @@ -50,8 +50,14 @@ if [ -n "${consolelogdir}" ]; then else fn_print_ok_eol_nl fi - echo -ne "creating console log:" + echo -ne "creating console log: ${consolelog}..." touch "${consolelog}" + if [ $? -ne 0 ]; then + fn_print_fail_eol_nl + core_exit.sh + else + fn_print_ok_eol_nl + fi fi # Create Game logs From 1db661be4bcd422cfec0b225cb9af437301e7e09 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 18 May 2017 00:11:08 +0100 Subject: [PATCH 139/216] renamed filesdir to serverfiles --- lgsm/config-default/config-lgsm/bb2server/_default.cfg | 6 +++--- .../config-lgsm/bf1942server/_default.cfg | 6 +++--- .../config-default/config-lgsm/bmdmserver/_default.cfg | 6 +++--- lgsm/config-default/config-lgsm/boserver/_default.cfg | 6 +++--- lgsm/config-default/config-lgsm/bsserver/_default.cfg | 6 +++--- lgsm/config-default/config-lgsm/ccserver/_default.cfg | 6 +++--- .../config-default/config-lgsm/cod2server/_default.cfg | 10 +++++----- .../config-default/config-lgsm/cod4server/_default.cfg | 10 +++++----- lgsm/config-default/config-lgsm/codserver/_default.cfg | 8 ++++---- .../config-lgsm/coduoserver/_default.cfg | 10 +++++----- .../config-lgsm/codwawserver/_default.cfg | 10 +++++----- lgsm/config-default/config-lgsm/coserver/_default.cfg | 6 +++--- lgsm/config-default/config-lgsm/csserver/_default.cfg | 6 +++--- lgsm/functions/command_dev_detect_deps.sh | 6 +++--- lgsm/functions/install_logs.sh | 8 ++++---- lgsm/functions/install_server_files.sh | 4 ++-- 16 files changed, 57 insertions(+), 57 deletions(-) diff --git a/lgsm/config-default/config-lgsm/bb2server/_default.cfg b/lgsm/config-default/config-lgsm/bb2server/_default.cfg index ca24739e7..5e31e6304 100644 --- a/lgsm/config-default/config-lgsm/bb2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bb2server/_default.cfg @@ -88,11 +88,11 @@ lgsmdir="${rootdir}/lgsm" functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" +serverfiles="${rootdir}/serverfiles" ## Server Specific Directories -systemdir="${filesdir}/brainbread2" -executabledir="${filesdir}" +systemdir="${serverfiles}/brainbread2" +executabledir="${serverfiles}" executable="./srcds_run" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" diff --git a/lgsm/config-default/config-lgsm/bf1942server/_default.cfg b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg index a1fd9189c..05ac58284 100644 --- a/lgsm/config-default/config-lgsm/bf1942server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg @@ -68,10 +68,10 @@ lgsmdir="${rootdir}/lgsm" functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" +serverfiles="${rootdir}/serverfiles" ## Server Specific Directories -systemdir="${filesdir}" +systemdir="${serverfiles}" executabledir="${systemdir}" executable="./start.sh" servercfg="serversettings.con" @@ -84,7 +84,7 @@ backupdir="${rootdir}/backups" ## Logging Directories logdir="${rootdir}/log" -gamelogdir="${filesdir}/Logs" +gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${servicename}-script.log" diff --git a/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg index a54c2b910..d4c669c82 100644 --- a/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg @@ -88,11 +88,11 @@ lgsmdir="${rootdir}/lgsm" functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" +serverfiles="${rootdir}/serverfiles" ## Server Specific Directories -systemdir="${filesdir}/bms" -executabledir="${filesdir}" +systemdir="${serverfiles}/bms" +executabledir="${serverfiles}" executable="./srcds_run" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" diff --git a/lgsm/config-default/config-lgsm/boserver/_default.cfg b/lgsm/config-default/config-lgsm/boserver/_default.cfg index 32251d5ee..267e71cbd 100644 --- a/lgsm/config-default/config-lgsm/boserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/boserver/_default.cfg @@ -80,11 +80,11 @@ lgsmdir="${rootdir}/lgsm" functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" +serverfiles="${rootdir}/serverfiles" ## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" +systemdir="${serverfiles}" +executabledir="${serverfiles}" executable="./BODS.x86" servercfg="${servicename}.txt" servercfgdefault="config.txt" diff --git a/lgsm/config-default/config-lgsm/bsserver/_default.cfg b/lgsm/config-default/config-lgsm/bsserver/_default.cfg index 234b2dba0..5f745f8ab 100644 --- a/lgsm/config-default/config-lgsm/bsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bsserver/_default.cfg @@ -87,11 +87,11 @@ lgsmdir="${rootdir}/lgsm" functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" +serverfiles="${rootdir}/serverfiles" ## Server Specific Directories -systemdir="${filesdir}/berimbau" -executabledir="${filesdir}" +systemdir="${serverfiles}/berimbau" +executabledir="${serverfiles}" executable="./srcds_run.sh" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" diff --git a/lgsm/config-default/config-lgsm/ccserver/_default.cfg b/lgsm/config-default/config-lgsm/ccserver/_default.cfg index 994ee8d8d..81dff0aa9 100644 --- a/lgsm/config-default/config-lgsm/ccserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ccserver/_default.cfg @@ -83,11 +83,11 @@ lgsmdir="${rootdir}/lgsm" functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" +serverfiles="${rootdir}/serverfiles" ## Server Specific Directories -systemdir="${filesdir}/cure" -executabledir="${filesdir}" +systemdir="${serverfiles}/cure" +executabledir="${serverfiles}" executable="./srcds_run" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" diff --git a/lgsm/config-default/config-lgsm/cod2server/_default.cfg b/lgsm/config-default/config-lgsm/cod2server/_default.cfg index 6fdaa8aaf..c3b731df1 100644 --- a/lgsm/config-default/config-lgsm/cod2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cod2server/_default.cfg @@ -16,7 +16,7 @@ ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters fn_parms(){ -parms="+set sv_punkbuster 0 +set fs_basepath ${filesdir} +set dedicated 1 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxclients} +exec ${servercfg} +map ${defaultmap}" +parms="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 1 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxclients} +exec ${servercfg} +map ${defaultmap}" } #### LinuxGSM Settings #### @@ -70,11 +70,11 @@ lgsmdir="${rootdir}/lgsm" functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" +serverfiles="${rootdir}/serverfiles" ## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" +systemdir="${serverfiles}" +executabledir="${serverfiles}" executable="./cod2_lnxded" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" @@ -86,7 +86,7 @@ backupdir="${rootdir}/backups" ## Logging Directories logdir="${rootdir}/log" -gamelogdir="${filesdir}/Logs" +gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${servicename}-script.log" diff --git a/lgsm/config-default/config-lgsm/cod4server/_default.cfg b/lgsm/config-default/config-lgsm/cod4server/_default.cfg index b992b08ed..a45271e22 100644 --- a/lgsm/config-default/config-lgsm/cod4server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cod4server/_default.cfg @@ -16,7 +16,7 @@ ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters fn_parms(){ -parms="+set sv_punkbuster 0 +set fs_basepath ${filesdir} +set dedicated 1 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxclients} +exec ${servercfg} +map ${defaultmap}" +parms="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 1 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxclients} +exec ${servercfg} +map ${defaultmap}" } #### LinuxGSM Settings #### @@ -70,11 +70,11 @@ lgsmdir="${rootdir}/lgsm" functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" +serverfiles="${rootdir}/serverfiles" ## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" +systemdir="${serverfiles}" +executabledir="${serverfiles}" executable="./cod4x18_dedrun" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" @@ -86,7 +86,7 @@ backupdir="${rootdir}/backups" ## Logging Directories logdir="${rootdir}/log" -gamelogdir="${filesdir}/Logs" +gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${servicename}-script.log" diff --git a/lgsm/config-default/config-lgsm/codserver/_default.cfg b/lgsm/config-default/config-lgsm/codserver/_default.cfg index 5f6de5d88..ddb47ef23 100644 --- a/lgsm/config-default/config-lgsm/codserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codserver/_default.cfg @@ -16,7 +16,7 @@ ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters fn_parms(){ -parms="+set sv_punkbuster 0 +set fs_basepath ${filesdir} +set dedicated 1 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxclients} +exec ${servercfg} +map ${defaultmap}" +parms="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 1 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxclients} +exec ${servercfg} +map ${defaultmap}" } #### LinuxGSM Settings #### @@ -53,8 +53,8 @@ engine="idtech3" # Edit with care ## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" +systemdir="${serverfiles}" +executabledir="${serverfiles}" executable="./cod_lnxded" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" @@ -66,7 +66,7 @@ backupdir="${rootdir}/backups" ## Logging Directories logdir="${rootdir}/log" -gamelogdir="${filesdir}/Logs" +gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${servicename}-script.log" diff --git a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg index 06e82f46a..3255a26f4 100644 --- a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg @@ -16,7 +16,7 @@ ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters fn_parms(){ -parms="+set sv_punkbuster 0 +set fs_basepath ${filesdir} +set dedicated 1 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxclients} +exec ${servercfg} +map ${defaultmap}" +parms="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 1 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxclients} +exec ${servercfg} +map ${defaultmap}" } #### LinuxGSM Settings #### @@ -70,11 +70,11 @@ lgsmdir="${rootdir}/lgsm" functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" +serverfiles="${rootdir}/serverfiles" ## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" +systemdir="${serverfiles}" +executabledir="${serverfiles}" executable="./coduo_lnxded" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" @@ -86,7 +86,7 @@ backupdir="${rootdir}/backups" ## Logging Directories logdir="${rootdir}/log" -gamelogdir="${filesdir}/Logs" +gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${servicename}-script.log" diff --git a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg index dfef61085..d55129dab 100644 --- a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg @@ -16,7 +16,7 @@ ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters fn_parms(){ -parms="+set sv_punkbuster 0 +set fs_basepath ${filesdir} +set dedicated 1 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxclients} +exec ${servercfg} +map ${defaultmap}" +parms="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 1 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxclients} +exec ${servercfg} +map ${defaultmap}" } #### LinuxGSM Settings #### @@ -70,11 +70,11 @@ lgsmdir="${rootdir}/lgsm" functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" +serverfiles="${rootdir}/serverfiles" ## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" +systemdir="${serverfiles}" +executabledir="${serverfiles}" executable="./codwaw_lnxded" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" @@ -86,7 +86,7 @@ backupdir="${rootdir}/backups" ## Logging Directories logdir="${rootdir}/log" -gamelogdir="${filesdir}/Logs" +gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${servicename}-script.log" diff --git a/lgsm/config-default/config-lgsm/coserver/_default.cfg b/lgsm/config-default/config-lgsm/coserver/_default.cfg index b5d2b700a..4ca937e3c 100644 --- a/lgsm/config-default/config-lgsm/coserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/coserver/_default.cfg @@ -111,11 +111,11 @@ lgsmdir="${rootdir}/lgsm" functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" +serverfiles="${rootdir}/serverfiles" ## Server Specific Directories -systemdir="${filesdir}/csco" -executabledir="${filesdir}" +systemdir="${serverfiles}/csco" +executabledir="${serverfiles}" executable="./srcds_run" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" diff --git a/lgsm/config-default/config-lgsm/csserver/_default.cfg b/lgsm/config-default/config-lgsm/csserver/_default.cfg index 34d147e03..ac42430a4 100644 --- a/lgsm/config-default/config-lgsm/csserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csserver/_default.cfg @@ -83,11 +83,11 @@ lgsmdir="${rootdir}/lgsm" functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" +serverfiles="${rootdir}/serverfiles" ## Server Specific Directories -systemdir="${filesdir}/cstrike" -executabledir="${filesdir}" +systemdir="${serverfiles}/cstrike" +executabledir="${serverfiles}" executable="./hlds_run" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" diff --git a/lgsm/functions/command_dev_detect_deps.sh b/lgsm/functions/command_dev_detect_deps.sh index 1ee46b238..5536f7bed 100644 --- a/lgsm/functions/command_dev_detect_deps.sh +++ b/lgsm/functions/command_dev_detect_deps.sh @@ -12,7 +12,7 @@ echo "=================================" echo "Dependencies Checker" echo "=================================" echo "Checking directory: " -echo "${filesdir}" +echo "${serverfiles}" if [ "$(command -v eu-readelf 2>/dev/null)" ]; then readelf=eu-readelf elif [ "$(command -v readelf 2>/dev/null)" ]; then @@ -20,8 +20,8 @@ elif [ "$(command -v readelf 2>/dev/null)" ]; then else echo "readelf/eu-readelf not installed" fi -files=$(find ${filesdir} | wc -l) -find "${filesdir}" -type f -print0 | +files=$(find ${serverfiles} | wc -l) +find "${serverfiles}" -type f -print0 | while IFS= read -r -d $'\0' line; do if [ "${readelf}" == "eu-readelf" ]; then ${readelf} -d "${line}" 2>/dev/null|grep NEEDED|awk '{ print $4 }'|sed 's/\[//g;s/\]//g' >> "${tmpdir}/.depdetect_readelf" diff --git a/lgsm/functions/install_logs.sh b/lgsm/functions/install_logs.sh index f7591af22..43e33d8d3 100644 --- a/lgsm/functions/install_logs.sh +++ b/lgsm/functions/install_logs.sh @@ -45,16 +45,16 @@ if [ -n "${consolelogdir}" ]; then echo -ne "installing console log dir: ${consolelogdir}..." mkdir -p "${consolelogdir}" if [ $? -ne 0 ]; then - fn_print_fail_eol_nl - core_exit.sh + fn_print_fail_eol_nl + core_exit.sh else fn_print_ok_eol_nl fi echo -ne "creating console log: ${consolelog}..." touch "${consolelog}" if [ $? -ne 0 ]; then - fn_print_fail_eol_nl - core_exit.sh + fn_print_fail_eol_nl + core_exit.sh else fn_print_ok_eol_nl fi diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index 84ca7264e..02692f9a2 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -85,7 +85,7 @@ fn_install_server_files_steamcmd(){ local exitcode=$? if [ "${gamename}" == "Classic Offensive" ]; then - ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid_co}" ${branch} +quit + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid_co}" ${branch} +quit local exitcode=$? fi fi @@ -98,7 +98,7 @@ fn_install_server_files_steamcmd(){ local exitcode=$? if [ "${gamename}" == "Classic Offensive" ]; then - ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid_co}" ${branch} -validate +quit + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid_co}" ${branch} -validate +quit local exitcode=$? fi fi From bdfc44e15cfbf98a04e45d2e8b831d15ae56f1c9 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 18 May 2017 00:14:04 +0100 Subject: [PATCH 140/216] removed v option from ln --- lgsm/functions/install_logs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/install_logs.sh b/lgsm/functions/install_logs.sh index 43e33d8d3..c8c12c454 100644 --- a/lgsm/functions/install_logs.sh +++ b/lgsm/functions/install_logs.sh @@ -79,7 +79,7 @@ fi if [ -n "${gamelogdir}" ]; then if [ "${gamelogdir:0:${#logdir}}" != "${logdir}" ];then echo -ne "creating symlink to game log dir: ${gamelogdir} > ${logdir}/server..." - ln -nfsv "${gamelogdir}" "${logdir}/server" + ln -nfs "${gamelogdir}" "${logdir}/server" if [ $? -ne 0 ]; then fn_print_fail_eol_nl core_exit.sh @@ -93,7 +93,7 @@ fi if [ -d "${rootdir}/Steam/logs" ]; then if [ ! -L "${logdir}/steamcmd" ]; then echo -ne "creating symlink to steam log dir: ${rootdir}/Steam/logs > ${logdir}/steamcmd..." - ln -nfsv "${rootdir}/Steam/logs" "${logdir}/steamcmd" + ln -nfs "${rootdir}/Steam/logs" "${logdir}/steamcmd" if [ $? -ne 0 ]; then fn_print_fail_eol_nl core_exit.sh From f277f8b2825da89da51e9482926ed736669eb411 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 18 May 2017 00:22:06 +0100 Subject: [PATCH 141/216] corrected symlink message --- lgsm/functions/install_logs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/install_logs.sh b/lgsm/functions/install_logs.sh index c8c12c454..31528050c 100644 --- a/lgsm/functions/install_logs.sh +++ b/lgsm/functions/install_logs.sh @@ -78,7 +78,7 @@ fi # log/server is in log/: symlink not created if [ -n "${gamelogdir}" ]; then if [ "${gamelogdir:0:${#logdir}}" != "${logdir}" ];then - echo -ne "creating symlink to game log dir: ${gamelogdir} > ${logdir}/server..." + echo -ne "creating symlink to game log dir: ${logdir}/server -> ${gamelogdir}..." ln -nfs "${gamelogdir}" "${logdir}/server" if [ $? -ne 0 ]; then fn_print_fail_eol_nl @@ -92,7 +92,7 @@ fi # If server uses SteamCMD create a symbolic link to the Steam logs if [ -d "${rootdir}/Steam/logs" ]; then if [ ! -L "${logdir}/steamcmd" ]; then - echo -ne "creating symlink to steam log dir: ${rootdir}/Steam/logs > ${logdir}/steamcmd..." + echo -ne "creating symlink to steam log dir: ${logdir}/steamcmd -> ${rootdir}/Steam/logs..." ln -nfs "${rootdir}/Steam/logs" "${logdir}/steamcmd" if [ $? -ne 0 ]; then fn_print_fail_eol_nl From 6a4444662d6ccb7c8e66d677eda5f3759769ac65 Mon Sep 17 00:00:00 2001 From: Scarsz Date: Sun, 21 May 2017 09:14:29 -0700 Subject: [PATCH 142/216] Fix typo in lgsm/functions README --- lgsm/functions/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lgsm/functions/README.md b/lgsm/functions/README.md index f18a8a161..01de5f0c7 100644 --- a/lgsm/functions/README.md +++ b/lgsm/functions/README.md @@ -1,11 +1,11 @@ -

    Linux Game Server Manager - Functions

    +# Linux Game Server Manager - Functions These functions are universal functions that work in all scripts. -

    Function Names

    +## Function Names Functions have been named to give an idea of what the function does. -* core: Essential functions that are will always run first. +* core: Essential functions that will always run first. * command: Primary command function. * check: Runs checks that will either halt on or fix an issue. * dev: development functions. From 0bfbdbc01fe662114459fc7aa5a195d617b08e0c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 26 May 2017 21:30:46 +0100 Subject: [PATCH 143/216] Got rid of double returns --- CONTRIBUTING.md | 5 +---- lgsm/functions/alert_email.sh | 3 --- lgsm/functions/command_backup.sh | 1 - lgsm/functions/command_details.sh | 1 - lgsm/functions/command_dev_detect_deps.sh | 2 -- lgsm/functions/command_monitor.sh | 1 - lgsm/functions/command_postdetails.sh | 1 - lgsm/functions/command_ts3_server_pass.sh | 2 -- lgsm/functions/core_dl.sh | 2 -- lgsm/functions/core_functions.sh | 7 ------- lgsm/functions/core_getopt.sh | 1 - lgsm/functions/fix.sh | 1 - lgsm/functions/gsquery.py | 1 - lgsm/functions/info_distro.sh | 1 - lgsm/functions/mods_core.sh | 2 -- lgsm/functions/update_factorio.sh | 1 - lgsm/functions/update_minecraft.sh | 1 - lgsm/functions/update_mta.sh | 1 - lgsm/functions/update_mumble.sh | 1 - lgsm/functions/update_steamcmd.sh | 1 - lgsm/functions/update_ts3.sh | 1 - linuxgsm.sh | 1 - 22 files changed, 1 insertion(+), 37 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fbbbb0430..0da1e4963 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -36,7 +36,4 @@ This will help us in understanding your code and determining where problems may Start reading our code and you'll get the hang of it. Explore how functions are organized and you'll see how we strive for readable code. Please give the following document a read and adjust your code according to its specifications. -[Syntax & Coding Conventions](https://github.com/GameServerManagers/LinuxGSM/wiki/Syntax-&-Conventions) - - - +[Syntax & Coding Conventions](https://github.com/GameServerManagers/LinuxGSM/wiki/Syntax-&-Conventions) \ No newline at end of file diff --git a/lgsm/functions/alert_email.sh b/lgsm/functions/alert_email.sh index b017e0b63..ab6922d0f 100644 --- a/lgsm/functions/alert_email.sh +++ b/lgsm/functions/alert_email.sh @@ -16,7 +16,6 @@ fn_details_email(){ echo -e "${alertbody}" >> "${emaillog}" } - fn_details_os(){ # # Distro Details @@ -90,8 +89,6 @@ fn_details_disk(){ } | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"| tee -a "${emaillog}" > /dev/null 2>&1 } - - fn_details_gameserver(){ # # Quake Live Server Details diff --git a/lgsm/functions/command_backup.sh b/lgsm/functions/command_backup.sh index 7448308cf..b99215f4a 100644 --- a/lgsm/functions/command_backup.sh +++ b/lgsm/functions/command_backup.sh @@ -63,7 +63,6 @@ fn_backup_init(){ fi } - # Check if server is started and wether to stop it fn_backup_stop_server(){ check_status.sh diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index 5be6c9cc7..4fc5a7094 100644 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -380,7 +380,6 @@ fn_details_statusbottom(){ echo -e "" } - # Engine Specific details fn_details_ark(){ diff --git a/lgsm/functions/command_dev_detect_deps.sh b/lgsm/functions/command_dev_detect_deps.sh index 5536f7bed..e292264ba 100644 --- a/lgsm/functions/command_dev_detect_deps.sh +++ b/lgsm/functions/command_dev_detect_deps.sh @@ -73,10 +73,8 @@ while read lib; do unknownlib=1 echo "${lib}" >> "${tmpdir}/.depdetect_unknown" fi - done < "${tmpdir}/.depdetect_readelf_uniq" - sort "${tmpdir}/.depdetect_centos_list" | uniq >> "${tmpdir}/.depdetect_centos_list_uniq" sort "${tmpdir}/.depdetect_ubuntu_list" | uniq >> "${tmpdir}/.depdetect_ubuntu_list_uniq" sort "${tmpdir}/.depdetect_debian_list" | uniq >> "${tmpdir}/.depdetect_debian_list_uniq" diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index 0064ab439..cd12285cf 100644 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -105,7 +105,6 @@ check.sh logs.sh info_config.sh - fn_monitor_check_lockfile fn_monitor_check_update fn_monitor_msg_checking diff --git a/lgsm/functions/command_postdetails.sh b/lgsm/functions/command_postdetails.sh index e535e554c..414569381 100644 --- a/lgsm/functions/command_postdetails.sh +++ b/lgsm/functions/command_postdetails.sh @@ -107,7 +107,6 @@ if ! grep -q "^steamuser[= ]\"anonymous\"" "${tmpfile}" ; then sed -i -e 's/steamuser[= ]"[^"]*/steamuser "--stripped--/' "${tmpfile}" fi - if [ "${posttarget}" == "http://pastebin.com" ] ; then fn_print_dots "Posting details to pastbin.com for ${postexpire}" sleep 1 diff --git a/lgsm/functions/command_ts3_server_pass.sh b/lgsm/functions/command_ts3_server_pass.sh index 964b93211..2e40691dd 100644 --- a/lgsm/functions/command_ts3_server_pass.sh +++ b/lgsm/functions/command_ts3_server_pass.sh @@ -9,7 +9,6 @@ local commandname="TS3-CHANGE-PASS" local commandaction="ServerAdmin Password Change" local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" - fn_serveradmin_password_prompt(){ fn_print_header echo "Press \"CTRL+b d\" to exit console." @@ -23,7 +22,6 @@ fn_serveradmin_password_prompt(){ read -p "Enter new password : " newpassword } - fn_serveradmin_password_set(){ fn_print_info_nl "Starting server with new password..." fn_script_log_info "Starting server with new password" diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index 13e9d8951..46cab72b5 100644 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -154,7 +154,6 @@ fn_fetch_file(){ fi } - # GitHub file download functions # Used to simplify downloading specific files from GitHub @@ -236,7 +235,6 @@ fn_update_function(){ fn_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" } - # Defines curl path curl_paths_array=($(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl) for curlpath in "${curl_paths_array}" diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index b95ef9e66..31e8987e1 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -49,7 +49,6 @@ functionfile="${FUNCNAME}" fn_fetch_function } - # Commands command_console.sh(){ @@ -226,7 +225,6 @@ functionfile="${FUNCNAME}" fn_fetch_function } - # Compress compress_unreal2_maps.sh(){ @@ -273,7 +271,6 @@ functionfile="${FUNCNAME}" fn_fetch_function } - # Fix fix.sh(){ @@ -368,7 +365,6 @@ functionfile="${FUNCNAME}" fn_fetch_function } - # Alert alert.sh(){ @@ -393,7 +389,6 @@ functionfile="${FUNCNAME}" fn_fetch_function } - # Monitor monitor_gsquery.sh(){ @@ -401,7 +396,6 @@ functionfile="${FUNCNAME}" fn_fetch_function } - # Update command_update_functions.sh(){ @@ -454,7 +448,6 @@ functionfile="${FUNCNAME}" fn_fetch_function } - # ## Installer functions # diff --git a/lgsm/functions/core_getopt.sh b/lgsm/functions/core_getopt.sh index 391b47665..470a4fb69 100644 --- a/lgsm/functions/core_getopt.sh +++ b/lgsm/functions/core_getopt.sh @@ -71,7 +71,6 @@ fi #Backup currentopt+=( "${cmd_backup[@]}" ) - # Exclude games without a console if [ "${gamename}" != "TeamSpeak 3" ]; then currentopt+=( "${cmd_console[@]}" "${cmd_debug[@]}" ) diff --git a/lgsm/functions/fix.sh b/lgsm/functions/fix.sh index 250709cca..3f18a685b 100644 --- a/lgsm/functions/fix.sh +++ b/lgsm/functions/fix.sh @@ -36,7 +36,6 @@ fn_fix_msg_end(){ fi } - # Fixes that are run on start if [ "${function_selfname}" != "command_install.sh" ]; then if [ -n "${appid}" ]; then diff --git a/lgsm/functions/gsquery.py b/lgsm/functions/gsquery.py index 05d18f9fc..e1f5c3f77 100644 --- a/lgsm/functions/gsquery.py +++ b/lgsm/functions/gsquery.py @@ -76,7 +76,6 @@ class PythonGSQ: if not self.option.port: self.fatal_error('No port supplied.', 4) - if __name__ == '__main__': parser = optparse.OptionParser( usage='usage: python %prog [options]', diff --git a/lgsm/functions/info_distro.sh b/lgsm/functions/info_distro.sh index c8253f295..0c2c770a3 100644 --- a/lgsm/functions/info_distro.sh +++ b/lgsm/functions/info_distro.sh @@ -54,7 +54,6 @@ minutes=$(( uptime/60%60 )) hours=$(( uptime/60/60%24 )) days=$(( uptime/60/60/24 )) - ### Performance information ## Average server load diff --git a/lgsm/functions/mods_core.sh b/lgsm/functions/mods_core.sh index b5bf221fc..62d08ef1d 100644 --- a/lgsm/functions/mods_core.sh +++ b/lgsm/functions/mods_core.sh @@ -16,8 +16,6 @@ extractdir="${modstmpdir}/extract" modsinstalledlist="installed-mods.txt" modsinstalledlistfullpath="${modsdir}/${modsinstalledlist}" - - ## Installation # Download management diff --git a/lgsm/functions/update_factorio.sh b/lgsm/functions/update_factorio.sh index 3d0a73357..b39a4f86b 100644 --- a/lgsm/functions/update_factorio.sh +++ b/lgsm/functions/update_factorio.sh @@ -151,7 +151,6 @@ fn_update_factorio_compare(){ fi } - fn_update_factorio_arch if [ "${installer}" == "1" ]; then fn_update_factorio_availablebuild diff --git a/lgsm/functions/update_minecraft.sh b/lgsm/functions/update_minecraft.sh index b28700fef..00fa96a08 100644 --- a/lgsm/functions/update_minecraft.sh +++ b/lgsm/functions/update_minecraft.sh @@ -144,7 +144,6 @@ fn_update_compare(){ fi } - if [ "${installer}" == "1" ]; then fn_update_availablebuild fn_update_dl diff --git a/lgsm/functions/update_mta.sh b/lgsm/functions/update_mta.sh index 72aaf65ec..2afc94abd 100644 --- a/lgsm/functions/update_mta.sh +++ b/lgsm/functions/update_mta.sh @@ -139,7 +139,6 @@ fn_update_mta_compare(){ fi } - if [ "${installer}" == "1" ]; then fn_mta_get_availablebuild fn_update_mta_dl diff --git a/lgsm/functions/update_mumble.sh b/lgsm/functions/update_mumble.sh index b16ea69c4..9f2ee5629 100644 --- a/lgsm/functions/update_mumble.sh +++ b/lgsm/functions/update_mumble.sh @@ -151,7 +151,6 @@ fn_update_mumble_compare(){ fi } - fn_update_mumble_arch if [ "${installer}" == "1" ]; then fn_update_mumble_availablebuild diff --git a/lgsm/functions/update_steamcmd.sh b/lgsm/functions/update_steamcmd.sh index 1b09f3295..ff9cd8672 100644 --- a/lgsm/functions/update_steamcmd.sh +++ b/lgsm/functions/update_steamcmd.sh @@ -229,7 +229,6 @@ fn_update_steamcmd_check(){ fi } - if [ "${engine}" == "goldsource" ]||[ "${forceupdate}" == "1" ]; then # Goldsource servers bypass checks as fn_update_steamcmd_check does not work for appid 90 servers. # forceupdate bypasses checks diff --git a/lgsm/functions/update_ts3.sh b/lgsm/functions/update_ts3.sh index 982d7aecb..7ecd3d202 100644 --- a/lgsm/functions/update_ts3.sh +++ b/lgsm/functions/update_ts3.sh @@ -178,7 +178,6 @@ fn_update_ts3_compare(){ fi } - fn_update_ts3_arch if [ "${installer}" == "1" ]; then fn_update_ts3_availablebuild diff --git a/linuxgsm.sh b/linuxgsm.sh index 01da46b56..0d52bec24 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -34,7 +34,6 @@ configdir="${lgsmdir}/config-lgsm" configdirserver="${configdir}/${servername}" configdirdefault="${lgsmdir}/config-default" - ## GitHub Branch Select # Allows for the use of different function files # from a different repo and/or branch. From 21eed95f9f9718be288c7ec8c97c70b3fa51e287 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 26 May 2017 22:04:48 +0100 Subject: [PATCH 144/216] Uploading all configs Not fully tested yet --- .../config-lgsm/arkserver/_default.cfg | 4 +- .../config-lgsm/bb2server/_default.cfg | 25 +--- .../config-lgsm/bf1942server/_default.cfg | 98 +-------------- .../config-lgsm/bmdmserver/_default.cfg | 28 +---- .../config-lgsm/boserver/_default.cfg | 24 +--- .../config-lgsm/bsserver/_default.cfg | 26 +--- .../config-lgsm/ccserver/_default.cfg | 25 +--- .../config-lgsm/cod2server/_default.cfg | 28 +---- .../config-lgsm/cod4server/_default.cfg | 28 +---- .../config-lgsm/codserver/_default.cfg | 6 +- .../config-lgsm/coduoserver/_default.cfg | 30 +---- .../config-lgsm/codwawserver/_default.cfg | 28 +---- .../config-lgsm/coserver/_default.cfg | 37 ++---- .../config-lgsm/csczserver/_default.cfg | 94 ++++++++++++++ .../config-lgsm/csgoserver/_default.cfg | 26 ++-- .../config-lgsm/csserver/_default.cfg | 28 +---- .../config-lgsm/cssserver/_default.cfg | 96 ++++++++++++++ .../config-lgsm/dabserver/_default.cfg | 91 ++++++++++++++ .../config-lgsm/dmcserver/_default.cfg | 91 ++++++++++++++ .../config-lgsm/dodserver/_default.cfg | 91 ++++++++++++++ .../config-lgsm/dodsserver/_default.cfg | 91 ++++++++++++++ .../config-lgsm/doiserver/_default.cfg | 93 ++++++++++++++ .../config-lgsm/dstserver/_default.cfg | 101 +++++++++++++++ .../config-lgsm/emserver/_default.cfg | 96 ++++++++++++++ .../config-lgsm/fctrserver/_default.cfg | 80 ++++++++++++ .../config-lgsm/fofserver/_default.cfg | 91 ++++++++++++++ .../config-lgsm/gesserver/_default.cfg | 90 +++++++++++++ .../config-lgsm/gmodserver/_default.cfg | 107 ++++++++++++++++ .../config-lgsm/hl2dmserver/_default.cfg | 91 ++++++++++++++ .../config-lgsm/hldmserver/_default.cfg | 90 +++++++++++++ .../config-lgsm/hldmsserver/_default.cfg | 91 ++++++++++++++ .../config-lgsm/hwserver/_default.cfg | 114 +++++++++++++++++ .../config-lgsm/insserver/_default.cfg | 93 ++++++++++++++ .../config-lgsm/jc2server/_default.cfg | 83 ++++++++++++ .../config-lgsm/kfserver/_default.cfg | 96 ++++++++++++++ .../config-lgsm/l4d2server/_default.cfg | 90 +++++++++++++ .../config-lgsm/l4dserver/_default.cfg | 90 +++++++++++++ .../config-lgsm/mcserver/_default.cfg | 85 +++++++++++++ .../config-lgsm/mtaserver/_default.cfg | 80 ++++++++++++ .../config-lgsm/mumbleserver/_default.cfg | 75 +++++++++++ .../config-lgsm/nmrihserver/_default.cfg | 96 ++++++++++++++ .../config-lgsm/ns2cserver/_default.cfg | 101 +++++++++++++++ .../config-lgsm/ns2server/_default.cfg | 101 +++++++++++++++ .../config-lgsm/opforserver/_default.cfg | 91 ++++++++++++++ .../config-lgsm/pcserver/_default.cfg | 84 +++++++++++++ .../config-lgsm/pvkiiserver/_default.cfg | 91 ++++++++++++++ .../config-lgsm/pzserver/_default.cfg | 86 +++++++++++++ .../config-lgsm/q2server/_default.cfg | 77 ++++++++++++ .../config-lgsm/q3server/_default.cfg | 77 ++++++++++++ .../config-lgsm/qlserver/_default.cfg | 88 +++++++++++++ .../config-lgsm/qwserver/_default.cfg | 76 +++++++++++ .../config-lgsm/ricochetserver/_default.cfg | 110 ++++++++++++++++ .../config-lgsm/roserver/_default.cfg | 103 +++++++++++++++ .../config-lgsm/rustserver/_default.cfg | 119 ++++++++++++++++++ .../config-lgsm/sbserver/_default.cfg | 90 +++++++++++++ .../config-lgsm/sdtdserver/_default.cfg | 4 +- .../config-lgsm/ss3server/_default.cfg | 88 +++++++++++++ .../config-lgsm/svenserver/_default.cfg | 90 +++++++++++++ .../config-lgsm/terrariaserver/_default.cfg | 89 +++++++++++++ .../config-lgsm/tf2server/_default.cfg | 96 ++++++++++++++ .../config-lgsm/tfcserver/_default.cfg | 91 ++++++++++++++ .../config-lgsm/ts3server/_default.cfg | 68 ++++++++++ .../config-lgsm/tuserver/_default.cfg | 88 +++++++++++++ .../config-lgsm/twserver/_default.cfg | 90 +++++++++++++ .../config-lgsm/ut2k4server/_default.cfg | 78 ++++++++++++ .../config-lgsm/ut3server/_default.cfg | 89 +++++++++++++ .../config-lgsm/ut99server/_default.cfg | 77 ++++++++++++ .../config-lgsm/utserver/_default.cfg | 79 ++++++++++++ .../config-lgsm/wetserver/_default.cfg | 72 +++++++++++ tests/tests_jc2server.sh | 10 -- tests/tests_ts3server.sh | 10 -- 71 files changed, 4848 insertions(+), 392 deletions(-) create mode 100644 lgsm/config-default/config-lgsm/csczserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/cssserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/dabserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/dmcserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/dodserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/dodsserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/doiserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/dstserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/emserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/fctrserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/fofserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/gesserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/gmodserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/hldmserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/hldmsserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/hwserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/insserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/jc2server/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/kfserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/l4d2server/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/l4dserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/mcserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/mtaserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/mumbleserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/nmrihserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/ns2cserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/ns2server/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/opforserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/pcserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/pzserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/q2server/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/q3server/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/qlserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/qwserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/ricochetserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/roserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/rustserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/sbserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/ss3server/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/svenserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/terrariaserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/tf2server/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/tfcserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/ts3server/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/tuserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/twserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/ut2k4server/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/ut3server/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/ut99server/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/utserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/wetserver/_default.cfg diff --git a/lgsm/config-default/config-lgsm/arkserver/_default.cfg b/lgsm/config-default/config-lgsm/arkserver/_default.cfg index ec10b2529..b8cdf0c69 100644 --- a/lgsm/config-default/config-lgsm/arkserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/arkserver/_default.cfg @@ -9,11 +9,11 @@ #### Server Settings #### ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="0.0.0.0" port="7777" queryport="27015" rconport="27020" maxplayers="70" -ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters fn_parms(){ @@ -87,4 +87,4 @@ emaillog="${lgsmlogdir}/${servicename}-email.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/bb2server/_default.cfg b/lgsm/config-default/config-lgsm/bb2server/_default.cfg index 5e31e6304..148e261c9 100644 --- a/lgsm/config-default/config-lgsm/bb2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bb2server/_default.cfg @@ -9,12 +9,12 @@ #### Server Settings #### ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -defaultmap="bba_barracks" -maxplayers="20" +ip="0.0.0.0" port="27015" -sourcetvport="27020" clientport="27005" -ip="0.0.0.0" +sourcetvport="27020" +defaultmap="bba_barracks" +maxplayers="20" ## Optional: Game Server Login Token # GSLT can be used for running a public server. @@ -62,13 +62,6 @@ appid="475370" # Example: "-beta latest_experimental" branch="" -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - ## LinuxGSM Server Details # Do not edit gamename="BrainBread 2" @@ -80,16 +73,6 @@ 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -serverfiles="${rootdir}/serverfiles" - ## Server Specific Directories systemdir="${serverfiles}/brainbread2" executabledir="${serverfiles}" diff --git a/lgsm/config-default/config-lgsm/bf1942server/_default.cfg b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg index 05ac58284..1ed6d40e2 100644 --- a/lgsm/config-default/config-lgsm/bf1942server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg @@ -39,15 +39,7 @@ stoponbackup="on" consolelogging="on" logdays="7" - -#### Advanced Variables #### - -# Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" +#### LinuxGSM Advanced Settings #### ## LinuxGSM Server Details # Do not edit @@ -60,16 +52,6 @@ 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -serverfiles="${rootdir}/serverfiles" - ## Server Specific Directories systemdir="${serverfiles}" executabledir="${systemdir}" @@ -93,80 +75,4 @@ emaillog="${lgsmlogdir}/${servicename}-email.log" ## Logs Naming lgsmlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -######################## -######## Script ######## -###### Do not edit ##### -######################## - -# Fetches core_dl for file downloads -fn_fetch_core_dl(){ -github_file_url_dir="lgsm/functions" -github_file_url_name="${functionfile}" -filedir="${functionsdir}" -filename="${github_file_url_name}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" -# If the file is missing, then download -if [ ! -f "${filedir}/${filename}" ]; then - if [ ! -d "${filedir}" ]; then - mkdir -p "${filedir}" - fi - echo -e " fetching ${filename}...\c" - # Check curl exists and use available path - curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" - for curlcmd in ${curlpaths} - do - if [ -x "${curlcmd}" ]; then - break - fi - done - # If curl exists download file - if [ "$(basename ${curlcmd})" == "curl" ]; then - curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) - if [ $? -ne 0 ]; then - echo -e "\e[0;31mFAIL\e[0m\n" - echo "${curlfetch}" - echo -e "${githuburl}\n" - exit 1 - else - echo -e "\e[0;32mOK\e[0m" - fi - else - echo -e "\e[0;31mFAIL\e[0m\n" - echo "Curl is not installed!" - echo -e "" - exit 1 - fi - chmod +x "${filedir}/${filename}" -fi -source "${filedir}/${filename}" -} - -core_dl.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -core_functions.sh(){ -# Functions are defined in core_functions.sh. -functionfile="${FUNCNAME}" -fn_fetch_core_dl -} - -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi - -core_dl.sh -core_functions.sh -getopt=$1 -core_getopt.sh +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg index d4c669c82..8b0115281 100644 --- a/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg @@ -9,12 +9,12 @@ #### Server Settings #### ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -defaultmap="dm_bounce" -maxplayers="16" +ip="0.0.0.0" port="27015" -sourcetvport="27020" clientport="27005" -ip="0.0.0.0" +sourcetvport="27020" +defaultmap="dm_bounce" +maxplayers="16" ## Optional: Game Server Login Token # GSLT can be used for running a public server. @@ -54,13 +54,6 @@ logdays="7" #### LinuxGSM Advanced Settings #### -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - ## SteamCMD Settings # Server appid appid="346680" @@ -80,16 +73,6 @@ 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -serverfiles="${rootdir}/serverfiles" - ## Server Specific Directories systemdir="${serverfiles}/bms" executabledir="${serverfiles}" @@ -99,7 +82,6 @@ servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" - ## Backup Directory backupdir="${rootdir}/backups" @@ -114,4 +96,4 @@ emaillog="${lgsmlogdir}/${servicename}-email.log" ## Logs Naming lgsmlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/boserver/_default.cfg b/lgsm/config-default/config-lgsm/boserver/_default.cfg index 267e71cbd..d08358669 100644 --- a/lgsm/config-default/config-lgsm/boserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/boserver/_default.cfg @@ -13,6 +13,7 @@ # More info: https://gameservermanagers.com/gslt gslt="" ip="" + ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters fn_parms(){ parms=" -batchmode -nographics -dedicated -configfile=${servercfgfullpath}" @@ -46,13 +47,6 @@ logdays="7" #### LinuxGSM Advanced Settings #### -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - ## SteamCMD Settings # Server appid appid="416880" @@ -66,22 +60,9 @@ branch="" gamename="Ballistic Overkill" engine="unity3d" -## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers -servicename="bo-server" - #### Directories #### # Edit with care -## Work Directories -rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" -selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -lockselfname=".${servicename}.lock" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -serverfiles="${rootdir}/serverfiles" - ## Server Specific Directories systemdir="${serverfiles}" executabledir="${serverfiles}" @@ -91,7 +72,6 @@ servercfgdefault="config.txt" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" - ## Backup Directory backupdir="${rootdir}/backups" @@ -106,4 +86,4 @@ emaillog="${lgsmlogdir}/${servicename}-email.log" ## Logs Naming lgsmlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/bsserver/_default.cfg b/lgsm/config-default/config-lgsm/bsserver/_default.cfg index 5f745f8ab..0dc2fafd7 100644 --- a/lgsm/config-default/config-lgsm/bsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bsserver/_default.cfg @@ -13,12 +13,12 @@ steamuser="username" steampass='password' ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -defaultmap="duel_winter" -maxplayers="16" +ip="0.0.0.0" port="27015" -sourcetvport="27020" clientport="27005" -ip="0.0.0.0" +sourcetvport="27020" +defaultmap="duel_winter" +maxplayers="16" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters fn_parms(){ @@ -61,13 +61,6 @@ appid="228780" # Example: "-beta latest_experimental" branch="" -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - ## LinuxGSM Server Details # Do not edit gamename="Blade Symphony" @@ -79,16 +72,6 @@ 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -serverfiles="${rootdir}/serverfiles" - ## Server Specific Directories systemdir="${serverfiles}/berimbau" executabledir="${serverfiles}" @@ -110,5 +93,6 @@ lgsmlog="${lgsmlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${lgsmlogdir}/${servicename}-email.log" +## Logs Naming lgsmlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/ccserver/_default.cfg b/lgsm/config-default/config-lgsm/ccserver/_default.cfg index 81dff0aa9..8293759d4 100644 --- a/lgsm/config-default/config-lgsm/ccserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ccserver/_default.cfg @@ -9,12 +9,12 @@ #### Server Settings #### ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -defaultmap="cbe_bunker" -maxplayers="6" +ip="0.0.0.0" port="27015" -sourcetvport="27020" clientport="27005" -ip="0.0.0.0" +sourcetvport="27020" +defaultmap="cbe_bunker" +maxplayers="6" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters fn_parms(){ @@ -57,13 +57,6 @@ appid="383410" # Example: "-beta latest_experimental" branch="" -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - ## LinuxGSM Server Details # Do not edit gamename="Codename CURE" @@ -75,16 +68,6 @@ 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -serverfiles="${rootdir}/serverfiles" - ## Server Specific Directories systemdir="${serverfiles}/cure" executabledir="${serverfiles}" diff --git a/lgsm/config-default/config-lgsm/cod2server/_default.cfg b/lgsm/config-default/config-lgsm/cod2server/_default.cfg index c3b731df1..b9a083c06 100644 --- a/lgsm/config-default/config-lgsm/cod2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cod2server/_default.cfg @@ -9,10 +9,10 @@ #### Server Settings #### ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -defaultmap="mp_leningrad" -maxclients="20" -port="28960" ip="0.0.0.0" +port="28960" +defaultmap="mp_leningrad" +maxplayers="20" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters fn_parms(){ @@ -42,36 +42,16 @@ stoponbackup="on" consolelogging="on" logdays="7" -#### Advanced Variables #### - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" +#### LinuxGSM Advanced Settings #### ## LinuxGSM Server Details # Do not edit gamename="Call of Duty 2" engine="iw2.0" -## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers -servicename="cod2-server" - #### Directories #### # Edit with care -## Work Directories -rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" -selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -lockselfname=".${servicename}.lock" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -serverfiles="${rootdir}/serverfiles" - ## Server Specific Directories systemdir="${serverfiles}" executabledir="${serverfiles}" diff --git a/lgsm/config-default/config-lgsm/cod4server/_default.cfg b/lgsm/config-default/config-lgsm/cod4server/_default.cfg index a45271e22..7da88f5b0 100644 --- a/lgsm/config-default/config-lgsm/cod4server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cod4server/_default.cfg @@ -9,10 +9,10 @@ #### Server Settings #### ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -defaultmap="mp_crossfire" -maxclients="32" -port="28960" ip="0.0.0.0" +port="28960" +defaultmap="mp_crossfire" +maxplayers="32" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters fn_parms(){ @@ -42,36 +42,16 @@ stoponbackup="on" consolelogging="on" logdays="7" -#### Advanced Variables #### - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" +#### LinuxGSM Advanced Settings #### ## LinuxGSM Server Details # Do not edit gamename="Call of Duty 4" engine="iw3.0" -## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers -servicename="cod4-server" - #### Directories #### # Edit with care -## Work Directories -rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" -selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -lockselfname=".${servicename}.lock" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -serverfiles="${rootdir}/serverfiles" - ## Server Specific Directories systemdir="${serverfiles}" executabledir="${serverfiles}" diff --git a/lgsm/config-default/config-lgsm/codserver/_default.cfg b/lgsm/config-default/config-lgsm/codserver/_default.cfg index ddb47ef23..a816d6497 100644 --- a/lgsm/config-default/config-lgsm/codserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codserver/_default.cfg @@ -9,10 +9,10 @@ #### Server Settings #### ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -defaultmap="mp_neuville" -maxclients="20" -port="28960" ip="0.0.0.0" +port="28960" +defaultmap="mp_neuville" +maxplayers="20" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters fn_parms(){ diff --git a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg index 3255a26f4..2d2036114 100644 --- a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg @@ -9,14 +9,14 @@ #### Server Settings #### ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -defaultmap="mp_cassino" -maxclients="20" -port="28960" ip="0.0.0.0" +port="28960" +defaultmap="mp_cassino" +maxplayers="20" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters fn_parms(){ -parms="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 1 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxclients} +exec ${servercfg} +map ${defaultmap}" +parms="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 1 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxplayers} +exec ${servercfg} +map ${defaultmap}" } #### LinuxGSM Settings #### @@ -42,36 +42,16 @@ stoponbackup="on" consolelogging="on" logdays="7" -#### Advanced Variables #### - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" +#### LinuxGSM Advanced Settings #### ## LinuxGSM Server Details # Do not edit gamename="Call of Duty: United Offensive" engine="idtech3" -## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers -servicename="coduo-server" - #### Directories #### # Edit with care -## Work Directories -rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" -selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -lockselfname=".${servicename}.lock" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -serverfiles="${rootdir}/serverfiles" - ## Server Specific Directories systemdir="${serverfiles}" executabledir="${serverfiles}" diff --git a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg index d55129dab..d78b890e9 100644 --- a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg @@ -9,10 +9,10 @@ #### Server Settings #### ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -defaultmap="mp_castle" -maxclients="20" -port="28960" ip="0.0.0.0" +port="28960" +defaultmap="mp_castle" +maxplayers="20" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters fn_parms(){ @@ -42,36 +42,16 @@ stoponbackup="on" consolelogging="on" logdays="7" -#### Advanced Variables #### - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" +#### LinuxGSM Advanced Settings #### ## LinuxGSM Server Details # Do not edit gamename="Call of Duty: World at War" engine="iw3.0" -## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers -servicename="codwaw-server" - #### Directories #### # Edit with care -## Work Directories -rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" -selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -lockselfname=".${servicename}.lock" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -serverfiles="${rootdir}/serverfiles" - ## Server Specific Directories systemdir="${serverfiles}" executabledir="${serverfiles}" diff --git a/lgsm/config-default/config-lgsm/coserver/_default.cfg b/lgsm/config-default/config-lgsm/coserver/_default.cfg index 4ca937e3c..414f7683f 100644 --- a/lgsm/config-default/config-lgsm/coserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/coserver/_default.cfg @@ -10,22 +10,22 @@ ## 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 +# [Game Modes] gametype gamemode # Arms Race 1 0 -# Classic Casual 0 0 -# Classic Competitive 0 1 -# Demolition 1 1 -# Deathmatch 1 2 +# Classic Casual 0 0 +# Classic Competitive 0 1 +# Demolition 1 1 +# Deathmatch 1 2 gametype="0" gamemode="0" -defaultmap="de_mirage" mapgroup="mg_active" -maxplayers="16" -tickrate="64" +ip="0.0.0.0" port="27015" -sourcetvport="27020" clientport="27005" -ip="0.0.0.0" +sourcetvport="27020" +defaultmap="de_mirage" +maxplayers="16" +tickrate="64" ## Required: Game Server Login Token # GSLT is required for running a public server. @@ -85,13 +85,6 @@ branch="" steamuser="username" steampass='password' -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - ## LinuxGSM Server Details # Do not edit gamename="Classic Offensive" @@ -103,16 +96,6 @@ servicename="co-server" #### Directories #### # Edit with care -## Work Directories -rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" -selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -lockselfname=".${servicename}.lock" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -serverfiles="${rootdir}/serverfiles" - ## Server Specific Directories systemdir="${serverfiles}/csco" executabledir="${serverfiles}" diff --git a/lgsm/config-default/config-lgsm/csczserver/_default.cfg b/lgsm/config-default/config-lgsm/csczserver/_default.cfg new file mode 100644 index 000000000..b1a3ea20a --- /dev/null +++ b/lgsm/config-default/config-lgsm/csczserver/_default.cfg @@ -0,0 +1,94 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="0.0.0.0" +port="27015" +clientport="27005" +defaultmap="de_dust2" +maxplayers="16" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="-game czero -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" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="90" +appidmod="czero" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Counter-Strike: Condition Zero" +engine="goldsource" + +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="cscz-server" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}/czero" +executabledir="${filesdir}" +executable="./hlds_run" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg index 8859f933b..d9fdeb74c 100644 --- a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg @@ -3,29 +3,29 @@ ################################## # DO NOT EDIT WILL BE OVERWRITTEN! # Copy settings from here and use them in either -# common.cfg - applys settings to every instance -# [instance].cfg - applys settings to specific instance +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance #### Server Settings #### ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters # https://developer.valvesoftware.com/wiki/Counter-Strike:_Global_Offensive_Dedicated_Servers#Starting_the_Server -# [Game Modes] gametype gamemode -# Arms Race 1 0 -# Classic Casual 0 0 -# Classic Competitive 0 1 -# Demolition 1 1 -# Deathmatch 1 2 +# [Game Modes] gametype gamemode +# Arms Race 1 0 +# Classic Casual 0 0 +# Classic Competitive 0 1 +# Demolition 1 1 +# Deathmatch 1 2 gametype="0" gamemode="0" -defaultmap="de_mirage" mapgroup="mg_active" +ip="0.0.0.0" +port="27015" +clientport="27005" +sourcetvport="27020" +defaultmap="de_mirage" maxplayers="16" tickrate="64" -port="27015" -sourcetvport="27016" -clientport="27017" -ip="0.0.0.0" ## Required: Game Server Login Token # GSLT is required for running a public server. diff --git a/lgsm/config-default/config-lgsm/csserver/_default.cfg b/lgsm/config-default/config-lgsm/csserver/_default.cfg index ac42430a4..4b46221d8 100644 --- a/lgsm/config-default/config-lgsm/csserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csserver/_default.cfg @@ -9,11 +9,11 @@ #### Server Settings #### ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -defaultmap="de_dust2" -maxplayers="16" +ip="0.0.0.0" port="27015" clientport="27005" -ip="0.0.0.0" +defaultmap="de_dust2" +maxplayers="16" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters fn_parms(){ @@ -46,7 +46,7 @@ stoponbackup="on" consolelogging="on" logdays="7" -#### Advanced Variables #### +#### LinuxGSM Advanced Settings #### ## SteamCMD Settings # Server appid @@ -57,34 +57,14 @@ appidmod="cstrike" # Example: "-beta latest_experimental" branch="" -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - ## LinuxGSM Server Details # Do not edit gamename="Counter-Strike 1.6" engine="goldsource" -## 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -serverfiles="${rootdir}/serverfiles" - ## Server Specific Directories systemdir="${serverfiles}/cstrike" executabledir="${serverfiles}" diff --git a/lgsm/config-default/config-lgsm/cssserver/_default.cfg b/lgsm/config-default/config-lgsm/cssserver/_default.cfg new file mode 100644 index 000000000..4d898a416 --- /dev/null +++ b/lgsm/config-default/config-lgsm/cssserver/_default.cfg @@ -0,0 +1,96 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="0.0.0.0" +port="27015" +clientport="27005" +sourcetvport="27020" +defaultmap="de_dust2" +maxplayers="16" + +## Required: Game Server Login Token +# GSLT is required for running a public server. +# More info: https://gameservermanagers.com/gslt +gslt="" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="-game cstrike -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -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" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="232330" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Counter-Strike: Source" +engine="source" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}/cstrike" +executabledir="${filesdir}" +executable="./srcds_run" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}/cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/dabserver/_default.cfg b/lgsm/config-default/config-lgsm/dabserver/_default.cfg new file mode 100644 index 000000000..276b112f3 --- /dev/null +++ b/lgsm/config-default/config-lgsm/dabserver/_default.cfg @@ -0,0 +1,91 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="0.0.0.0" +port="27015" +clientport="27005" +sourcetvport="27020" +defaultmap="da_rooftops" +maxplayers="10" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="-strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -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" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="317800" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Double Action: Boogaloo" +engine="source" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}/dab" +executabledir="${filesdir}" +executable="./dabds.sh" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}/cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/dmcserver/_default.cfg b/lgsm/config-default/config-lgsm/dmcserver/_default.cfg new file mode 100644 index 000000000..2bf28c698 --- /dev/null +++ b/lgsm/config-default/config-lgsm/dmcserver/_default.cfg @@ -0,0 +1,91 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="0.0.0.0" +port="27015" +clientport="27005" +defaultmap="dcdm5" +maxplayers="16" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="-game dmc -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" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="90" +appidmod="dmc" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Deathmatch Classic" +engine="goldsource" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}/dmc" +executabledir="${filesdir}" +executable="./hlds_run" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/dodserver/_default.cfg b/lgsm/config-default/config-lgsm/dodserver/_default.cfg new file mode 100644 index 000000000..b943c41a3 --- /dev/null +++ b/lgsm/config-default/config-lgsm/dodserver/_default.cfg @@ -0,0 +1,91 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="0.0.0.0" +port="27015" +clientport="27005" +defaultmap="dod_Anzio" +maxplayers="16" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="-game dod -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" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="90" +appidmod="dod" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Day of Defeat" +engine="goldsource" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}/dod" +executabledir="${filesdir}" +executable="./hlds_run" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/dodsserver/_default.cfg b/lgsm/config-default/config-lgsm/dodsserver/_default.cfg new file mode 100644 index 000000000..f40ef5451 --- /dev/null +++ b/lgsm/config-default/config-lgsm/dodsserver/_default.cfg @@ -0,0 +1,91 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="0.0.0.0" +port="27015" +clientport="27005" +sourcetvport="27020" +defaultmap="dod_Anzio" +maxplayers="16" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="-game dod -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -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" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="232290" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Day of Defeat: Source" +engine="source" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}/dod" +executabledir="${filesdir}" +executable="./srcds_run" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}/cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/doiserver/_default.cfg b/lgsm/config-default/config-lgsm/doiserver/_default.cfg new file mode 100644 index 000000000..6652f72d9 --- /dev/null +++ b/lgsm/config-default/config-lgsm/doiserver/_default.cfg @@ -0,0 +1,93 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="0.0.0.0" +port="27015" +clientport="27005" +sourcetvport="27020" +defaultmap="bastogne" +maxplayers="16" +tickrate="64" +workshop="0" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +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}" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="462310" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Day of Infamy" +engine="source" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}/doi" +executabledir="${filesdir}" +executable="./srcds_run" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}/cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +scriptlogdir="${rootdir}/log/script" +consolelogdir="${rootdir}/log/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/dstserver/_default.cfg b/lgsm/config-default/config-lgsm/dstserver/_default.cfg new file mode 100644 index 000000000..204b9443a --- /dev/null +++ b/lgsm/config-default/config-lgsm/dstserver/_default.cfg @@ -0,0 +1,101 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Installation Variables | https://github.com/GameServerManagers/LinuxGSM/wiki/Don't-Starve-Together +sharding="false" +master="true" +shard="Master" +cluster="Cluster_1" +cave="false" + +# Edit with care +persistentstorageroot="${HOME}/.klei" +confdir="DoNotStarveTogether" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="-persistent_storage_root ${persistentstorageroot} -conf_dir ${confdir} -cluster ${cluster} -shard ${shard}" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="343050" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Don't Starve Together" +engine="dontstarve" + +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="dst-server-${shard}" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}" +executabledir="${filesdir}/bin" +executable="./dontstarve_dedicated_server_nullrenderer" +clustercfg="cluster.ini" +clustercfgdir="${persistentstorageroot}/${confdir}/${cluster}" +clustercfgfullpath="${clustercfgdir}/${clustercfg}" +clustercfgdefault="cluster.ini" +servercfg="server.ini" +servercfgdir="${clustercfgdir}/${shard}" +servercfgfullpath="${servercfgdir}/${servercfg}" +servercfgdefault="server.ini" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/emserver/_default.cfg b/lgsm/config-default/config-lgsm/emserver/_default.cfg new file mode 100644 index 000000000..4faa1aeb6 --- /dev/null +++ b/lgsm/config-default/config-lgsm/emserver/_default.cfg @@ -0,0 +1,96 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="0.0.0.0" +port="27015" +clientport="27005" +sourcetvport="27020" +defaultmap="emp_district" +maxplayers="62" + +## 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 +fn_parms(){ +parms="-game empires -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -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" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="460040" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Empires Mod" +engine="source" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}/empires" +executabledir="${filesdir}" +executable="./srcds_run" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}/cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/fctrserver/_default.cfg b/lgsm/config-default/config-lgsm/fctrserver/_default.cfg new file mode 100644 index 000000000..a7b0da679 --- /dev/null +++ b/lgsm/config-default/config-lgsm/fctrserver/_default.cfg @@ -0,0 +1,80 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="0.0.0.0" +port="34197" +rconport="34198" +rconpassword="CHANGE_ME" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="--start-server ${filesdir}/save1.zip --server-settings ${servercfgfullpath} --port ${port} --rcon-port ${rconport} --rcon-password ${rconpassword}" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## LinuxGSM Server Details +# Do not edit +gamename="Factorio" +engine="factorio" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}" +executabledir="${filesdir}/bin/x64" +executable="./factorio" +servercfg="${servicename}.json" +servercfgdefault="server-settings.json" +servercfgdir="${filesdir}/data" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +gamelogdir="${filesdir}" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/fofserver/_default.cfg b/lgsm/config-default/config-lgsm/fofserver/_default.cfg new file mode 100644 index 000000000..3d9b9f977 --- /dev/null +++ b/lgsm/config-default/config-lgsm/fofserver/_default.cfg @@ -0,0 +1,91 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="0.0.0.0" +port="27015" +clientport="27005" +sourcetvport="27020" +defaultmap="fof_depot" +maxplayers="16" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="-game fof -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -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" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="295230" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Fistful of Frags" +engine="source" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}/fof" +executabledir="${filesdir}" +executable="./srcds_run" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}/cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/config-default/config-lgsm/gesserver/_default.cfg b/lgsm/config-default/config-lgsm/gesserver/_default.cfg new file mode 100644 index 000000000..f469b6ab8 --- /dev/null +++ b/lgsm/config-default/config-lgsm/gesserver/_default.cfg @@ -0,0 +1,90 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="0.0.0.0" +port="27015" +clientport="27005" +sourcetvport="27020" +defaultmap="ge_archives" +maxplayers="16" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="-game gesource -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -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" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="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="" + +## LinuxGSM Server Details +# Do not edit +gamename="GoldenEye: Source" +engine="source" +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}/gesource" +executabledir="${filesdir}" +executable="./srcds_run" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}/cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/gmodserver/_default.cfg b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg new file mode 100644 index 000000000..2a57cf06f --- /dev/null +++ b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg @@ -0,0 +1,107 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="0.0.0.0" +port="27015" +clientport="27005" +sourcetvport="27020" +defaultmap="gm_construct" +maxplayers="16" +tickrate="66" +gamemode="sandbox" + +## Workshop Parameters | http://wiki.garrysmod.com/page/Workshop_for_Dedicated_Servers +workshopauth="" +workshopcollectionid="" + +## 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 +# 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 +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}" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="4020" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Garry's Mod" +engine="source" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}/garrysmod" +addonsdir="${systemdir}/addons" +executabledir="${filesdir}" +executable="./srcds_run" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}/cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg new file mode 100644 index 000000000..ec4ecd9e5 --- /dev/null +++ b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg @@ -0,0 +1,91 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="0.0.0.0" +port="27015" +clientport="27005" +sourcetvport="27020" +defaultmap="dm_lockdown" +maxplayers="16" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="-game hl2mp -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -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" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="232370" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Half Life 2: Deathmatch" +engine="source" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}/hl2mp" +executabledir="${filesdir}" +executable="./srcds_run" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}/cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/hldmserver/_default.cfg b/lgsm/config-default/config-lgsm/hldmserver/_default.cfg new file mode 100644 index 000000000..7f01e865d --- /dev/null +++ b/lgsm/config-default/config-lgsm/hldmserver/_default.cfg @@ -0,0 +1,90 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="0.0.0.0" +port="27015" +clientport="27005" +defaultmap="crossfire" +maxplayers="16" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="-game valve -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" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="90" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Half Life: Deathmatch" +engine="goldsource" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}/valve" +executabledir="${filesdir}" +executable="./hlds_run" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg b/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg new file mode 100644 index 000000000..ba4144d2c --- /dev/null +++ b/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg @@ -0,0 +1,91 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="0.0.0.0" +port="27015" +clientport="27005" +sourcetvport="27020" +defaultmap="crossfire" +maxplayers="16" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="-game hl1mp -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -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" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="255470" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Half-Life Deathmatch: Source" +engine="source" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}/hl1mp" +executabledir="${filesdir}" +executable="./srcds_run" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}/cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/hwserver/_default.cfg b/lgsm/config-default/config-lgsm/hwserver/_default.cfg new file mode 100644 index 000000000..8049ebde7 --- /dev/null +++ b/lgsm/config-default/config-lgsm/hwserver/_default.cfg @@ -0,0 +1,114 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +servername="Hurtworld LinuxGSM Server" +ip="0.0.0.0" +port="12871" +queryport="12881" +maxplayers="20" +map="" #Optional +creativemode="0" #Free Build: creativemode="1" +logfile="gamelog.txt" + +## Adding admins using STEAMID64 +# Example : addadmin 012345678901234567; addadmin 987654321098765432 +admins="" + +## Advanced Server Start Settings +# Rollback server state (remove after start command) +loadsave="" +# Use unstable 64 bit server executable (O/1) +x64mode="0" + +## 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}\" " +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="405100" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Hurtworld" +engine="unity3d" + +#### Directories #### +# Edit with care + +## Work Directories +rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" +selfname=$(basename $(readlink -f "${BASH_SOURCE[0]}")) +lockselfname=".${servicename}.lock" +lgsmdir="${rootdir}/lgsm" +functionsdir="${lgsmdir}/functions" +libdir="${lgsmdir}/lib" +tmpdir="${lgsmdir}/tmp" +filesdir="${rootdir}/serverfiles" + +## Server Specific Directories +systemdir="${filesdir}" +executabledir="${filesdir}" +if [ "${x64mode}" == "1" ]; then + executable="./Hurtworld.x86_64" +else + executable="./Hurtworld.x86" +fi + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +gamelogdir="${rootdir}/log/server" +scriptlogdir="${rootdir}/log/script" +consolelogdir="${rootdir}/log/console" +gamelog="${gamelogdir}/${servicename}-game.log" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/insserver/_default.cfg b/lgsm/config-default/config-lgsm/insserver/_default.cfg new file mode 100644 index 000000000..c8918645d --- /dev/null +++ b/lgsm/config-default/config-lgsm/insserver/_default.cfg @@ -0,0 +1,93 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="0.0.0.0" +port="27015" +clientport="27005" +sourcetvport="27020" +defaultmap="ministry" +maxplayers="16" +tickrate="64" +workshop="0" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +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" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="237410" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Insurgency" +engine="source" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}/insurgency" +executabledir="${filesdir}" +executable="./srcds_run" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}/cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/jc2server/_default.cfg b/lgsm/config-default/config-lgsm/jc2server/_default.cfg new file mode 100644 index 000000000..3d358bc2b --- /dev/null +++ b/lgsm/config-default/config-lgsm/jc2server/_default.cfg @@ -0,0 +1,83 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +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" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="261140" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Just Cause 2" +engine="avalanche" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}" +executabledir="${filesdir}" +executable="./Jcmp-Server" +servercfg="config.lua" +servercfgdefault="config.lua" +servercfgdir="${filesdir}" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +#gamelogdir="" # No server logs available +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/kfserver/_default.cfg b/lgsm/config-default/config-lgsm/kfserver/_default.cfg new file mode 100644 index 000000000..6142eb4ec --- /dev/null +++ b/lgsm/config-default/config-lgsm/kfserver/_default.cfg @@ -0,0 +1,96 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### 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 +defaultmap="KF-BioticsLab.rom" +ip="0.0.0.0" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="server ${defaultmap}?game=KFmod.KFGameType?VACSecured=true -nohomedir ini=${servercfg} log=${gamelog}" + +# Server Start Command for Objective mode +#defaultmap="KFO-Steamland" +#parms="server ${defaultmap}?Game=KFStoryGame.KFStoryGame?VACSecured=true -nohomedir ini=${servercfg} log=${gamelog}" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="215360" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Killing Floor" +engine="unreal2" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}/System" +executabledir="${systemdir}" +executable="./ucc-bin" +servercfg="${servicename}.ini" +servercfgdefault="Default.ini" +servercfgdir="${systemdir}" +servercfgfullpath="${servercfgdir}/${servercfg}" +compressedmapsdir="${rootdir}/Maps-Compressed" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +gamelogdir="${rootdir}/log/server" +scriptlogdir="${rootdir}/log/script" +consolelogdir="${rootdir}/log/console" +gamelog="${gamelogdir}/${servicename}-game.log" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/l4d2server/_default.cfg b/lgsm/config-default/config-lgsm/l4d2server/_default.cfg new file mode 100644 index 000000000..9c9046c02 --- /dev/null +++ b/lgsm/config-default/config-lgsm/l4d2server/_default.cfg @@ -0,0 +1,90 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="0.0.0.0" +port="27015" +clientport="27005" +defaultmap="c5m1_waterfront" +maxplayers="8" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="-game left4dead2 -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -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" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="222860" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Left 4 Dead 2" +engine="source" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}/left4dead2" +executabledir="${filesdir}" +executable="./srcds_run" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}/cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/config-default/config-lgsm/l4dserver/_default.cfg b/lgsm/config-default/config-lgsm/l4dserver/_default.cfg new file mode 100644 index 000000000..73c940e20 --- /dev/null +++ b/lgsm/config-default/config-lgsm/l4dserver/_default.cfg @@ -0,0 +1,90 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="0.0.0.0" +port="27015" +clientport="27005" +defaultmap="l4d_hospital01_apartment" +maxplayers="8" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="-game left4dead -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" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="222840" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Left 4 Dead" +engine="source" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}/left4dead" +executabledir="${filesdir}" +executable="./srcds_run" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}/cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/mcserver/_default.cfg b/lgsm/config-default/config-lgsm/mcserver/_default.cfg new file mode 100644 index 000000000..c23547386 --- /dev/null +++ b/lgsm/config-default/config-lgsm/mcserver/_default.cfg @@ -0,0 +1,85 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### 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 +fn_parms(){ +parms="nogui" +} +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## LinuxGSM Server Details +# Do not edit +gamename="Minecraft" +engine="lwjgl2" + +#### 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 ${filesdir}/minecraft_server.jar" +servercfg="server.properties" +servercfgdefault="server.properties" +servercfgdir="${filesdir}" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg new file mode 100644 index 000000000..e78730fb6 --- /dev/null +++ b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg @@ -0,0 +1,80 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +# Edit with care +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" +channeltag="" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### 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="Multi Theft Auto" +engine="renderware" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}" +resourcesdir="${systemdir}/mods/deathmatch/resources" +executabledir="${systemdir}" +executable="./mta-server64" +servercfg="mtaserver.conf" +servercfgdir="${systemdir}/mods/deathmatch" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${filesdir}/mods/deathmatch/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg b/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg new file mode 100644 index 000000000..aece97398 --- /dev/null +++ b/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg @@ -0,0 +1,75 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### +# Use .ini config file for Mumble (Murmur) server. + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +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="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## LinuxGSM Server Details +# Do not edit +gamename="Mumble" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}" +executabledir="${filesdir}" +executable="./murmur.x86" +servercfg="${servicename}.ini" +servercfgdefault="murmur.ini" +servercfgdir="${filesdir}" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${rootdir}/log" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg b/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg new file mode 100644 index 000000000..e033af129 --- /dev/null +++ b/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg @@ -0,0 +1,96 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="0.0.0.0" +port="27015" +clientport="27005" +sourcetvport="27020" +defaultmap="nmo_broadway" +maxplayers="8" + +## 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 +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}" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="317670" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="No More Room in Hell" +engine="source" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}/nmrih" +executabledir="${filesdir}" +executable="./srcds_run" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}/cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg new file mode 100644 index 000000000..c639687d9 --- /dev/null +++ b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg @@ -0,0 +1,101 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### 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" +port="27015" +defaultmap="co_core" +maxplayers="24" +servername="NS2C Server" +webadminuser="admin" +webadminpass="admin" +webadminport="8080" +mods="" +password="" +# Add the following line to the parms if you want a private server. Ensuring +# that the password variable above is not left empty. +# -password \"${password}\" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +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}\"" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="313900" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="NS2: Combat" +engine="spark" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}" +executabledir="${filesdir}/ia32" +executable="./ns2combatserver_linux32" +servercfgdir="${rootdir}/server1" +servercfgfullpath="${servercfgdir}" +modstoragedir="${servercfgdir}/Workshop" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/ns2server/_default.cfg b/lgsm/config-default/config-lgsm/ns2server/_default.cfg new file mode 100644 index 000000000..6da890e07 --- /dev/null +++ b/lgsm/config-default/config-lgsm/ns2server/_default.cfg @@ -0,0 +1,101 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### 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" +port="27015" +defaultmap="ns2_summit" +maxplayers="24" +servername="NS2 Server" +webadminuser="admin" +webadminpass="admin" +webadminport="8080" +mods="" +password="" +# Add the following line to the parms if you want a private server. Ensuring +# that the password variable above is not left empty. +# -password \"${password}\" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +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}\"" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="4940" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Natural Selection 2" +engine="spark" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}" +executabledir="${filesdir}" +executable="./server_linux32" +servercfgdir="${rootdir}/server1" +servercfgfullpath="${servercfgdir}" +modstoragedir="${servercfgdir}/Workshop" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/opforserver/_default.cfg b/lgsm/config-default/config-lgsm/opforserver/_default.cfg new file mode 100644 index 000000000..a61a4b4d2 --- /dev/null +++ b/lgsm/config-default/config-lgsm/opforserver/_default.cfg @@ -0,0 +1,91 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="0.0.0.0" +port="27015" +clientport="27005" +defaultmap="op4_bootcamp" +maxplayers="16" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="-game gearbox -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" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="90" +appidmod="gearbox" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Half-Life: Opposing Force" +engine="goldsource" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}/gearbox" +executabledir="${filesdir}" +executable="./hlds_run" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/pcserver/_default.cfg b/lgsm/config-default/config-lgsm/pcserver/_default.cfg new file mode 100644 index 000000000..e0398c448 --- /dev/null +++ b/lgsm/config-default/config-lgsm/pcserver/_default.cfg @@ -0,0 +1,84 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +# Notification Alerts +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="--config ${servercfg}" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="332670" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Project Cars" +engine="madness" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}" +executabledir="${filesdir}" +executable="./DedicatedServerCmd" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg b/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg new file mode 100644 index 000000000..32888b654 --- /dev/null +++ b/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg @@ -0,0 +1,91 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="0.0.0.0" +port="27015" +clientport="27005" +sourcetvport="27020" +defaultmap="bt_island" +maxplayers="24" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="-game pvkii -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -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" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="17575" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Pirates, Vikings, and Knights II" +engine="source" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}/pvkii" +executabledir="${filesdir}" +executable="./srcds_run" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}/cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/pzserver/_default.cfg b/lgsm/config-default/config-lgsm/pzserver/_default.cfg new file mode 100644 index 000000000..004bb6378 --- /dev/null +++ b/lgsm/config-default/config-lgsm/pzserver/_default.cfg @@ -0,0 +1,86 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="0.0.0.0" +adminpassword="CHANGE_ME" + +fn_parms(){ +parms="-ip ${ip} -adminpassword \"${adminpassword}\" -servername ${servicename}" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="380870" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Project Zomboid" +engine="projectzomboid" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}" +executabledir="${filesdir}" +executable="./start-server.sh" +servercfg="${servicename}.ini" +servercfgdefault="server.ini" +servercfgdir="${HOME}/Zomboid/Server" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${HOME}/Zomboid/Logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/q2server/_default.cfg b/lgsm/config-default/config-lgsm/q2server/_default.cfg new file mode 100644 index 000000000..5abcaa974 --- /dev/null +++ b/lgsm/config-default/config-lgsm/q2server/_default.cfg @@ -0,0 +1,77 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="0.0.0.0" +port="27910" +defaultmap="q2dm1" + +## 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" +channeltag="" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## LinuxGSM Server Details +# Do not edit +gamename="Quake 2" +engine="idtech2" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}/baseq2" +executabledir="${filesdir}" +executable="./quake2" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${filesdir}/Logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/q3server/_default.cfg b/lgsm/config-default/config-lgsm/q3server/_default.cfg new file mode 100644 index 000000000..028d45229 --- /dev/null +++ b/lgsm/config-default/config-lgsm/q3server/_default.cfg @@ -0,0 +1,77 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="0.0.0.0" +port="27960" +defaultmap="q3dm17" + +## 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}" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## LinuxGSM Server Details +# Do not edit +gamename="Quake 3: Arena" +engine="idtech3" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}/baseq3" +executabledir="${filesdir}" +executable="./q3ded" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${filesdir}/Logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/qlserver/_default.cfg b/lgsm/config-default/config-lgsm/qlserver/_default.cfg new file mode 100644 index 000000000..22ef3204f --- /dev/null +++ b/lgsm/config-default/config-lgsm/qlserver/_default.cfg @@ -0,0 +1,88 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +arch="x64" # x64 or x86 + +## 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="+exec ${servercfg}" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="349090" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Quake Live" +engine="idtech3_ql" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}" +executabledir="${filesdir}" +executable=$([ "${arch}" == 'x64' ] && echo "./run_server_x64.sh" || echo "./run_server_x86.sh") +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${filesdir}/baseq3" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +gamelogdir="${rootdir}/log/server" +scriptlogdir="${rootdir}/log/script" +consolelogdir="${rootdir}/log/console" +gamelog="${gamelogdir}/${servicename}-game.log" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/qwserver/_default.cfg b/lgsm/config-default/config-lgsm/qwserver/_default.cfg new file mode 100644 index 000000000..04eb9a69a --- /dev/null +++ b/lgsm/config-default/config-lgsm/qwserver/_default.cfg @@ -0,0 +1,76 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="0.0.0.0" +port="27500" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="-port ${port} -game ktx +exec ${servercfg}" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## LinuxGSM Server Details +# Do not edit +gamename="QuakeWorld" +engine="quake" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}/ktx" +executabledir="${filesdir}" +executable="./mvdsv" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg b/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg new file mode 100644 index 000000000..c0301588d --- /dev/null +++ b/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg @@ -0,0 +1,110 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="0.0.0.0" +port="27015" +clientport="27005" +defaultmap="rc_arena" +maxplayers="16" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="-game ricochet -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} -maxplayers ${maxplayers}" +} + +########################## +######## Settings ######## +########################## + +#### Server Settings #### + +## 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 +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" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="90" +appidmod="ricochet" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Ricochet" +engine="goldsource" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}/ricochet" +executabledir="${filesdir}" +executable="./hlds_run" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/roserver/_default.cfg b/lgsm/config-default/config-lgsm/roserver/_default.cfg new file mode 100644 index 000000000..f0c1ac587 --- /dev/null +++ b/lgsm/config-default/config-lgsm/roserver/_default.cfg @@ -0,0 +1,103 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### 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" +defaultmap="RO-Arad.rom" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="server ${defaultmap}?game=ROGame.ROTeamGame?VACSecured=true -nohomedir ini=${servercfg} log=${gamelog}" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="223250" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Red Orchestra: Ostfront 41-45" +engine="unreal2" + +#### Directories #### +# Edit with care + +## Work Directories +rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" +selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" +lockselfname=".${servicename}.lock" +lgsmdir="${rootdir}/lgsm" +functionsdir="${lgsmdir}/functions" +libdir="${lgsmdir}/lib" +tmpdir="${lgsmdir}/tmp" + +## Server Specific Directories +filesdir="${rootdir}/serverfiles" +systemdir="${filesdir}/system" +executabledir="${systemdir}" +executable="./ucc-bin" +servercfg="${servicename}.ini" +servercfgdefault="default.ini" +servercfgdir="${systemdir}" +servercfgfullpath="${servercfgdir}/${servercfg}" +compressedmapsdir="${rootdir}/Maps-Compressed" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +gamelogdir="${rootdir}/log/server" +scriptlogdir="${rootdir}/log/script" +consolelogdir="${rootdir}/log/console" +gamelog="${gamelogdir}/${servicename}-game.log" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${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" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/rustserver/_default.cfg b/lgsm/config-default/config-lgsm/rustserver/_default.cfg new file mode 100644 index 000000000..9d898f131 --- /dev/null +++ b/lgsm/config-default/config-lgsm/rustserver/_default.cfg @@ -0,0 +1,119 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### 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 +ip="0.0.0.0" +port="28015" +rconport="28016" +rconpassword="CHANGE_ME" +rconweb="1" # Value is: 1 for Facepunch's web panel; 0 for RCON tools like Rusty or Rustadmin +servername="Rust" +maxplayers="50" +# 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 + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +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.web ${rconweb} +rcon.ip ${ip} +rcon.port ${rconport} +rcon.password \"${rconpassword}\" -logfile \"${gamelogdate}\"" +} + +# Specific to Rust +if [ -n "${seed}" ]; then + # If set, then add to start parms + conditionalseed="+server.seed ${seed}" +else + # Keep randomness of the number if not set + conditionalseed="" +fi + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="258550" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Rust" +engine="unity3d" + +#### Directories #### +# Edit with care + +## Work Directories +rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" +selfname=$(basename $(readlink -f "${BASH_SOURCE[0]}")) +lockselfname=".${servicename}.lock" +lgsmdir="${rootdir}/lgsm" +functionsdir="${lgsmdir}/functions" +libdir="${lgsmdir}/lib" +tmpdir="${lgsmdir}/tmp" +filesdir="${rootdir}/serverfiles" + +## Server Specific Directories +systemdir="${filesdir}" +executabledir="${filesdir}" +executable="./RustDedicated" +serveridentitydir="${systemdir}/server/${servicename}" +servercfg="server.cfg" +servercfgdefault="server.cfg" +servercfgdir="${serveridentitydir}/cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${rootdir}/log/server" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${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" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/sbserver/_default.cfg b/lgsm/config-default/config-lgsm/sbserver/_default.cfg new file mode 100644 index 000000000..3a1a5989f --- /dev/null +++ b/lgsm/config-default/config-lgsm/sbserver/_default.cfg @@ -0,0 +1,90 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### 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" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +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" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="211820" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Starbound" +engine="starbound" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}" +executabledir="${filesdir}/linux" +executable="./starbound_server" +servercfg="starbound_server.config" +servercfgdefault="starbound_server.config" +servercfgdir="${filesdir}/storage" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${filesdir}/storage" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg index 4e38b147b..e7d2389e4 100644 --- a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg @@ -3,8 +3,8 @@ ################################## # DO NOT EDIT WILL BE OVERWRITTEN! # Copy settings from here and use them in either -# common.cfg - applys settings to every instance -# [instance].cfg - applys settings to specific instance +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance #### Server Settings #### diff --git a/lgsm/config-default/config-lgsm/ss3server/_default.cfg b/lgsm/config-default/config-lgsm/ss3server/_default.cfg new file mode 100644 index 000000000..fadf636cc --- /dev/null +++ b/lgsm/config-default/config-lgsm/ss3server/_default.cfg @@ -0,0 +1,88 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="0.0.0.0" + +## 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="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="41080" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Serious Sam 3: BFE" +engine="seriousengine35" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}/Bin" +executable="./runSam3_DedicatedServer.sh" +executabledir="${systemdir}" +servercfg="${servicename}.ini" +servercfgdefault="server.ini" +servercfgdir="${filesdir}/Content/SeriousSam3/Config" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +gamelogdir="${rootdir}/log/server" +scriptlogdir="${rootdir}/log/script" +consolelogdir="${rootdir}/log/console" +gamelog="${gamelogdir}/${servicename}-game.log" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${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" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/svenserver/_default.cfg b/lgsm/config-default/config-lgsm/svenserver/_default.cfg new file mode 100644 index 000000000..720f1248c --- /dev/null +++ b/lgsm/config-default/config-lgsm/svenserver/_default.cfg @@ -0,0 +1,90 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="0.0.0.0" +port="27015" +clientport="27005" +defaultmap="svencoop1" +maxplayers="16" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="-game svencoop -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" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="276060" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Sven Co-op" +engine="goldsource" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}/svencoop" +executabledir="${filesdir}" +executable="./svends_run" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg b/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg new file mode 100644 index 000000000..1cf4f0570 --- /dev/null +++ b/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg @@ -0,0 +1,89 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### 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" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="-config ${servercfgfullpath}" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="105600" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Terraria" +engine="terraria" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}" +executabledir="${filesdir}" +executable="./TerrariaServer" +servercfg="${servicename}.txt" +servercfgdefault="serverconfig.txt" +servercfgdir="${filesdir}" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +#gamelogdir="" # No server logs available +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/tf2server/_default.cfg b/lgsm/config-default/config-lgsm/tf2server/_default.cfg new file mode 100644 index 000000000..fca2e5bc1 --- /dev/null +++ b/lgsm/config-default/config-lgsm/tf2server/_default.cfg @@ -0,0 +1,96 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="0.0.0.0" +port="27015" +clientport="27005" +sourcetvport="27020" +defaultmap="cp_badlands" +maxplayers="16" + +## 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 +fn_parms(){ +parms="-game tf -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +sv_setsteamaccount ${gslt} +servercfgfile ${servercfg} -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" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="232250" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Team Fortress 2" +engine="source" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}/tf" +executabledir="${filesdir}" +executable="./srcds_run" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}/cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/tfcserver/_default.cfg b/lgsm/config-default/config-lgsm/tfcserver/_default.cfg new file mode 100644 index 000000000..2f7a9dd97 --- /dev/null +++ b/lgsm/config-default/config-lgsm/tfcserver/_default.cfg @@ -0,0 +1,91 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="0.0.0.0" +port="27015" +clientport="27005" +defaultmap="dustbowl" +maxplayers="16" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="-game tfc -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" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="90" +appidmod="tfc" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Team Fortress Classic" +engine="goldsource" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}/tfc" +executabledir="${filesdir}" +executable="./hlds_run" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/ts3server/_default.cfg b/lgsm/config-default/config-lgsm/ts3server/_default.cfg new file mode 100644 index 000000000..487254215 --- /dev/null +++ b/lgsm/config-default/config-lgsm/ts3server/_default.cfg @@ -0,0 +1,68 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +# Edit serverfiles/ts3-server.ini after installation + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## LinuxGSM Server Details +# Do not edit +gamename="TeamSpeak 3" +servername="TeamSpeak 3 Server" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}" +executabledir="${filesdir}" +executable="./ts3server_startscript.sh" +servercfg="${servicename}.ini" +servercfgdefault="ts3server.ini" +servercfgdir="${filesdir}" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${filesdir}/Logs" +scriptlogdir="${rootdir}/log/script" +scriptlog="${scriptlogdir}/${servicename}-script.log" +emaillog="${scriptlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/tuserver/_default.cfg b/lgsm/config-default/config-lgsm/tuserver/_default.cfg new file mode 100644 index 000000000..f92175880 --- /dev/null +++ b/lgsm/config-default/config-lgsm/tuserver/_default.cfg @@ -0,0 +1,88 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="0.0.0.0" +port="7777" +queryport="27015" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="-log -MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -TowerServerINI=${servicename}.ini" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="439660" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Tower Unite" +engine="unreal4" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}/Tower" +executabledir="${systemdir}/Binaries/Linux" +executable="./TowerServer-Linux-Shipping" +servercfgdir="${systemdir}/Binaries/Linux" +servercfg="${servicename}.ini" +servercfgfullpath="${servercfgdir}/${servercfg}" +servercfgdefault="TowerServer.ini" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/Saved/Logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/twserver/_default.cfg b/lgsm/config-default/config-lgsm/twserver/_default.cfg new file mode 100644 index 000000000..59b843bc0 --- /dev/null +++ b/lgsm/config-default/config-lgsm/twserver/_default.cfg @@ -0,0 +1,90 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### 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" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="-f ${servercfgfullpath}" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="380840" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Teeworlds" +engine="teeworlds" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}/tw" +executabledir="${systemdir}" +executable="./teeworlds_srv" +servercfg="${servicename}.cfg" # Teeworlds can also auto load any config if an autoexec.cfg file is present in the server dir +servercfgdefault="server.cfg" +servercfgdir="${filesdir}" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +gamelogdir="${rootdir}/log/server" +scriptlogdir="${rootdir}/log/script" +consolelogdir="${rootdir}/log/console" +gamelog="${gamelogdir}/${servicename}-game.log" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg new file mode 100644 index 000000000..e6e88a063 --- /dev/null +++ b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg @@ -0,0 +1,78 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## 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 +fn_parms(){ +parms="server ${defaultmap}?game=XGame.xDeathMatch -nohomedir ini=${servercfg} log=${gamelog}" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## LinuxGSM Server Details +# Do not edit +gamename="Unreal Tournament 2004" +engine="unreal2" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}/System" +executabledir="${systemdir}" +executable="./ucc-bin" +servercfg="${servicename}.ini" +servercfgdefault="UT2004.ini" +servercfgdir="${systemdir}" +servercfgfullpath="${servercfgdir}/${servercfg}" +compressedmapsdir="${rootdir}/Maps-Compressed" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +gamelogdir="${rootdir}/log/server" +scriptlogdir="${rootdir}/log/script" +consolelogdir="${rootdir}/log/console" +gamelog="${gamelogdir}/${servicename}-game.log" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${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" diff --git a/lgsm/config-default/config-lgsm/ut3server/_default.cfg b/lgsm/config-default/config-lgsm/ut3server/_default.cfg new file mode 100644 index 000000000..f169e89f1 --- /dev/null +++ b/lgsm/config-default/config-lgsm/ut3server/_default.cfg @@ -0,0 +1,89 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="0.0.0.0" +port="7777" +queryport="25300" +defaultmap="VCTF-Suspense" +maxplayers="32" +game="UTGameContent.UTVehicleCTFGame_Content" +mutators="" #"UTGame.UTMutator_Instagib,UTGame.UTMutator_LowGrav" +isdedicated="true" +islanmatch="false" +usesstats="false" +shouldadvertise="true" +pureserver="1" +allowjoininprogress="true" + +## 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}" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## LinuxGSM Server Details +# Do not edit +gamename="Unreal Tournament 3" +engine="unreal3" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}" +executabledir="${systemdir}/Binaries" +executable="./ut3" +servercfg="${servicename}.ini" +servercfgdefault="UTGame.ini" +servercfgdir="${systemdir}/UTGame/Config" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +gamelogdir="${rootdir}/log/server" +scriptlogdir="${rootdir}/log/script" +consolelogdir="${rootdir}/log/console" +gamelog="${gamelogdir}/${servicename}-game.log" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${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" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/ut99server/_default.cfg b/lgsm/config-default/config-lgsm/ut99server/_default.cfg new file mode 100644 index 000000000..ff405ee3f --- /dev/null +++ b/lgsm/config-default/config-lgsm/ut99server/_default.cfg @@ -0,0 +1,77 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## 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 +fn_parms(){ +parms="server ${defaultmap}.unr ini=${servercfgfullpath}" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## LinuxGSM Server Details +# Do not edit +gamename="Unreal Tournament 99" +engine="unreal" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}/System" +executabledir="${systemdir}" +executable="./ucc-bin" +servercfg="${servicename}.ini" +servercfgdefault="Default.ini" +servercfgdir="${systemdir}" +servercfgfullpath="${servercfgdir}/${servercfg}" +compressedmapsdir="${rootdir}/Maps-Compressed" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${filesdir}/Logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/utserver/_default.cfg b/lgsm/config-default/config-lgsm/utserver/_default.cfg new file mode 100644 index 000000000..dfeb0ad9d --- /dev/null +++ b/lgsm/config-default/config-lgsm/utserver/_default.cfg @@ -0,0 +1,79 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +# For CTF: defaultmap="CTF-Face" gametype="CTF" +ip="0.0.0.0" +port="7777" +defaultmap="DM-Underland" +gametype="DM" +timelimit="10" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="UnrealTournament ${defaultmap}?Game=${gametype}?TimeLimit=${timelimit} -port=${port}" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## LinuxGSM Server Details +# Do not edit +gamename="Unreal Tournament" +engine="unreal4" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}/LinuxServer" +executabledir="${systemdir}/Engine/Binaries/Linux" +executable="./UE4Server-Linux-Shipping" +servercfg="Game.ini" +servercfgdir="${systemdir}/UnrealTournament/Saved/Config/LinuxServer" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${filesdir}/Logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/wetserver/_default.cfg b/lgsm/config-default/config-lgsm/wetserver/_default.cfg new file mode 100644 index 000000000..a8e98871e --- /dev/null +++ b/lgsm/config-default/config-lgsm/wetserver/_default.cfg @@ -0,0 +1,72 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ + parms="+set net_strict 1 +set fs_homepath ${filesdir} +exec ${servercfg}" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## LinuxGSM Server Details +# Do not edit +gamename="Wolfenstein: Enemy Territory" +engine="idtech3" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${filesdir}" +executabledir="${systemdir}" +executable="./etded" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}/etmain" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${filesdir}/Logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${lgsmlogdir}/${servicename}-email.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index f990a20ca..425549143 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -82,16 +82,6 @@ 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" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -serverfiles="${rootdir}/serverfiles" - ## Server Specific Directories systemdir="${serverfiles}" executabledir="${serverfiles}" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 2da2fdb87..9ae9792a0 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -69,16 +69,6 @@ servicename="ts3-server" #### Directories #### # Edit with care -## Work Directories -rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" -selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -lockselfname=".${servicename}.lock" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -serverfiles="${rootdir}/serverfiles" - ## Server Specific Directories systemdir="${serverfiles}" executabledir="${serverfiles}" From f763e4b96cef375b768e76c333d9f2475420f7d1 Mon Sep 17 00:00:00 2001 From: Scarsz Date: Fri, 26 May 2017 18:12:09 -0700 Subject: [PATCH 145/216] Add squadserver main file --- Squad/squadserver | 199 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 199 insertions(+) create mode 100644 Squad/squadserver diff --git a/Squad/squadserver b/Squad/squadserver new file mode 100644 index 000000000..7228e7ab8 --- /dev/null +++ b/Squad/squadserver @@ -0,0 +1,199 @@ +#!/bin/bash +# Project: Game Server Managers - LinuxGSM +# Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs +# Purpose: Squad | 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="170501" + +########################## +######## Settings ######## +########################## + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +port="7787" +queryport="27165" +fixedmaxplayers="80" +randommapmode="ALWAYS" +ip="0.0.0.0" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="MULTIHOME=${ip} PORT=${port} QueryPort=${queryport} FIXEDMAXPLAYERS=${fixedmaxplayers} RANDOM={randommapmode}" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="403240" +# 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="feature/squadserver" + +## LinuxGSM Server Details +# Do not edit +gamename="Squad" +engine="unreal4" + +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="squad-server" + +#### Directories #### +# Edit with care + +## Work Directories +rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" +selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" +lockselfname=".${servicename}.lock" +lgsmdir="${rootdir}/lgsm" +functionsdir="${lgsmdir}/functions" +libdir="${lgsmdir}/lib" +tmpdir="${lgsmdir}/tmp" +filesdir="${rootdir}/serverfiles" + +## Server Specific Directories +systemdir="${filesdir}/Squad" +executabledir="${systemdir}/Binaries/Linux" +executable="./SquadServer" +servercfgdir="${systemdir}/ServerConfig" +servercfg="Server.cfg" +servercfgdefault="Server.cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +gamelogdir="${systemdir}/Saved/Logs" +scriptlogdir="${rootdir}/log/script" +consolelogdir="${rootdir}/log/console" +scriptlog="${scriptlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${scriptlogdir}/${servicename}-email.log" + +## Logs Naming +scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +######################## +######## Script ######## +###### Do not edit ##### +######################## + +# Fetches core_dl for file downloads +fn_fetch_core_dl(){ +github_file_url_dir="lgsm/functions" +github_file_url_name="${functionfile}" +filedir="${functionsdir}" +filename="${github_file_url_name}" +githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" +# If the file is missing, then download +if [ ! -f "${filedir}/${filename}" ]; then + if [ ! -d "${filedir}" ]; then + mkdir -p "${filedir}" + fi + echo -e " fetching ${filename}...\c" + # Check curl exists and use available path + curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" + for curlcmd in ${curlpaths} + do + if [ -x "${curlcmd}" ]; then + break + fi + done + # If curl exists download file + if [ "$(basename ${curlcmd})" == "curl" ]; then + curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) + if [ $? -ne 0 ]; then + echo -e "\e[0;31mFAIL\e[0m\n" + echo "${curlfetch}" + echo -e "${githuburl}\n" + exit 1 + else + echo -e "\e[0;32mOK\e[0m" + fi + else + echo -e "\e[0;31mFAIL\e[0m\n" + echo "Curl is not installed!" + echo -e "" + exit 1 + fi + chmod +x "${filedir}/${filename}" +fi +source "${filedir}/${filename}" +} + +core_dl.sh(){ +# Functions are defined in core_functions.sh. +functionfile="${FUNCNAME}" +fn_fetch_core_dl +} + +core_functions.sh(){ +# Functions are defined in core_functions.sh. +functionfile="${FUNCNAME}" +fn_fetch_core_dl +} + +# Prevent from running this script as root. +if [ "$(whoami)" = "root" ]; then + if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then + echo "[ FAIL ] Do NOT run this script as root!" + exit 1 + else + core_functions.sh + check_root.sh + fi +fi + +core_dl.sh +core_functions.sh +getopt=$1 +core_getopt.sh \ No newline at end of file From 79d9dcafd0ccbdc1e865c56af593a7a93d308ac6 Mon Sep 17 00:00:00 2001 From: Scarsz Date: Fri, 26 May 2017 18:29:17 -0700 Subject: [PATCH 146/216] change executable to use included start script better to use it as it's included with the server & sets some environment info --- Squad/squadserver | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Squad/squadserver b/Squad/squadserver index 7228e7ab8..e16c730b2 100644 --- a/Squad/squadserver +++ b/Squad/squadserver @@ -100,8 +100,8 @@ filesdir="${rootdir}/serverfiles" ## Server Specific Directories systemdir="${filesdir}/Squad" -executabledir="${systemdir}/Binaries/Linux" -executable="./SquadServer" +executabledir="${systemdir}" +executable="./SquadServer.sh" servercfgdir="${systemdir}/ServerConfig" servercfg="Server.cfg" servercfgdefault="Server.cfg" From 60ed162d95e369129dbeed3b6641b36a876e047c Mon Sep 17 00:00:00 2001 From: Scarsz Date: Fri, 26 May 2017 18:30:34 -0700 Subject: [PATCH 147/216] add Squad sections to command_details adds map rotation mode & port information --- lgsm/functions/command_details.sh | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index 106eb0041..1286f04a2 100644 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -173,6 +173,11 @@ fn_details_gameserver(){ echo -e "${blue}ASE:\t${default}${ase}" fi + # Random map rotation mode (Squad) + if [ -n "${randommapmode}"]; then + echo -e "${blue}Map rotation:\t${default}${randommapmode}" + fi + # Online status if [ "${status}" == "0" ]; then echo -e "${blue}Status:\t${red}OFFLINE${default}" @@ -190,7 +195,7 @@ fn_details_script(){ # Service name: ql-server # qlserver version: 150316 # User: lgsm - # Email alert: off + # Email alert: off # Update on start: off # Location: /home/lgsm/qlserver # Config file: /home/lgsm/qlserver/serverfiles/baseq3/ql-server.cfg @@ -656,6 +661,21 @@ fn_details_spark(){ } | column -s $'\t' -t } +fn_details_squad(){ + echo -e "netstat -atunp | grep SquadServer" + echo -e "" + { + echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "> Game\tINBOUND\t${port}\tudp" + # Don't do arithmetics if ever the port wasn't a numeric value + if [ "${port}" -eq "${port}" ]; then + echo -e "> RAW\tINBOUND\t$((port+1))\tudp" + fi + echo -e "> Query\tINBOUND\t${queryport}\tudp" + echo -e "> RCON\tINBOUND\t${rconport}\ttcp" + } | column -s $'\t' -t +} + fn_details_starbound(){ echo -e "netstat -atunp | grep starbound" echo -e "" @@ -861,6 +881,8 @@ fn_display_details() { fn_details_quake3 elif [ "${gamename}" == "Quake Live" ]; then fn_details_quakelive + elif [ "${gamename}" == "Squad"]; then + fn_details_squad elif [ "${gamename}" == "TeamSpeak 3" ]; then fn_details_teamspeak3 elif [ "${gamename}" == "Tower Unite" ]; then From d63c710d5ed801f822a0ce4bb4d4240200f256d3 Mon Sep 17 00:00:00 2001 From: Scarsz Date: Fri, 26 May 2017 18:49:07 -0700 Subject: [PATCH 148/216] Add install_squad_license to prompt user to add a license key if wanted --- lgsm/functions/command_install.sh | 2 ++ lgsm/functions/install_squad_license.sh | 26 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 lgsm/functions/install_squad_license.sh diff --git a/lgsm/functions/command_install.sh b/lgsm/functions/command_install.sh index 7bbc40f42..5f8fe3d30 100644 --- a/lgsm/functions/command_install.sh +++ b/lgsm/functions/command_install.sh @@ -36,6 +36,8 @@ elif [ "${gamename}" == "TeamSpeak 3" ]; then install_ts3db.sh elif [ "${gamename}" == "Multi Theft Auto" ]; then command_install_resources_mta.sh +elif [ "${gamename}" == "Squad" ]; then + install_squad_license.sh fi fix.sh diff --git a/lgsm/functions/install_squad_license.sh b/lgsm/functions/install_squad_license.sh new file mode 100644 index 000000000..a832ab16f --- /dev/null +++ b/lgsm/functions/install_squad_license.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# LinuxGSM install_squad_license.sh function +# Author: Daniel Gibbs +# Website: https://gameservermanagers.com +# Description: Configures the Squad server's license. + +local commandname="INSTALL" +local commandaction="Install" +local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" + +echo "" +echo "Squad Server License" +echo "=================================" +sleep 1 +echo "Server license is an optional feature for ${gamename} server" +fn_script_log_info "Server license is an optional feature for ${gamename} server" + +echo "Get more info and a server license here:" +echo "http://forums.joinsquad.com/topic/16519-server-licensing-general-info/" +fn_script_log_info "Get more info and a server license here:" +fn_script_log_info "http://forums.joinsquad.com/topic/16519-server-licensing-general-info/" +echo "" +sleep 1 +echo "The Squad server license can be changed by editing ${servercfgdir}/License.cfg." +fn_script_log_info "The Squad server license can be changed by editing ${selfname}." +echo "" \ No newline at end of file From 09e62c7ae84ffc8162d62958493470a2ccb3b037 Mon Sep 17 00:00:00 2001 From: Scarsz Date: Fri, 26 May 2017 18:51:18 -0700 Subject: [PATCH 149/216] Add getopt block for Squad license prompt --- lgsm/functions/core_getopt.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lgsm/functions/core_getopt.sh b/lgsm/functions/core_getopt.sh index a17487eb5..b877211c9 100644 --- a/lgsm/functions/core_getopt.sh +++ b/lgsm/functions/core_getopt.sh @@ -40,6 +40,7 @@ cmd_map_compressor_u99=( "mc;map-compressor" "compress_ut99_maps.sh" "Compresses cmd_map_compressor_u2=( "mc;map-compressor" "compress_unreal2_maps.sh" "Compresses all ${gamename} server maps." ) cmd_install_cdkey=( "cd;server-cd-key" "install_ut2k4_key.sh" "Add your server cd key." ) cmd_install_dst_token=( "ct;cluster-token" "install_dst_token.sh" "Configure cluster token." ) +cmd_install_squad_license=( "li;license" "install_squad_license.sh" "Add your Squad server license." ) cmd_fastdl=( "fd;fastdl" "command_fastdl.sh" "Build a FastDL directory." ) # Dev commands cmd_dev_debug=( "dev;developer" "command_dev_debug.sh" "Enable developer Mode." ) @@ -114,6 +115,11 @@ if [ "${gamename}" == "Multi Theft Auto" ]; then currentopt+=( "${cmd_install_default_resources[@]}" ) fi +# Squad license exclusive +if [ "${gamename}" == "Squad" ]; then + currentopt+=( "${cmd_install_squad_license[@]}" ) +fi + ## Mods commands if [ "${engine}" == "source" ]||[ "${gamename}" == "Rust" ]||[ "${gamename}" == "Hurtworld" ]||[ "${gamename}" == "7 Days To Die" ]; then currentopt+=( "${cmd_mods_install[@]}" "${cmd_mods_remove[@]}" "${cmd_mods_update[@]}" ) From 30c94db080a8d3180d679cc1ef75d8c2d12133bb Mon Sep 17 00:00:00 2001 From: Scarsz Date: Fri, 26 May 2017 18:59:38 -0700 Subject: [PATCH 150/216] space love how touchy bash is --- lgsm/functions/command_details.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index 1286f04a2..530f869e0 100644 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -174,7 +174,7 @@ fn_details_gameserver(){ fi # Random map rotation mode (Squad) - if [ -n "${randommapmode}"]; then + if [ -n "${randommapmode}" ]; then echo -e "${blue}Map rotation:\t${default}${randommapmode}" fi @@ -881,7 +881,7 @@ fn_display_details() { fn_details_quake3 elif [ "${gamename}" == "Quake Live" ]; then fn_details_quakelive - elif [ "${gamename}" == "Squad"]; then + elif [ "${gamename}" == "Squad" ]; then fn_details_squad elif [ "${gamename}" == "TeamSpeak 3" ]; then fn_details_teamspeak3 From 56a9b7e310b352decfc269fddfa2d157e4a92a7f Mon Sep 17 00:00:00 2001 From: Scarsz Date: Fri, 26 May 2017 19:08:04 -0700 Subject: [PATCH 151/216] Add install_squad_license.sh block to core_functions --- lgsm/functions/core_functions.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 1738928ca..7a095b96f 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -187,6 +187,11 @@ functionfile="${FUNCNAME}" fn_fetch_function } +install_squad_license.sh(){ +functionfile="${FUNCNAME}" +fn_fetch_function +} + command_mods_install.sh(){ functionfile="${FUNCNAME}" fn_fetch_function From daa57b9782dc2f985a987aa7c8a0d6331feee9dc Mon Sep 17 00:00:00 2001 From: Scarsz Date: Fri, 26 May 2017 19:10:45 -0700 Subject: [PATCH 152/216] Add install_squad_license.sh block to command_install --- lgsm/functions/command_install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lgsm/functions/command_install.sh b/lgsm/functions/command_install.sh index 5f8fe3d30..092496b01 100644 --- a/lgsm/functions/command_install.sh +++ b/lgsm/functions/command_install.sh @@ -32,6 +32,8 @@ if [ "${gamename}" == "BrainBread 2" ]||[ "${gamename}" == "Black Mesa: Deathmat install_gslt.sh elif [ "${gamename}" == "Don't Starve Together" ]; then install_dst_token.sh +elif [ "${gamename}" == "Squad" ]; then + install_squad_license.sh elif [ "${gamename}" == "TeamSpeak 3" ]; then install_ts3db.sh elif [ "${gamename}" == "Multi Theft Auto" ]; then From 1b38006b9d0350efee9e8b0b5d1c1302bc838df7 Mon Sep 17 00:00:00 2001 From: Scarsz Date: Fri, 26 May 2017 19:25:05 -0700 Subject: [PATCH 153/216] remove irrelevant entry for Squad details, read RCON port from cfg file --- lgsm/functions/command_details.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index 530f869e0..9af448e76 100644 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -662,15 +662,12 @@ fn_details_spark(){ } fn_details_squad(){ + rconport=$(cat ${servercfgdir}/Rcon.cfg | grep "Port=" | cut -c6-) # obtain rcon port from file echo -e "netstat -atunp | grep SquadServer" echo -e "" { echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" echo -e "> Game\tINBOUND\t${port}\tudp" - # Don't do arithmetics if ever the port wasn't a numeric value - if [ "${port}" -eq "${port}" ]; then - echo -e "> RAW\tINBOUND\t$((port+1))\tudp" - fi echo -e "> Query\tINBOUND\t${queryport}\tudp" echo -e "> RCON\tINBOUND\t${rconport}\ttcp" } | column -s $'\t' -t From 9fc01c2b940cb26e2602fad869803fea304dba88 Mon Sep 17 00:00:00 2001 From: Scarsz Date: Fri, 26 May 2017 19:33:10 -0700 Subject: [PATCH 154/216] fix executabledir --- Squad/squadserver | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Squad/squadserver b/Squad/squadserver index e16c730b2..964b9b0ea 100644 --- a/Squad/squadserver +++ b/Squad/squadserver @@ -100,7 +100,7 @@ filesdir="${rootdir}/serverfiles" ## Server Specific Directories systemdir="${filesdir}/Squad" -executabledir="${systemdir}" +executabledir="${filesdir}" executable="./SquadServer.sh" servercfgdir="${systemdir}/ServerConfig" servercfg="Server.cfg" From a67300eb9ee21d1675e02497496fcbf872c59364 Mon Sep 17 00:00:00 2001 From: Scarsz Date: Fri, 26 May 2017 19:54:56 -0700 Subject: [PATCH 155/216] move rcon info reading for squad, add read of server name & max players --- lgsm/functions/command_details.sh | 1 - lgsm/functions/info_config.sh | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index 9af448e76..e1b9f418f 100644 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -662,7 +662,6 @@ fn_details_spark(){ } fn_details_squad(){ - rconport=$(cat ${servercfgdir}/Rcon.cfg | grep "Port=" | cut -c6-) # obtain rcon port from file echo -e "netstat -atunp | grep SquadServer" echo -e "" { diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index a179efbb4..e40d8d1a5 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -703,6 +703,27 @@ fn_info_config_wolfensteinenemyterritory(){ fi } +fn_info_config_squad(){ + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + maxplayers="${unavailable}" + else + servername="$(cat ${servercfgfullpath} | grep "ServerName=" | cut -c13- | rev | cut -c3- | rev)" + maxplayers="$(cat ${servercfgfullpath} | grep "MaxPlayers=" | cut -c12-)" + fi + + if [ ! -f "${servercfgdir}/Rcon.cfg" ]; then + rconport=${unavailable} + rconpassword=${unavailable} + else + rconport=$(cat ${servercfgdir}/Rcon.cfg | grep "Port=" | cut -c6-) + rconpassword=$(cat ${servercfgdir}/Rcon.cfg | grep "Password=" | cut -c6-) + if [ -z "${rconpassword}" ]; then + rconpassword="${cyan}DISABLED${default}" + fi + fi +} + # Just Cause 2 if [ "${engine}" == "avalanche" ]; then fn_info_config_avalanche @@ -787,4 +808,6 @@ elif [ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then fn_info_config_wolfensteinenemyterritory elif [ "${gamename}" == "Multi Theft Auto" ]; then fn_info_config_mta +elif [ "${gamename}" == "Squad"]; then + fn_info_config_squad fi From cdfdffef3719c2273eb4ac1d1bb4d6a7b0a4b957 Mon Sep 17 00:00:00 2001 From: Scarsz Date: Fri, 26 May 2017 20:01:33 -0700 Subject: [PATCH 156/216] space love bash --- lgsm/functions/info_config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index e40d8d1a5..a466e7e53 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -808,6 +808,6 @@ elif [ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then fn_info_config_wolfensteinenemyterritory elif [ "${gamename}" == "Multi Theft Auto" ]; then fn_info_config_mta -elif [ "${gamename}" == "Squad"]; then +elif [ "${gamename}" == "Squad" ]; then fn_info_config_squad fi From 432c3c48f3583457c12861ed8a6cea30e10e0a2c Mon Sep 17 00:00:00 2001 From: Scarsz Date: Fri, 26 May 2017 20:16:02 -0700 Subject: [PATCH 157/216] fix up Squad block in info_config --- lgsm/functions/info_config.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index a466e7e53..80118f716 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -709,17 +709,17 @@ fn_info_config_squad(){ maxplayers="${unavailable}" else servername="$(cat ${servercfgfullpath} | grep "ServerName=" | cut -c13- | rev | cut -c3- | rev)" - maxplayers="$(cat ${servercfgfullpath} | grep "MaxPlayers=" | cut -c12-)" + maxplayers="$(cat ${servercfgfullpath} | grep "MaxPlayers=" | cut -c12- | tr -cd '[:digit:]')" fi if [ ! -f "${servercfgdir}/Rcon.cfg" ]; then rconport=${unavailable} rconpassword=${unavailable} else - rconport=$(cat ${servercfgdir}/Rcon.cfg | grep "Port=" | cut -c6-) - rconpassword=$(cat ${servercfgdir}/Rcon.cfg | grep "Password=" | cut -c6-) - if [ -z "${rconpassword}" ]; then - rconpassword="${cyan}DISABLED${default}" + rconport=$(cat ${servercfgdir}/Rcon.cfg | grep "Port=" | cut -c6- | tr -cd '[:digit:]') + rconpassword=$(cat ${servercfgdir}/Rcon.cfg | grep "Password=" | cut -c10-) + if [ -z "${rconpassword}" ]||[ ${#rconpassword} == 1 ]; then + rconpassword="${yellow}DISABLED${default}" fi fi } From 559ace3bab92b0a1f23ec75bc3667929e9557ce7 Mon Sep 17 00:00:00 2001 From: Scarsz Date: Fri, 26 May 2017 20:40:34 -0700 Subject: [PATCH 158/216] remove duplicate entry in command_install for Squad don't code tired, boys --- lgsm/functions/command_install.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/lgsm/functions/command_install.sh b/lgsm/functions/command_install.sh index 092496b01..f344cc598 100644 --- a/lgsm/functions/command_install.sh +++ b/lgsm/functions/command_install.sh @@ -38,8 +38,6 @@ elif [ "${gamename}" == "TeamSpeak 3" ]; then install_ts3db.sh elif [ "${gamename}" == "Multi Theft Auto" ]; then command_install_resources_mta.sh -elif [ "${gamename}" == "Squad" ]; then - install_squad_license.sh fi fix.sh From b54daa0484d26a1fe71b934feef5ac3aad4aae4a Mon Sep 17 00:00:00 2001 From: Scarsz Date: Fri, 26 May 2017 20:49:33 -0700 Subject: [PATCH 159/216] add missing $ oops --- Squad/squadserver | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Squad/squadserver b/Squad/squadserver index 964b9b0ea..3c3d04a0e 100644 --- a/Squad/squadserver +++ b/Squad/squadserver @@ -31,7 +31,7 @@ ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters fn_parms(){ -parms="MULTIHOME=${ip} PORT=${port} QueryPort=${queryport} FIXEDMAXPLAYERS=${fixedmaxplayers} RANDOM={randommapmode}" +parms="MULTIHOME=${ip} PORT=${port} QueryPort=${queryport} FIXEDMAXPLAYERS=${fixedmaxplayers} RANDOM=${randommapmode}" } #### LinuxGSM Settings #### From f97fc6a7eaf9e1f17d01ef845a00c0841ac677f9 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 27 May 2017 10:48:45 +0100 Subject: [PATCH 160/216] Removed girhub branch --- lgsm/config-default/config-lgsm/mtaserver/_default.cfg | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg index e78730fb6..909565c46 100644 --- a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg @@ -11,7 +11,7 @@ ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters # Edit with care fn_parms(){ -parms=" " +parms="" } #### LinuxGSM Settings #### @@ -39,13 +39,6 @@ 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="Multi Theft Auto" From 4599551e27097f03119141251c4f6d2f82c749b4 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 27 May 2017 11:11:55 +0100 Subject: [PATCH 161/216] Changed to serverfies --- .../config-default/config-lgsm/csczserver/_default.cfg | 4 ++-- lgsm/config-default/config-lgsm/cssserver/_default.cfg | 4 ++-- lgsm/config-default/config-lgsm/dabserver/_default.cfg | 4 ++-- lgsm/config-default/config-lgsm/dmcserver/_default.cfg | 4 ++-- lgsm/config-default/config-lgsm/dodserver/_default.cfg | 4 ++-- .../config-default/config-lgsm/dodsserver/_default.cfg | 4 ++-- lgsm/config-default/config-lgsm/doiserver/_default.cfg | 4 ++-- lgsm/config-default/config-lgsm/dstserver/_default.cfg | 4 ++-- lgsm/config-default/config-lgsm/emserver/_default.cfg | 4 ++-- .../config-default/config-lgsm/fctrserver/_default.cfg | 10 +++++----- lgsm/config-default/config-lgsm/fofserver/_default.cfg | 4 ++-- lgsm/config-default/config-lgsm/gesserver/_default.cfg | 4 ++-- .../config-default/config-lgsm/gmodserver/_default.cfg | 4 ++-- .../config-lgsm/hl2dmserver/_default.cfg | 4 ++-- .../config-default/config-lgsm/hldmserver/_default.cfg | 4 ++-- .../config-lgsm/hldmsserver/_default.cfg | 4 ++-- lgsm/config-default/config-lgsm/hwserver/_default.cfg | 6 +++--- lgsm/config-default/config-lgsm/insserver/_default.cfg | 4 ++-- lgsm/config-default/config-lgsm/jc2server/_default.cfg | 6 +++--- lgsm/config-default/config-lgsm/kfserver/_default.cfg | 2 +- .../config-default/config-lgsm/l4d2server/_default.cfg | 4 ++-- lgsm/config-default/config-lgsm/l4dserver/_default.cfg | 4 ++-- lgsm/config-default/config-lgsm/mcserver/_default.cfg | 10 +++++----- lgsm/config-default/config-lgsm/mtaserver/_default.cfg | 4 ++-- .../config-lgsm/mumbleserver/_default.cfg | 6 +++--- .../config-lgsm/nmrihserver/_default.cfg | 4 ++-- .../config-default/config-lgsm/ns2cserver/_default.cfg | 4 ++-- lgsm/config-default/config-lgsm/ns2server/_default.cfg | 4 ++-- .../config-lgsm/opforserver/_default.cfg | 4 ++-- lgsm/config-default/config-lgsm/pcserver/_default.cfg | 4 ++-- .../config-lgsm/pvkiiserver/_default.cfg | 4 ++-- lgsm/config-default/config-lgsm/pzserver/_default.cfg | 4 ++-- lgsm/config-default/config-lgsm/q2server/_default.cfg | 6 +++--- lgsm/config-default/config-lgsm/q3server/_default.cfg | 8 ++++---- lgsm/config-default/config-lgsm/qlserver/_default.cfg | 6 +++--- lgsm/config-default/config-lgsm/qwserver/_default.cfg | 4 ++-- .../config-lgsm/ricochetserver/_default.cfg | 4 ++-- lgsm/config-default/config-lgsm/roserver/_default.cfg | 4 ++-- .../config-default/config-lgsm/rustserver/_default.cfg | 6 +++--- lgsm/config-default/config-lgsm/sbserver/_default.cfg | 8 ++++---- lgsm/config-default/config-lgsm/ss3server/_default.cfg | 4 ++-- .../config-default/config-lgsm/svenserver/_default.cfg | 4 ++-- .../config-lgsm/terrariaserver/_default.cfg | 6 +++--- lgsm/config-default/config-lgsm/tf2server/_default.cfg | 4 ++-- lgsm/config-default/config-lgsm/tfcserver/_default.cfg | 4 ++-- lgsm/config-default/config-lgsm/ts3server/_default.cfg | 8 ++++---- lgsm/config-default/config-lgsm/tuserver/_default.cfg | 2 +- lgsm/config-default/config-lgsm/twserver/_default.cfg | 4 ++-- .../config-lgsm/ut2k4server/_default.cfg | 2 +- lgsm/config-default/config-lgsm/ut3server/_default.cfg | 2 +- .../config-default/config-lgsm/ut99server/_default.cfg | 4 ++-- lgsm/config-default/config-lgsm/utserver/_default.cfg | 4 ++-- lgsm/config-default/config-lgsm/wetserver/_default.cfg | 6 +++--- 53 files changed, 122 insertions(+), 122 deletions(-) diff --git a/lgsm/config-default/config-lgsm/csczserver/_default.cfg b/lgsm/config-default/config-lgsm/csczserver/_default.cfg index b1a3ea20a..3f1a44c15 100644 --- a/lgsm/config-default/config-lgsm/csczserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csczserver/_default.cfg @@ -69,8 +69,8 @@ servicename="cscz-server" # Edit with care ## Server Specific Directories -systemdir="${filesdir}/czero" -executabledir="${filesdir}" +systemdir="${serverfiles}/czero" +executabledir="${serverfiles}" executable="./hlds_run" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" diff --git a/lgsm/config-default/config-lgsm/cssserver/_default.cfg b/lgsm/config-default/config-lgsm/cssserver/_default.cfg index 4d898a416..485bba577 100644 --- a/lgsm/config-default/config-lgsm/cssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/cssserver/_default.cfg @@ -71,8 +71,8 @@ engine="source" # Edit with care ## Server Specific Directories -systemdir="${filesdir}/cstrike" -executabledir="${filesdir}" +systemdir="${serverfiles}/cstrike" +executabledir="${serverfiles}" executable="./srcds_run" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" diff --git a/lgsm/config-default/config-lgsm/dabserver/_default.cfg b/lgsm/config-default/config-lgsm/dabserver/_default.cfg index 276b112f3..3d00db3a2 100644 --- a/lgsm/config-default/config-lgsm/dabserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dabserver/_default.cfg @@ -66,8 +66,8 @@ engine="source" # Edit with care ## Server Specific Directories -systemdir="${filesdir}/dab" -executabledir="${filesdir}" +systemdir="${serverfiles}/dab" +executabledir="${serverfiles}" executable="./dabds.sh" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" diff --git a/lgsm/config-default/config-lgsm/dmcserver/_default.cfg b/lgsm/config-default/config-lgsm/dmcserver/_default.cfg index 2bf28c698..e5b32111f 100644 --- a/lgsm/config-default/config-lgsm/dmcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dmcserver/_default.cfg @@ -66,8 +66,8 @@ engine="goldsource" # Edit with care ## Server Specific Directories -systemdir="${filesdir}/dmc" -executabledir="${filesdir}" +systemdir="${serverfiles}/dmc" +executabledir="${serverfiles}" executable="./hlds_run" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" diff --git a/lgsm/config-default/config-lgsm/dodserver/_default.cfg b/lgsm/config-default/config-lgsm/dodserver/_default.cfg index b943c41a3..8d16ea264 100644 --- a/lgsm/config-default/config-lgsm/dodserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodserver/_default.cfg @@ -66,8 +66,8 @@ engine="goldsource" # Edit with care ## Server Specific Directories -systemdir="${filesdir}/dod" -executabledir="${filesdir}" +systemdir="${serverfiles}/dod" +executabledir="${serverfiles}" executable="./hlds_run" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" diff --git a/lgsm/config-default/config-lgsm/dodsserver/_default.cfg b/lgsm/config-default/config-lgsm/dodsserver/_default.cfg index f40ef5451..f4bf101c1 100644 --- a/lgsm/config-default/config-lgsm/dodsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodsserver/_default.cfg @@ -66,8 +66,8 @@ engine="source" # Edit with care ## Server Specific Directories -systemdir="${filesdir}/dod" -executabledir="${filesdir}" +systemdir="${serverfiles}/dod" +executabledir="${serverfiles}" executable="./srcds_run" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" diff --git a/lgsm/config-default/config-lgsm/doiserver/_default.cfg b/lgsm/config-default/config-lgsm/doiserver/_default.cfg index 6652f72d9..f32e6137e 100644 --- a/lgsm/config-default/config-lgsm/doiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/doiserver/_default.cfg @@ -68,8 +68,8 @@ engine="source" # Edit with care ## Server Specific Directories -systemdir="${filesdir}/doi" -executabledir="${filesdir}" +systemdir="${serverfiles}/doi" +executabledir="${serverfiles}" executable="./srcds_run" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" diff --git a/lgsm/config-default/config-lgsm/dstserver/_default.cfg b/lgsm/config-default/config-lgsm/dstserver/_default.cfg index 204b9443a..9a9f964c9 100644 --- a/lgsm/config-default/config-lgsm/dstserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dstserver/_default.cfg @@ -72,8 +72,8 @@ servicename="dst-server-${shard}" # Edit with care ## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}/bin" +systemdir="${serverfiles}" +executabledir="${serverfiles}/bin" executable="./dontstarve_dedicated_server_nullrenderer" clustercfg="cluster.ini" clustercfgdir="${persistentstorageroot}/${confdir}/${cluster}" diff --git a/lgsm/config-default/config-lgsm/emserver/_default.cfg b/lgsm/config-default/config-lgsm/emserver/_default.cfg index 4faa1aeb6..e818e87de 100644 --- a/lgsm/config-default/config-lgsm/emserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/emserver/_default.cfg @@ -71,8 +71,8 @@ engine="source" # Edit with care ## Server Specific Directories -systemdir="${filesdir}/empires" -executabledir="${filesdir}" +systemdir="${serverfiles}/empires" +executabledir="${serverfiles}" executable="./srcds_run" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" diff --git a/lgsm/config-default/config-lgsm/fctrserver/_default.cfg b/lgsm/config-default/config-lgsm/fctrserver/_default.cfg index a7b0da679..ff9d72db1 100644 --- a/lgsm/config-default/config-lgsm/fctrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/fctrserver/_default.cfg @@ -16,7 +16,7 @@ rconpassword="CHANGE_ME" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters fn_parms(){ -parms="--start-server ${filesdir}/save1.zip --server-settings ${servercfgfullpath} --port ${port} --rcon-port ${rconport} --rcon-password ${rconpassword}" +parms="--start-server ${serverfiles}/save1.zip --server-settings ${servercfgfullpath} --port ${port} --rcon-port ${rconport} --rcon-password ${rconpassword}" } #### LinuxGSM Settings #### @@ -56,19 +56,19 @@ engine="factorio" # Edit with care ## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}/bin/x64" +systemdir="${serverfiles}" +executabledir="${serverfiles}/bin/x64" executable="./factorio" servercfg="${servicename}.json" servercfgdefault="server-settings.json" -servercfgdir="${filesdir}/data" +servercfgdir="${serverfiles}/data" servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory backupdir="${rootdir}/backups" ## Logging Directories -gamelogdir="${filesdir}" +gamelogdir="${serverfiles}" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${servicename}-script.log" diff --git a/lgsm/config-default/config-lgsm/fofserver/_default.cfg b/lgsm/config-default/config-lgsm/fofserver/_default.cfg index 3d9b9f977..eacb85911 100644 --- a/lgsm/config-default/config-lgsm/fofserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/fofserver/_default.cfg @@ -66,8 +66,8 @@ engine="source" # Edit with care ## Server Specific Directories -systemdir="${filesdir}/fof" -executabledir="${filesdir}" +systemdir="${serverfiles}/fof" +executabledir="${serverfiles}" executable="./srcds_run" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" diff --git a/lgsm/config-default/config-lgsm/gesserver/_default.cfg b/lgsm/config-default/config-lgsm/gesserver/_default.cfg index f469b6ab8..8faf185e1 100644 --- a/lgsm/config-default/config-lgsm/gesserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/gesserver/_default.cfg @@ -65,8 +65,8 @@ engine="source" # Edit with care ## Server Specific Directories -systemdir="${filesdir}/gesource" -executabledir="${filesdir}" +systemdir="${serverfiles}/gesource" +executabledir="${serverfiles}" executable="./srcds_run" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" diff --git a/lgsm/config-default/config-lgsm/gmodserver/_default.cfg b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg index 2a57cf06f..d04ccbfdb 100644 --- a/lgsm/config-default/config-lgsm/gmodserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg @@ -81,9 +81,9 @@ engine="source" # Edit with care ## Server Specific Directories -systemdir="${filesdir}/garrysmod" +systemdir="${serverfiles}/garrysmod" addonsdir="${systemdir}/addons" -executabledir="${filesdir}" +executabledir="${serverfiles}" executable="./srcds_run" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" diff --git a/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg index ec4ecd9e5..d26929139 100644 --- a/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg @@ -66,8 +66,8 @@ engine="source" # Edit with care ## Server Specific Directories -systemdir="${filesdir}/hl2mp" -executabledir="${filesdir}" +systemdir="${serverfiles}/hl2mp" +executabledir="${serverfiles}" executable="./srcds_run" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" diff --git a/lgsm/config-default/config-lgsm/hldmserver/_default.cfg b/lgsm/config-default/config-lgsm/hldmserver/_default.cfg index 7f01e865d..ca3c9a228 100644 --- a/lgsm/config-default/config-lgsm/hldmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hldmserver/_default.cfg @@ -65,8 +65,8 @@ engine="goldsource" # Edit with care ## Server Specific Directories -systemdir="${filesdir}/valve" -executabledir="${filesdir}" +systemdir="${serverfiles}/valve" +executabledir="${serverfiles}" executable="./hlds_run" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" diff --git a/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg b/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg index ba4144d2c..446e0545e 100644 --- a/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg @@ -66,8 +66,8 @@ engine="source" # Edit with care ## Server Specific Directories -systemdir="${filesdir}/hl1mp" -executabledir="${filesdir}" +systemdir="${serverfiles}/hl1mp" +executabledir="${serverfiles}" executable="./srcds_run" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" diff --git a/lgsm/config-default/config-lgsm/hwserver/_default.cfg b/lgsm/config-default/config-lgsm/hwserver/_default.cfg index fb496fbb5..69f0dacc6 100644 --- a/lgsm/config-default/config-lgsm/hwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hwserver/_default.cfg @@ -86,11 +86,11 @@ lgsmdir="${rootdir}/lgsm" functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" +serverfiles="${rootdir}/serverfiles" ## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" +systemdir="${serverfiles}" +executabledir="${serverfiles}" if [ "${x64mode}" == "1" ]; then executable="./Hurtworld.x86_64" else diff --git a/lgsm/config-default/config-lgsm/insserver/_default.cfg b/lgsm/config-default/config-lgsm/insserver/_default.cfg index c8918645d..94102ad1a 100644 --- a/lgsm/config-default/config-lgsm/insserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/insserver/_default.cfg @@ -68,8 +68,8 @@ engine="source" # Edit with care ## Server Specific Directories -systemdir="${filesdir}/insurgency" -executabledir="${filesdir}" +systemdir="${serverfiles}/insurgency" +executabledir="${serverfiles}" executable="./srcds_run" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" diff --git a/lgsm/config-default/config-lgsm/jc2server/_default.cfg b/lgsm/config-default/config-lgsm/jc2server/_default.cfg index 3d358bc2b..3c5ef330a 100644 --- a/lgsm/config-default/config-lgsm/jc2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jc2server/_default.cfg @@ -58,12 +58,12 @@ engine="avalanche" # Edit with care ## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" +systemdir="${serverfiles}" +executabledir="${serverfiles}" executable="./Jcmp-Server" servercfg="config.lua" servercfgdefault="config.lua" -servercfgdir="${filesdir}" +servercfgdir="${serverfiles}" servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory diff --git a/lgsm/config-default/config-lgsm/kfserver/_default.cfg b/lgsm/config-default/config-lgsm/kfserver/_default.cfg index 6142eb4ec..982e6a6a1 100644 --- a/lgsm/config-default/config-lgsm/kfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/kfserver/_default.cfg @@ -70,7 +70,7 @@ engine="unreal2" # Edit with care ## Server Specific Directories -systemdir="${filesdir}/System" +systemdir="${serverfiles}/System" executabledir="${systemdir}" executable="./ucc-bin" servercfg="${servicename}.ini" diff --git a/lgsm/config-default/config-lgsm/l4d2server/_default.cfg b/lgsm/config-default/config-lgsm/l4d2server/_default.cfg index 9c9046c02..17448efda 100644 --- a/lgsm/config-default/config-lgsm/l4d2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/l4d2server/_default.cfg @@ -65,8 +65,8 @@ engine="source" # Edit with care ## Server Specific Directories -systemdir="${filesdir}/left4dead2" -executabledir="${filesdir}" +systemdir="${serverfiles}/left4dead2" +executabledir="${serverfiles}" executable="./srcds_run" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" diff --git a/lgsm/config-default/config-lgsm/l4dserver/_default.cfg b/lgsm/config-default/config-lgsm/l4dserver/_default.cfg index 73c940e20..6c558a8af 100644 --- a/lgsm/config-default/config-lgsm/l4dserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/l4dserver/_default.cfg @@ -65,8 +65,8 @@ engine="source" # Edit with care ## Server Specific Directories -systemdir="${filesdir}/left4dead" -executabledir="${filesdir}" +systemdir="${serverfiles}/left4dead" +executabledir="${serverfiles}" executable="./srcds_run" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" diff --git a/lgsm/config-default/config-lgsm/mcserver/_default.cfg b/lgsm/config-default/config-lgsm/mcserver/_default.cfg index c23547386..03527e7a6 100644 --- a/lgsm/config-default/config-lgsm/mcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mcserver/_default.cfg @@ -57,15 +57,15 @@ selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" lgsmdir="${rootdir}/lgsm" functionsdir="${lgsmdir}/functions" -filesdir="${rootdir}/serverfiles" +serverfiles="${rootdir}/serverfiles" ## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" -executable="java -Xmx${javaram}M -jar ${filesdir}/minecraft_server.jar" +systemdir="${serverfiles}" +executabledir="${serverfiles}" +executable="java -Xmx${javaram}M -jar ${serverfiles}/minecraft_server.jar" servercfg="server.properties" servercfgdefault="server.properties" -servercfgdir="${filesdir}" +servercfgdir="${serverfiles}" servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory diff --git a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg index 909565c46..7dad5a1c8 100644 --- a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg @@ -48,7 +48,7 @@ engine="renderware" # Edit with care ## Server Specific Directories -systemdir="${filesdir}" +systemdir="${serverfiles}" resourcesdir="${systemdir}/mods/deathmatch/resources" executabledir="${systemdir}" executable="./mta-server64" @@ -61,7 +61,7 @@ backupdir="${rootdir}/backups" ## Logging Directories logdir="${rootdir}/log" -gamelogdir="${filesdir}/mods/deathmatch/logs" +gamelogdir="${serverfiles}/mods/deathmatch/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${servicename}-script.log" diff --git a/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg b/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg index aece97398..40d127f6b 100644 --- a/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg @@ -50,12 +50,12 @@ gamename="Mumble" # Edit with care ## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" +systemdir="${serverfiles}" +executabledir="${serverfiles}" executable="./murmur.x86" servercfg="${servicename}.ini" servercfgdefault="murmur.ini" -servercfgdir="${filesdir}" +servercfgdir="${serverfiles}" servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory diff --git a/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg b/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg index e033af129..388614101 100644 --- a/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg @@ -71,8 +71,8 @@ engine="source" # Edit with care ## Server Specific Directories -systemdir="${filesdir}/nmrih" -executabledir="${filesdir}" +systemdir="${serverfiles}/nmrih" +executabledir="${serverfiles}" executable="./srcds_run" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" diff --git a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg index 252e20729..a5bacf18d 100644 --- a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg @@ -77,8 +77,8 @@ engine="spark" # Edit with care ## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}/ia32" +systemdir="${serverfiles}" +executabledir="${serverfiles}/ia32" executable="./ns2combatserver_linux32" servercfgdir="${rootdir}/server1" servercfgfullpath="${servercfgdir}" diff --git a/lgsm/config-default/config-lgsm/ns2server/_default.cfg b/lgsm/config-default/config-lgsm/ns2server/_default.cfg index 6b058c288..9c40ed3a9 100644 --- a/lgsm/config-default/config-lgsm/ns2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2server/_default.cfg @@ -77,8 +77,8 @@ engine="spark" # Edit with care ## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" +systemdir="${serverfiles}" +executabledir="${serverfiles}" executable="./server_linux32" servercfgdir="${rootdir}/server1" servercfgfullpath="${servercfgdir}" diff --git a/lgsm/config-default/config-lgsm/opforserver/_default.cfg b/lgsm/config-default/config-lgsm/opforserver/_default.cfg index a61a4b4d2..f5ea12e1b 100644 --- a/lgsm/config-default/config-lgsm/opforserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/opforserver/_default.cfg @@ -66,8 +66,8 @@ engine="goldsource" # Edit with care ## Server Specific Directories -systemdir="${filesdir}/gearbox" -executabledir="${filesdir}" +systemdir="${serverfiles}/gearbox" +executabledir="${serverfiles}" executable="./hlds_run" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" diff --git a/lgsm/config-default/config-lgsm/pcserver/_default.cfg b/lgsm/config-default/config-lgsm/pcserver/_default.cfg index e0398c448..337940261 100644 --- a/lgsm/config-default/config-lgsm/pcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pcserver/_default.cfg @@ -59,8 +59,8 @@ engine="madness" # Edit with care ## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" +systemdir="${serverfiles}" +executabledir="${serverfiles}" executable="./DedicatedServerCmd" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" diff --git a/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg b/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg index 32888b654..09424358e 100644 --- a/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg @@ -66,8 +66,8 @@ engine="source" # Edit with care ## Server Specific Directories -systemdir="${filesdir}/pvkii" -executabledir="${filesdir}" +systemdir="${serverfiles}/pvkii" +executabledir="${serverfiles}" executable="./srcds_run" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" diff --git a/lgsm/config-default/config-lgsm/pzserver/_default.cfg b/lgsm/config-default/config-lgsm/pzserver/_default.cfg index 004bb6378..a1542cf7c 100644 --- a/lgsm/config-default/config-lgsm/pzserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pzserver/_default.cfg @@ -61,8 +61,8 @@ engine="projectzomboid" # Edit with care ## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" +systemdir="${serverfiles}" +executabledir="${serverfiles}" executable="./start-server.sh" servercfg="${servicename}.ini" servercfgdefault="server.ini" diff --git a/lgsm/config-default/config-lgsm/q2server/_default.cfg b/lgsm/config-default/config-lgsm/q2server/_default.cfg index 5abcaa974..b9530b05e 100644 --- a/lgsm/config-default/config-lgsm/q2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/q2server/_default.cfg @@ -52,8 +52,8 @@ engine="idtech2" # Edit with care ## Server Specific Directories -systemdir="${filesdir}/baseq2" -executabledir="${filesdir}" +systemdir="${serverfiles}/baseq2" +executabledir="${serverfiles}" executable="./quake2" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" @@ -65,7 +65,7 @@ backupdir="${rootdir}/backups" ## Logging Directories logdir="${rootdir}/log" -gamelogdir="${filesdir}/Logs" +gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${servicename}-script.log" diff --git a/lgsm/config-default/config-lgsm/q3server/_default.cfg b/lgsm/config-default/config-lgsm/q3server/_default.cfg index 028d45229..026bbfc7a 100644 --- a/lgsm/config-default/config-lgsm/q3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/q3server/_default.cfg @@ -15,7 +15,7 @@ defaultmap="q3dm17" ## 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}" +parms="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 1 +set com_hunkMegs 32 +set net_ip ${ip} +set net_port ${port} +exec ${servercfg} +map ${defaultmap}" } #### LinuxGSM Settings #### @@ -52,8 +52,8 @@ engine="idtech3" # Edit with care ## Server Specific Directories -systemdir="${filesdir}/baseq3" -executabledir="${filesdir}" +systemdir="${serverfiles}/baseq3" +executabledir="${serverfiles}" executable="./q3ded" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" @@ -65,7 +65,7 @@ backupdir="${rootdir}/backups" ## Logging Directories logdir="${rootdir}/log" -gamelogdir="${filesdir}/Logs" +gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${servicename}-script.log" diff --git a/lgsm/config-default/config-lgsm/qlserver/_default.cfg b/lgsm/config-default/config-lgsm/qlserver/_default.cfg index 22ef3204f..a7fc888ee 100644 --- a/lgsm/config-default/config-lgsm/qlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/qlserver/_default.cfg @@ -63,12 +63,12 @@ engine="idtech3_ql" # Edit with care ## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" +systemdir="${serverfiles}" +executabledir="${serverfiles}" executable=$([ "${arch}" == 'x64' ] && echo "./run_server_x64.sh" || echo "./run_server_x86.sh") servercfg="${servicename}.cfg" servercfgdefault="server.cfg" -servercfgdir="${filesdir}/baseq3" +servercfgdir="${serverfiles}/baseq3" servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory diff --git a/lgsm/config-default/config-lgsm/qwserver/_default.cfg b/lgsm/config-default/config-lgsm/qwserver/_default.cfg index 04eb9a69a..f22983a4d 100644 --- a/lgsm/config-default/config-lgsm/qwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/qwserver/_default.cfg @@ -51,8 +51,8 @@ engine="quake" # Edit with care ## Server Specific Directories -systemdir="${filesdir}/ktx" -executabledir="${filesdir}" +systemdir="${serverfiles}/ktx" +executabledir="${serverfiles}" executable="./mvdsv" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" diff --git a/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg b/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg index c0301588d..6779cb2eb 100644 --- a/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg @@ -85,8 +85,8 @@ engine="goldsource" # Edit with care ## Server Specific Directories -systemdir="${filesdir}/ricochet" -executabledir="${filesdir}" +systemdir="${serverfiles}/ricochet" +executabledir="${serverfiles}" executable="./hlds_run" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" diff --git a/lgsm/config-default/config-lgsm/roserver/_default.cfg b/lgsm/config-default/config-lgsm/roserver/_default.cfg index f0c1ac587..a076a8243 100644 --- a/lgsm/config-default/config-lgsm/roserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/roserver/_default.cfg @@ -75,8 +75,8 @@ libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" ## Server Specific Directories -filesdir="${rootdir}/serverfiles" -systemdir="${filesdir}/system" +serverfiles="${rootdir}/serverfiles" +systemdir="${serverfiles}/system" executabledir="${systemdir}" executable="./ucc-bin" servercfg="${servicename}.ini" diff --git a/lgsm/config-default/config-lgsm/rustserver/_default.cfg b/lgsm/config-default/config-lgsm/rustserver/_default.cfg index 9d898f131..74176bd96 100644 --- a/lgsm/config-default/config-lgsm/rustserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rustserver/_default.cfg @@ -89,11 +89,11 @@ lgsmdir="${rootdir}/lgsm" functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" +serverfiles="${rootdir}/serverfiles" ## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" +systemdir="${serverfiles}" +executabledir="${serverfiles}" executable="./RustDedicated" serveridentitydir="${systemdir}/server/${servicename}" servercfg="server.cfg" diff --git a/lgsm/config-default/config-lgsm/sbserver/_default.cfg b/lgsm/config-default/config-lgsm/sbserver/_default.cfg index 3a1a5989f..634434a1c 100644 --- a/lgsm/config-default/config-lgsm/sbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbserver/_default.cfg @@ -65,12 +65,12 @@ engine="starbound" # Edit with care ## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}/linux" +systemdir="${serverfiles}" +executabledir="${serverfiles}/linux" executable="./starbound_server" servercfg="starbound_server.config" servercfgdefault="starbound_server.config" -servercfgdir="${filesdir}/storage" +servercfgdir="${serverfiles}/storage" servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory @@ -78,7 +78,7 @@ backupdir="${rootdir}/backups" ## Logging Directories logdir="${rootdir}/log" -gamelogdir="${filesdir}/storage" +gamelogdir="${serverfiles}/storage" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${servicename}-script.log" diff --git a/lgsm/config-default/config-lgsm/ss3server/_default.cfg b/lgsm/config-default/config-lgsm/ss3server/_default.cfg index fadf636cc..399fb82ac 100644 --- a/lgsm/config-default/config-lgsm/ss3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ss3server/_default.cfg @@ -62,12 +62,12 @@ engine="seriousengine35" # Edit with care ## Server Specific Directories -systemdir="${filesdir}/Bin" +systemdir="${serverfiles}/Bin" executable="./runSam3_DedicatedServer.sh" executabledir="${systemdir}" servercfg="${servicename}.ini" servercfgdefault="server.ini" -servercfgdir="${filesdir}/Content/SeriousSam3/Config" +servercfgdir="${serverfiles}/Content/SeriousSam3/Config" servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory diff --git a/lgsm/config-default/config-lgsm/svenserver/_default.cfg b/lgsm/config-default/config-lgsm/svenserver/_default.cfg index 720f1248c..8d5f4d37b 100644 --- a/lgsm/config-default/config-lgsm/svenserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/svenserver/_default.cfg @@ -65,8 +65,8 @@ engine="goldsource" # Edit with care ## Server Specific Directories -systemdir="${filesdir}/svencoop" -executabledir="${filesdir}" +systemdir="${serverfiles}/svencoop" +executabledir="${serverfiles}" executable="./svends_run" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" diff --git a/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg b/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg index 1cf4f0570..60c3500ac 100644 --- a/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg @@ -65,12 +65,12 @@ engine="terraria" # Edit with care ## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" +systemdir="${serverfiles}" +executabledir="${serverfiles}" executable="./TerrariaServer" servercfg="${servicename}.txt" servercfgdefault="serverconfig.txt" -servercfgdir="${filesdir}" +servercfgdir="${serverfiles}" servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory diff --git a/lgsm/config-default/config-lgsm/tf2server/_default.cfg b/lgsm/config-default/config-lgsm/tf2server/_default.cfg index fca2e5bc1..549cc75b7 100644 --- a/lgsm/config-default/config-lgsm/tf2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/tf2server/_default.cfg @@ -71,8 +71,8 @@ engine="source" # Edit with care ## Server Specific Directories -systemdir="${filesdir}/tf" -executabledir="${filesdir}" +systemdir="${serverfiles}/tf" +executabledir="${serverfiles}" executable="./srcds_run" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" diff --git a/lgsm/config-default/config-lgsm/tfcserver/_default.cfg b/lgsm/config-default/config-lgsm/tfcserver/_default.cfg index 2f7a9dd97..94036e218 100644 --- a/lgsm/config-default/config-lgsm/tfcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tfcserver/_default.cfg @@ -66,8 +66,8 @@ engine="goldsource" # Edit with care ## Server Specific Directories -systemdir="${filesdir}/tfc" -executabledir="${filesdir}" +systemdir="${serverfiles}/tfc" +executabledir="${serverfiles}" executable="./hlds_run" servercfg="${servicename}.cfg" servercfgdefault="server.cfg" diff --git a/lgsm/config-default/config-lgsm/ts3server/_default.cfg b/lgsm/config-default/config-lgsm/ts3server/_default.cfg index 487254215..192d8be34 100644 --- a/lgsm/config-default/config-lgsm/ts3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ts3server/_default.cfg @@ -46,12 +46,12 @@ servername="TeamSpeak 3 Server" # Edit with care ## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" +systemdir="${serverfiles}" +executabledir="${serverfiles}" executable="./ts3server_startscript.sh" servercfg="${servicename}.ini" servercfgdefault="ts3server.ini" -servercfgdir="${filesdir}" +servercfgdir="${serverfiles}" servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory @@ -59,7 +59,7 @@ backupdir="${rootdir}/backups" ## Logging Directories logdir="${rootdir}/log" -gamelogdir="${filesdir}/Logs" +gamelogdir="${serverfiles}/Logs" scriptlogdir="${rootdir}/log/script" scriptlog="${scriptlogdir}/${servicename}-script.log" emaillog="${scriptlogdir}/${servicename}-email.log" diff --git a/lgsm/config-default/config-lgsm/tuserver/_default.cfg b/lgsm/config-default/config-lgsm/tuserver/_default.cfg index f92175880..4c53d4e7b 100644 --- a/lgsm/config-default/config-lgsm/tuserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tuserver/_default.cfg @@ -63,7 +63,7 @@ engine="unreal4" # Edit with care ## Server Specific Directories -systemdir="${filesdir}/Tower" +systemdir="${serverfiles}/Tower" executabledir="${systemdir}/Binaries/Linux" executable="./TowerServer-Linux-Shipping" servercfgdir="${systemdir}/Binaries/Linux" diff --git a/lgsm/config-default/config-lgsm/twserver/_default.cfg b/lgsm/config-default/config-lgsm/twserver/_default.cfg index 59b843bc0..8d2b0b3b3 100644 --- a/lgsm/config-default/config-lgsm/twserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/twserver/_default.cfg @@ -65,12 +65,12 @@ engine="teeworlds" # Edit with care ## Server Specific Directories -systemdir="${filesdir}/tw" +systemdir="${serverfiles}/tw" executabledir="${systemdir}" executable="./teeworlds_srv" servercfg="${servicename}.cfg" # Teeworlds can also auto load any config if an autoexec.cfg file is present in the server dir servercfgdefault="server.cfg" -servercfgdir="${filesdir}" +servercfgdir="${serverfiles}" servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory diff --git a/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg index e6e88a063..ab9bc3e48 100644 --- a/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg @@ -51,7 +51,7 @@ engine="unreal2" # Edit with care ## Server Specific Directories -systemdir="${filesdir}/System" +systemdir="${serverfiles}/System" executabledir="${systemdir}" executable="./ucc-bin" servercfg="${servicename}.ini" diff --git a/lgsm/config-default/config-lgsm/ut3server/_default.cfg b/lgsm/config-default/config-lgsm/ut3server/_default.cfg index fbc0c0c4b..bb896fd80 100644 --- a/lgsm/config-default/config-lgsm/ut3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut3server/_default.cfg @@ -63,7 +63,7 @@ engine="unreal3" # Edit with care ## Server Specific Directories -systemdir="${filesdir}" +systemdir="${serverfiles}" executabledir="${systemdir}/Binaries" executable="./ut3" servercfg="${servicename}.ini" diff --git a/lgsm/config-default/config-lgsm/ut99server/_default.cfg b/lgsm/config-default/config-lgsm/ut99server/_default.cfg index ff405ee3f..cc1e29ae6 100644 --- a/lgsm/config-default/config-lgsm/ut99server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut99server/_default.cfg @@ -51,7 +51,7 @@ engine="unreal" # Edit with care ## Server Specific Directories -systemdir="${filesdir}/System" +systemdir="${serverfiles}/System" executabledir="${systemdir}" executable="./ucc-bin" servercfg="${servicename}.ini" @@ -65,7 +65,7 @@ backupdir="${rootdir}/backups" ## Logging Directories logdir="${rootdir}/log" -gamelogdir="${filesdir}/Logs" +gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${servicename}-script.log" diff --git a/lgsm/config-default/config-lgsm/utserver/_default.cfg b/lgsm/config-default/config-lgsm/utserver/_default.cfg index dfeb0ad9d..6f9451913 100644 --- a/lgsm/config-default/config-lgsm/utserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/utserver/_default.cfg @@ -55,7 +55,7 @@ engine="unreal4" # Edit with care ## Server Specific Directories -systemdir="${filesdir}/LinuxServer" +systemdir="${serverfiles}/LinuxServer" executabledir="${systemdir}/Engine/Binaries/Linux" executable="./UE4Server-Linux-Shipping" servercfg="Game.ini" @@ -67,7 +67,7 @@ backupdir="${rootdir}/backups" ## Logging Directories logdir="${rootdir}/log" -gamelogdir="${filesdir}/Logs" +gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${servicename}-script.log" diff --git a/lgsm/config-default/config-lgsm/wetserver/_default.cfg b/lgsm/config-default/config-lgsm/wetserver/_default.cfg index a8e98871e..29e60593a 100644 --- a/lgsm/config-default/config-lgsm/wetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wetserver/_default.cfg @@ -10,7 +10,7 @@ ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters fn_parms(){ - parms="+set net_strict 1 +set fs_homepath ${filesdir} +exec ${servercfg}" + parms="+set net_strict 1 +set fs_homepath ${serverfiles} +exec ${servercfg}" } #### LinuxGSM Settings #### @@ -47,7 +47,7 @@ engine="idtech3" # Edit with care ## Server Specific Directories -systemdir="${filesdir}" +systemdir="${serverfiles}" executabledir="${systemdir}" executable="./etded" servercfg="${servicename}.cfg" @@ -60,7 +60,7 @@ backupdir="${rootdir}/backups" ## Logging Directories logdir="${rootdir}/log" -gamelogdir="${filesdir}/Logs" +gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${servicename}-script.log" From 0e45d156a72e8e8350c32a0ed078892c03a7485b Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 27 May 2017 11:24:05 +0100 Subject: [PATCH 162/216] missing bracket --- lgsm/functions/info_parms.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/lgsm/functions/info_parms.sh b/lgsm/functions/info_parms.sh index d1bdd5b41..72151a0e3 100644 --- a/lgsm/functions/info_parms.sh +++ b/lgsm/functions/info_parms.sh @@ -38,6 +38,7 @@ fn_info_parms_dst(){ shard=${shard:-"NOT SET"} cluster=${cluster:-"NOT SET"} cave=${cave:-"NOT SET"} +} fn_info_parms_factorio(){ port=${port:-"0"} From 15be75d42d86a5c270cc1b0124528c6716652fe6 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 27 May 2017 11:34:33 +0100 Subject: [PATCH 163/216] github_file_url_dir was being changed if _default.cfg was downloaded --- lgsm/functions/command_update_linuxgsm.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/functions/command_update_linuxgsm.sh index a91781c1b..69b60bab2 100644 --- a/lgsm/functions/command_update_linuxgsm.sh +++ b/lgsm/functions/command_update_linuxgsm.sh @@ -77,6 +77,7 @@ if [ -n "${functionsdir}" ]; then for functionfile in * do echo -ne " checking function ${functionfile}...\c" + github_file_url_dir="lgsm/functions" get_function_file=$(${curlpath} --fail -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}") exitcode=$? function_file_diff=$(diff "${functionsdir}/${functionfile}" <(${curlpath} --fail -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}")) From f4c133ddf29a8b617887ebde504c8620c61c920a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 27 May 2017 11:43:14 +0100 Subject: [PATCH 164/216] Corrected backup dir location --- lgsm/functions/command_update_linuxgsm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/functions/command_update_linuxgsm.sh index 69b60bab2..92334ffe4 100644 --- a/lgsm/functions/command_update_linuxgsm.sh +++ b/lgsm/functions/command_update_linuxgsm.sh @@ -52,7 +52,7 @@ if [ -z "${legacymode}" ];then core_exit.sh else fn_print_ok_eol_nl - echo -e " Backup: ${tmpdir}/${selfname}-$(date +"%m_%d_%Y_%M").bak" + echo -e " Backup: ${backupdir}/script/${selfname}-$(date +"%m_%d_%Y_%M").bak" fi echo -ne " fetching ${selfname}...\c" cp "${tmpdir}/linuxgsm.sh" "${rootdir}/${selfname}" From 55bc729d1c5fdef382651a27606f816eb1c9bf43 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 27 May 2017 11:55:53 +0100 Subject: [PATCH 165/216] serverlist.csv is now only in the tmp dir --- linuxgsm.sh | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index 0d52bec24..e32a89dce 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -261,24 +261,12 @@ fi # LinuxGSM installer mode if [ "${shortname}" == "core" ]; then userinput=$1 - datadir="${lgsmdir}/data" + datadir="${tmpdir}/data" serverlist="${datadir}/serverlist.csv" - serverlist_tmp="${tmpdir}/data/serverlist.csv" # Download the serverlist. This is the complete list of all supported servers. # Download to tmp dir - fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${tmpdir}/data" "serverlist.csv" "nochmodx" "norun" "noforcedl" "nomd5" - # if missing in lgsm dir copy it across - if [ ! -f "${serverlist}" ]; then - mkdir -p "${datadir}" - cp -R "${serverlist_tmp}" "${serverlist}" - # check if the files are different. - else - file_diff=$(diff -q "${serverlist_tmp}" "${serverlist}") - if [ "${file_diff}" != "" ]; then - cp -Rf "${serverlist_tmp}" "${serverlist}" - fi - fi + fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "serverlist.csv" "nochmodx" "norun" "noforcedl" "nomd5" if [ ! -f "${serverlist}" ]; then echo "[ FAIL ] serverlist.csv could not be loaded." @@ -291,7 +279,7 @@ if [ "${shortname}" == "core" ]; then } | column -s $'\t' -t | more exit elif [ "${userinput}" == "install" ]; then - fn_install_menu result "LinuxGSM" "Select game to install" "lgsm/data/serverlist.csv" + fn_install_menu result "LinuxGSM" "Select game to install" "${serverlist}" userinput="${result}" fn_server_info if [ "${result}" == "${servername}" ]; then From 874b1bf4bf170f344e98cfc7f192d7bba058d1e8 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 27 May 2017 12:01:29 +0100 Subject: [PATCH 166/216] added rm to remove any existing serverlist --- linuxgsm.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index e32a89dce..1c0eb3664 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -265,9 +265,11 @@ if [ "${shortname}" == "core" ]; then serverlist="${datadir}/serverlist.csv" # Download the serverlist. This is the complete list of all supported servers. - # Download to tmp dir - fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "serverlist.csv" "nochmodx" "norun" "noforcedl" "nomd5" + if [ -f "${serverlist}" ]; then + rm "${serverlist}" + fi + fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "serverlist.csv" "nochmodx" "norun" "noforcedl" "nomd5" if [ ! -f "${serverlist}" ]; then echo "[ FAIL ] serverlist.csv could not be loaded." exit 1 From cd23d0db05b922c6f8f2f904285854f545557742 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 27 May 2017 12:25:48 +0100 Subject: [PATCH 167/216] Changed message if servefiles already exists --- linuxgsm.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index 1c0eb3664..1c76c2e11 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -243,7 +243,12 @@ fn_install_file(){ sed -i -e "s/shortname=\"core\"/shortname=\"${shortname}\"/g" "${local_filename}" sed -i -e "s/servername=\"core\"/servername=\"${servername}\"/g" "${local_filename}" echo "Installed ${gamename} server as ${local_filename}" - echo "./${local_filename} install" + echo "" + if [ ! -d "${serverfiles}" ]; then + echo "./${local_filename} install" + else + echo "Remember to check server ports" + echo "./${local_filename} details" exit } From b48db02ec2bf122e1d5e405696c2d2e6960c2742 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 27 May 2017 21:07:55 +0100 Subject: [PATCH 168/216] missing if --- linuxgsm.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linuxgsm.sh b/linuxgsm.sh index 1c76c2e11..97f1a7621 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -249,6 +249,8 @@ fn_install_file(){ else echo "Remember to check server ports" echo "./${local_filename} details" + fi + echo "" exit } From 115aaf210fb4649a84d6e8146c793a7144df730c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 27 May 2017 21:08:30 +0100 Subject: [PATCH 169/216] Updated logging dirs --- lgsm/config-default/config-lgsm/ut2k4server/_default.cfg | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg index ab9bc3e48..805cfb6af 100644 --- a/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg @@ -64,15 +64,16 @@ compressedmapsdir="${rootdir}/Maps-Compressed" backupdir="${rootdir}/backups" ## Logging Directories +logdir="${rootdir}/log" gamelogdir="${rootdir}/log/server" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -gamelog="${gamelogdir}/${servicename}-game.log" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${lgsmlogdir}/${servicename}-email.log" ## Logs Naming +gamelog="${gamelogdir}/${servicename}-game.log" lgsmlogdate="${lgsmlogdir}/${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" From 4c184b973b26755ec36bd9df000be45a0a236fac Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 27 May 2017 21:26:25 +0100 Subject: [PATCH 170/216] update var names local_filedir local_filename --- lgsm/functions/core_dl.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index 7509b9223..a566c4c98 100644 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -61,9 +61,9 @@ fn_dl_extract(){ if [ "${mime}" == "application/gzip" ]||[ "${mime}" == "application/x-gzip" ]; then extractcmd=$(tar -zxf "${local_filedir}/${local_filename}" -C "${extractdir}") elif [ "${mime}" == "application/x-bzip2" ]; then - tarcmd=$(tar -jxf "${filedir}/${filename}" -C "${extractdir}") + tarcmd=$(tar -jxf "${local_filedir}/${local_filename}" -C "${extractdir}") elif [ "${mime}" == "application/x-xz" ]; then - tarcmd=$(tar -xf "${filedir}/${filename}" -C "${extractdir}") + tarcmd=$(tar -xf "${local_filedir}/${local_filename}" -C "${extractdir}") elif [ "${mime}" == "application/zip" ]; then extractcmd=$(unzip -d "${extractdir}" "${local_filedir}/${local_filename}") fi From 6a3f54bf7c5be0bbdfc50e5f86c66a0daced8228 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 27 May 2017 21:48:55 +0100 Subject: [PATCH 171/216] Now prevents IP check from running on installer this prevents issues with ut2k4server requiring restarts on install --- lgsm/functions/check.sh | 4 +++- lgsm/functions/command_install.sh | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lgsm/functions/check.sh b/lgsm/functions/check.sh index c8e17cb05..196b748e0 100644 --- a/lgsm/functions/check.sh +++ b/lgsm/functions/check.sh @@ -65,7 +65,9 @@ local allowed_commands_array=( command_debug.sh command_details.sh command_monit for allowed_command in "${allowed_commands_array[@]}" do if [ "${allowed_command}" == "${function_selfname}" ]; then - check_ip.sh + if [ -z "${installflag}" ]; then + check_ip.sh + fi fi done diff --git a/lgsm/functions/command_install.sh b/lgsm/functions/command_install.sh index f344cc598..0a4f03cee 100644 --- a/lgsm/functions/command_install.sh +++ b/lgsm/functions/command_install.sh @@ -14,6 +14,7 @@ install_header.sh install_server_dir.sh install_logs.sh check_deps.sh +installflag=1 # Download and install if [ "${gamename}" == "Unreal Tournament 2004" ]; then install_server_files.sh From eb921cb64e789144222bb0b805b0df3a190e4e22 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 27 May 2017 22:48:32 +0100 Subject: [PATCH 172/216] consistancy --- lgsm/functions/command_console.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lgsm/functions/command_console.sh b/lgsm/functions/command_console.sh index dd17de843..f25138add 100644 --- a/lgsm/functions/command_console.sh +++ b/lgsm/functions/command_console.sh @@ -38,7 +38,8 @@ else fn_script_log_error "Failed to access: Server not running" sleep 1 if fn_prompt_yn "Do you want to start the server?" Y; then - exitbypass=1; command_start.sh + exitbypass=1 + command_start.sh fi fi From b8bfebbd49a27b268fe23050d2cd328e78c818f9 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 27 May 2017 22:48:53 +0100 Subject: [PATCH 173/216] Fixing issues with ut2k4server restart not working --- lgsm/functions/command_start.sh | 6 +++++- lgsm/functions/fix_ut2k4.sh | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lgsm/functions/command_start.sh b/lgsm/functions/command_start.sh index 0c8d30395..231947a35 100644 --- a/lgsm/functions/command_start.sh +++ b/lgsm/functions/command_start.sh @@ -29,7 +29,11 @@ fn_start_teamspeak3(){ if [ "${status}" != "0" ]; then fn_print_info_nl "${servername} is already running" fn_script_log_error "${servername} is already running" - core_exit.sh + if [ "${exitbypass}" ]; then + exit + else + core_exit.sh + fi fi if [ -f "${lgsmlog}" ]; then mv "${lgsmlog}" "${lgsmlogdate}" diff --git a/lgsm/functions/fix_ut2k4.sh b/lgsm/functions/fix_ut2k4.sh index ae0088315..1957ac251 100644 --- a/lgsm/functions/fix_ut2k4.sh +++ b/lgsm/functions/fix_ut2k4.sh @@ -21,9 +21,13 @@ echo "applying server name fix." sleep 1 echo "forcing server restart..." sleep 1 +exitbypass=1 command_start.sh sleep 5 +exitbypass=1 command_stop.sh +exitbypass=1 command_start.sh sleep 5 +exitbypass=1 command_stop.sh \ No newline at end of file From 74d22a839d7b10b1a9f6712ff66493eee693766d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 27 May 2017 22:58:23 +0100 Subject: [PATCH 174/216] Fixing issues with ut2k4server restart not working --- lgsm/functions/command_start.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lgsm/functions/command_start.sh b/lgsm/functions/command_start.sh index 231947a35..44b705082 100644 --- a/lgsm/functions/command_start.sh +++ b/lgsm/functions/command_start.sh @@ -29,9 +29,7 @@ fn_start_teamspeak3(){ if [ "${status}" != "0" ]; then fn_print_info_nl "${servername} is already running" fn_script_log_error "${servername} is already running" - if [ "${exitbypass}" ]; then - exit - else + if [ -z "${exitbypass}" ]; then core_exit.sh fi fi @@ -92,7 +90,9 @@ fn_start_tmux(){ if [ "${status}" != "0" ]; then fn_print_info_nl "${servername} is already running" fn_script_log_error "${servername} is already running" - core_exit.sh + if [ -z "${exitbypass}" ]; then + core_exit.sh + fi fi # Create lockfile From ebb0e38592cf5d8458317513253c3d27193addf5 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 27 May 2017 23:06:34 +0100 Subject: [PATCH 175/216] updated message --- lgsm/functions/check_ip.sh | 7 ++++--- lgsm/functions/fix_ut2k4.sh | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lgsm/functions/check_ip.sh b/lgsm/functions/check_ip.sh index c9b5ce97f..b76616ea2 100644 --- a/lgsm/functions/check_ip.sh +++ b/lgsm/functions/check_ip.sh @@ -25,12 +25,13 @@ if [ "${gamename}" != "TeamSpeak 3" ]&&[ "${gamename}" != "Mumble" ]&&[ "${travi sleep 1 echo -en "\n" if [ "${ipsetinconfig}" == "1" ]; then - fn_print_information "Specify the IP you want to use within the server config file ${servercfg}.\n" + fn_print_information "Specify the IP you want to use within the game server config file ${servercfg}.\n" echo -en "${servercfgfullpath}\n" echo -en "Set ${ipinconfigvar} to one of the following:\n" else - fn_print_information "Specify the IP you want to use within the LinuxGSM config file." - echo -en "Location: ${configdir}\n" + fn_print_information_nl "Specify the IP you want to use within a LinuxGSM config file." + echo -en "location: ${configdir}\n" + echo "" echo -en "Set ip=\"0.0.0.0\" to one of the following:\n" fi echo -en "${getip}\n" diff --git a/lgsm/functions/fix_ut2k4.sh b/lgsm/functions/fix_ut2k4.sh index 1957ac251..e55a3a88b 100644 --- a/lgsm/functions/fix_ut2k4.sh +++ b/lgsm/functions/fix_ut2k4.sh @@ -19,7 +19,7 @@ sed -i 's/CharSet="iso-8859-1"/CharSet="utf-8"/g' "${systemdir}/UWeb.int" sleep 1 echo "applying server name fix." sleep 1 -echo "forcing server restart..." +echo "forcing server restart." sleep 1 exitbypass=1 command_start.sh From 6f9e00098e8c78427f435283353dec4154b07afa Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 27 May 2017 23:08:47 +0100 Subject: [PATCH 176/216] Corrected configdir location --- lgsm/functions/check_ip.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/check_ip.sh b/lgsm/functions/check_ip.sh index b76616ea2..622b617dd 100644 --- a/lgsm/functions/check_ip.sh +++ b/lgsm/functions/check_ip.sh @@ -30,7 +30,7 @@ if [ "${gamename}" != "TeamSpeak 3" ]&&[ "${gamename}" != "Mumble" ]&&[ "${travi echo -en "Set ${ipinconfigvar} to one of the following:\n" else fn_print_information_nl "Specify the IP you want to use within a LinuxGSM config file." - echo -en "location: ${configdir}\n" + echo -en "location: ${configdirserver}\n" echo "" echo -en "Set ip=\"0.0.0.0\" to one of the following:\n" fi From 58e76e523dff8bfb6562ccf964ab81edb7e5d650 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 27 May 2017 23:25:14 +0100 Subject: [PATCH 177/216] spelling --- lgsm/functions/logs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/logs.sh b/lgsm/functions/logs.sh index 6e877140c..7d7dbcebe 100644 --- a/lgsm/functions/logs.sh +++ b/lgsm/functions/logs.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com -# Description: Acts as a log rotater, removing old logs. +# Description: Acts as a log rotator, removing old logs. local commandname="LOGS" local commandaction="Log-Manager" From e3c9b7bfe9b751ddf987db2316b2f19921d7dca3 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 27 May 2017 23:43:03 +0100 Subject: [PATCH 178/216] Added missing queryport for unreal --- lgsm/functions/info_config.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 8ff581e23..54c27cc16 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -573,6 +573,7 @@ fn_info_config_unreal(){ serverpassword="${unavailable}" adminpassword="${unavailable}" port="${zero}" + queryport="${zero}" gsqueryport="${zero}" webadminenabled="${unavailable}" webadminport="${zero}" @@ -583,6 +584,7 @@ fn_info_config_unreal(){ serverpassword=$(grep "GamePassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/GamePassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') adminpassword=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') port=$(grep "Port" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' | grep "^Port" | grep -v "#" | tr -cd '[:digit:]') + queryport=$((port + 1)) gsqueryport=$(grep "OldQueryPortNumber" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') webadminenabled=$(grep "bEnabled" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bEnabled//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') webadminport=$(grep "ListenPort" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') From 4559cee10cd297ebc75a70b16e0e35c3d993a37f Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 27 May 2017 23:43:17 +0100 Subject: [PATCH 179/216] removed if [ "${gsquery}" == "yes" ]; then not sure why this is still here --- lgsm/functions/monitor_gsquery.sh | 127 +++++++++++++++--------------- 1 file changed, 62 insertions(+), 65 deletions(-) diff --git a/lgsm/functions/monitor_gsquery.sh b/lgsm/functions/monitor_gsquery.sh index f5bbdb6f6..56fe70a47 100644 --- a/lgsm/functions/monitor_gsquery.sh +++ b/lgsm/functions/monitor_gsquery.sh @@ -9,81 +9,78 @@ local commandname="MONITOR" local commandaction="Monitor" local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -if [ "${gsquery}" == "yes" ]; then +# Downloads gsquery.py if missing +if [ ! -f "${functionsdir}/gsquery.py" ]; then + fn_fetch_file_github "lgsm/functions" "gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nomd5" +fi - # Downloads gsquery.py if missing - if [ ! -f "${functionsdir}/gsquery.py" ]; then - fn_fetch_file_github "lgsm/functions" "gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nomd5" - fi +info_config.sh - info_config.sh +if [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then + port=$((port + 1)) +elif [ "${engine}" == "realvirtuality" ]; then + port=$((port + 1)) +elif [ "${engine}" == "spark" ]; then + port=$((port + 1)) +elif [ "${engine}" == "idtech3_ql" ]; then + engine="quakelive" +fi - if [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then - port=$((port + 1)) - elif [ "${engine}" == "realvirtuality" ]; then - port=$((port + 1)) - elif [ "${engine}" == "spark" ]; then - port=$((port + 1)) - elif [ "${engine}" == "idtech3_ql" ]; then - engine="quakelive" - fi +if [ -n "${queryport}" ]; then + port="${queryport}" +fi - if [ -n "${queryport}" ]; then - port="${queryport}" - fi +fn_print_info "Querying port: gsquery.py enabled" +fn_script_log_info "Querying port: gsquery.py enabled" +sleep 1 - fn_print_info "Querying port: gsquery.py enabled" - fn_script_log_info "Querying port: gsquery.py enabled" - sleep 1 +# Will query up to 4 times every 15 seconds. +# Servers changing map can return a failure. +# Will Wait up to 60 seconds to confirm server is down giving server time to change map. +totalseconds=0 +for queryattempt in {1..5}; do + fn_print_dots "Querying port: ${ip}:${port} : ${totalseconds}/${queryattempt} : " + fn_print_querying_eol + fn_script_log_info "Querying port: ${ip}:${port} : ${queryattempt} : QUERYING" - # Will query up to 4 times every 15 seconds. - # Servers changing map can return a failure. - # Will Wait up to 60 seconds to confirm server is down giving server time to change map. - totalseconds=0 - for queryattempt in {1..5}; do - fn_print_dots "Querying port: ${ip}:${port} : ${totalseconds}/${queryattempt} : " - fn_print_querying_eol - fn_script_log_info "Querying port: ${ip}:${port} : ${queryattempt} : QUERYING" + gsquerycmd=$("${functionsdir}"/gsquery.py -a "${ip}" -p "${port}" -e "${engine}" 2>&1) + exitcode=$? - gsquerycmd=$("${functionsdir}"/gsquery.py -a "${ip}" -p "${port}" -e "${engine}" 2>&1) - exitcode=$? + sleep 1 + if [ "${exitcode}" == "0" ]; then + # Server OK + fn_print_ok "Querying port: ${ip}:${port} : ${queryattempt} : " + fn_print_ok_eol_nl + fn_script_log_pass "Querying port: ${ip}:${port} : ${queryattempt} : OK" + exitcode=0 + break + else + # Server failed query + fn_script_log_info "Querying port: ${ip}:${port} : ${queryattempt} : ${gsquerycmd}" - sleep 1 - if [ "${exitcode}" == "0" ]; then - # Server OK - fn_print_ok "Querying port: ${ip}:${port} : ${queryattempt} : " - fn_print_ok_eol_nl - fn_script_log_pass "Querying port: ${ip}:${port} : ${queryattempt} : OK" - exitcode=0 - break - else - # Server failed query - fn_script_log_info "Querying port: ${ip}:${port} : ${queryattempt} : ${gsquerycmd}" + if [ "${queryattempt}" == "5" ]; then + # Server failed query 4 times confirmed failure + fn_print_fail "Querying port: ${ip}:${port} : ${totalseconds}/${queryattempt} : " + fn_print_fail_eol_nl + fn_script_log_error "Querying port: ${ip}:${port} : ${queryattempt} : FAIL" + sleep 1 - if [ "${queryattempt}" == "5" ]; then - # Server failed query 4 times confirmed failure - fn_print_fail "Querying port: ${ip}:${port} : ${totalseconds}/${queryattempt} : " - fn_print_fail_eol_nl - fn_script_log_error "Querying port: ${ip}:${port} : ${queryattempt} : FAIL" - sleep 1 + # Send alert if enabled + alert="restartquery" + alert.sh + command_restart.sh + break + fi - # Send alert if enabled - alert="restartquery" - alert.sh - command_restart.sh + # Seconds counter + for seconds in {1..15}; do + fn_print_fail "Querying port: ${ip}:${port} : ${totalseconds}/${queryattempt} : ${red}${gsquerycmd}${default}" + totalseconds=$((totalseconds + 1)) + sleep 1 + if [ "${seconds}" == "15" ]; then break fi - - # Seconds counter - for seconds in {1..15}; do - fn_print_fail "Querying port: ${ip}:${port} : ${totalseconds}/${queryattempt} : ${red}${gsquerycmd}${default}" - totalseconds=$((totalseconds + 1)) - sleep 1 - if [ "${seconds}" == "15" ]; then - break - fi - done - fi - done -fi + done + fi +done core_exit.sh \ No newline at end of file From 8eee5a94b5782da179345807c1bdf4646ad25ce3 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 28 May 2017 00:41:18 +0100 Subject: [PATCH 180/216] FIxing logging dirs --- lgsm/config-default/config-lgsm/qlserver/_default.cfg | 7 ++++--- lgsm/config-default/config-lgsm/roserver/_default.cfg | 7 ++++--- lgsm/config-default/config-lgsm/ss3server/_default.cfg | 7 ++++--- .../config-lgsm/terrariaserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/twserver/_default.cfg | 7 ++++--- lgsm/config-default/config-lgsm/ut3server/_default.cfg | 8 +++++--- 6 files changed, 22 insertions(+), 15 deletions(-) diff --git a/lgsm/config-default/config-lgsm/qlserver/_default.cfg b/lgsm/config-default/config-lgsm/qlserver/_default.cfg index a7fc888ee..e73a5ec6d 100644 --- a/lgsm/config-default/config-lgsm/qlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/qlserver/_default.cfg @@ -75,11 +75,12 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${rootdir}/backups" ## Logging Directories +logdir="${rootdir}/log" gamelogdir="${rootdir}/log/server" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -gamelog="${gamelogdir}/${servicename}-game.log" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${servicename}-script.log" +gamelog="${gamelogdir}/${servicename}-game.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${lgsmlogdir}/${servicename}-email.log" diff --git a/lgsm/config-default/config-lgsm/roserver/_default.cfg b/lgsm/config-default/config-lgsm/roserver/_default.cfg index a076a8243..52fe3273f 100644 --- a/lgsm/config-default/config-lgsm/roserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/roserver/_default.cfg @@ -89,11 +89,12 @@ compressedmapsdir="${rootdir}/Maps-Compressed" backupdir="${rootdir}/backups" ## Logging Directories +logdir="${rootdir}/log" gamelogdir="${rootdir}/log/server" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -gamelog="${gamelogdir}/${servicename}-game.log" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${servicename}-script.log" +gamelog="${gamelogdir}/${servicename}-game.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${lgsmlogdir}/${servicename}-email.log" diff --git a/lgsm/config-default/config-lgsm/ss3server/_default.cfg b/lgsm/config-default/config-lgsm/ss3server/_default.cfg index 399fb82ac..a34ccc4f2 100644 --- a/lgsm/config-default/config-lgsm/ss3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ss3server/_default.cfg @@ -74,11 +74,12 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${rootdir}/backups" ## Logging Directories +logdir="${rootdir}/log" gamelogdir="${rootdir}/log/server" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -gamelog="${gamelogdir}/${servicename}-game.log" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${servicename}-script.log" +gamelog="${gamelogdir}/${servicename}-game.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${lgsmlogdir}/${servicename}-email.log" diff --git a/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg b/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg index 60c3500ac..b18d76440 100644 --- a/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg @@ -77,6 +77,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${rootdir}/backups" ## Logging Directories +logdir="${rootdir}/log" #gamelogdir="" # No server logs available lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/twserver/_default.cfg b/lgsm/config-default/config-lgsm/twserver/_default.cfg index 8d2b0b3b3..759bb9e6b 100644 --- a/lgsm/config-default/config-lgsm/twserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/twserver/_default.cfg @@ -77,11 +77,12 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${rootdir}/backups" ## Logging Directories +logdir="${rootdir}/log" gamelogdir="${rootdir}/log/server" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -gamelog="${gamelogdir}/${servicename}-game.log" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${servicename}-script.log" +gamelog="${gamelogdir}/${servicename}-game.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${lgsmlogdir}/${servicename}-email.log" diff --git a/lgsm/config-default/config-lgsm/ut3server/_default.cfg b/lgsm/config-default/config-lgsm/ut3server/_default.cfg index bb896fd80..1dbb05849 100644 --- a/lgsm/config-default/config-lgsm/ut3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut3server/_default.cfg @@ -75,15 +75,17 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${rootdir}/backups" ## Logging Directories +logdir="${rootdir}/log" gamelogdir="${rootdir}/log/server" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" -gamelog="${gamelogdir}/${servicename}-game.log" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${servicename}-script.log" +gamelog="${gamelogdir}/${servicename}-game.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${lgsmlogdir}/${servicename}-email.log" ## Logs Naming + lgsmlogdate="${lgsmlogdir}/${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" \ No newline at end of file From 1c4860301952c799cee92894dda12f3fcd68e476 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 28 May 2017 01:05:07 +0100 Subject: [PATCH 181/216] QuakeLive Port stats were missing --- lgsm/functions/info_config.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 54c27cc16..670ae79ff 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -169,6 +169,7 @@ fn_info_config_dontstarve(){ gamemode=$(grep "game_mode" "${clustercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/game_mode//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') tickrate=$(grep "tick_rate" "${clustercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') masterport=$(grep "master_port" "${clustercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + ip=$(grep "bind_ip" "${clustercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bind_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') ipsetinconfig=1 ipinconfigvar="bind_ip" @@ -307,11 +308,12 @@ fn_info_config_quakeworld(){ servername="${unavailable}" serverpassword="${unavailable}" maxplayers="${zero}" + port="${zero}" else rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') maxplayers=$(grep "maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - + port= # Not Set rconpassword=${rconpassword:-"NOT SET"} servername=${servername:-"NOT SET"} @@ -363,11 +365,17 @@ fn_info_config_quakelive(){ servername="${unavailable}" serverpassword="${unavailable}" maxplayers="${zero}" + port="${zero}" + rconport="${zero}" + statsport="${zero}" else rconpassword=$(grep "zmq_rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set zmq_rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') serverpassword=$(grep "g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') maxplayers=$(grep "sv_maxClients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + port=$(grep "net_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + rconport=$(grep "zmq_rcon_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + statsport=$(grep "zmq_stats_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') ip=$(grep "set net_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set net_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') ipsetinconfig=1 @@ -378,6 +386,9 @@ fn_info_config_quakelive(){ servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} maxplayers=${maxplayers:-"0"} + port=${port:-"0"} + rconport=${rconport:-"0"} + statsport=${statsport:-"0"} fi } @@ -601,6 +612,7 @@ fn_info_config_unreal(){ serverpassword=${serverpassword:-"NOT SET"} adminpassword=${adminpassword:-"NOT SET"} port=${port:-"0"} + queryport=${queryport:-"0"} gsqueryport=${gsqueryport:-"0"} webadminenabled=${webadminenabled:-"NOT SET"} webadminport=${webadminport:-"0"} From b3498e421280e01cb6a1a90d718bd3edcab00931 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 28 May 2017 01:09:08 +0100 Subject: [PATCH 182/216] corrected comment filter --- lgsm/functions/info_config.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 670ae79ff..75ef93384 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -372,10 +372,10 @@ fn_info_config_quakelive(){ rconpassword=$(grep "zmq_rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set zmq_rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') serverpassword=$(grep "g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "sv_maxClients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - port=$(grep "net_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - rconport=$(grep "zmq_rcon_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - statsport=$(grep "zmq_stats_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + maxplayers=$(grep "sv_maxClients" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + port=$(grep "net_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + rconport=$(grep "zmq_rcon_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + statsport=$(grep "zmq_stats_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') ip=$(grep "set net_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set net_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') ipsetinconfig=1 From 518e2d2da03523bcf15bc2254ab7c7213301c372 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 28 May 2017 10:36:12 +0100 Subject: [PATCH 183/216] grep was bringing back multiple results --- linuxgsm.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index 97f1a7621..1edcaf1d2 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -210,7 +210,7 @@ fn_install_menu() { # Gets server info from serverlist.csv and puts in to array fn_server_info(){ IFS="," - server_info_array=($(grep -a "${userinput}" "${serverlist}")) + server_info_array=($(grep -w "${userinput}" "${serverlist}")) shortname="${server_info_array[0]}" # csgo servername="${server_info_array[1]}" # csgoserver gamename="${server_info_array[2]}" # Counter Strike: Global Offensive @@ -297,6 +297,8 @@ if [ "${shortname}" == "core" ]; then echo "Install canceled" else echo "[ FAIL ] menu result does not match servername" + echo "result: ${result}" + echo "servername: ${servername}" fi elif [ -n "${userinput}" ]; then fn_server_info From e4dbdb108f364ef03e2ff14824cc9fcbd4fe2afe Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 29 May 2017 09:58:40 +0100 Subject: [PATCH 184/216] gamelog --- .../config-lgsm/hwserver/_default.cfg | 13 ++++++++----- .../config-lgsm/ut2k4server/_default.cfg | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lgsm/config-default/config-lgsm/hwserver/_default.cfg b/lgsm/config-default/config-lgsm/hwserver/_default.cfg index 69f0dacc6..148115e07 100644 --- a/lgsm/config-default/config-lgsm/hwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hwserver/_default.cfg @@ -16,7 +16,7 @@ queryport="12881" maxplayers="20" defaultmap="" #Optional creativemode="0" #Free Build: creativemode="1" -logfile="gamelog.txt" +gamelog="gamelog.txt" ## Adding admins using STEAMID64 # Example : addadmin 012345678901234567; addadmin 987654321098765432 @@ -31,7 +31,7 @@ x64mode="0" ## 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} ${defaultmap} ${loadsave};queryport ${queryport};maxplayers ${maxplayers};servername ${servername};creativemode ${creativemode};${admins}\" -logfile \"${logfile}\" " +parms="-batchmode -nographics -exec \"host ${port} ${defaultmap} ${loadsave};queryport ${queryport};maxplayers ${maxplayers};servername ${servername};creativemode ${creativemode};${admins}\" -logfile \"${gamelog}\" " } #### LinuxGSM Settings #### @@ -101,14 +101,17 @@ fi backupdir="${rootdir}/backups" ## Logging Directories +logdir="${rootdir}/log" gamelogdir="${rootdir}/log/server" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" gamelog="${gamelogdir}/${servicename}-game.log" lgsmlog="${lgsmlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${lgsmlogdir}/${servicename}-email.log" ## Logs Naming +gamelogdate="${gamelogdir}/${servicename}-game-$(date '+%Y-%m-%d-%H:%M:%S').log" lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + diff --git a/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg index 805cfb6af..01dc64635 100644 --- a/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg @@ -68,12 +68,12 @@ logdir="${rootdir}/log" gamelogdir="${rootdir}/log/server" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" +gamelog="${gamelogdir}/${servicename}-game.log" lgsmlog="${lgsmlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${lgsmlogdir}/${servicename}-email.log" ## Logs Naming -gamelog="${gamelogdir}/${servicename}-game.log" lgsmlogdate="${lgsmlogdir}/${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" From 38c960e82ccb948a7de323d904b52ceab0671665 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 29 May 2017 10:07:46 +0100 Subject: [PATCH 185/216] Removed remainign work dirs --- lgsm/config-default/config-lgsm/hwserver/_default.cfg | 10 ---------- lgsm/config-default/config-lgsm/mcserver/_default.cfg | 8 -------- lgsm/config-default/config-lgsm/roserver/_default.cfg | 9 --------- .../config-default/config-lgsm/rustserver/_default.cfg | 10 ---------- 4 files changed, 37 deletions(-) diff --git a/lgsm/config-default/config-lgsm/hwserver/_default.cfg b/lgsm/config-default/config-lgsm/hwserver/_default.cfg index 148115e07..9e64dfd46 100644 --- a/lgsm/config-default/config-lgsm/hwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hwserver/_default.cfg @@ -78,16 +78,6 @@ engine="unity3d" #### Directories #### # Edit with care -## Work Directories -rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" -selfname=$(basename $(readlink -f "${BASH_SOURCE[0]}")) -lockselfname=".${servicename}.lock" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -serverfiles="${rootdir}/serverfiles" - ## Server Specific Directories systemdir="${serverfiles}" executabledir="${serverfiles}" diff --git a/lgsm/config-default/config-lgsm/mcserver/_default.cfg b/lgsm/config-default/config-lgsm/mcserver/_default.cfg index 03527e7a6..80a36ba01 100644 --- a/lgsm/config-default/config-lgsm/mcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mcserver/_default.cfg @@ -51,14 +51,6 @@ engine="lwjgl2" #### 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" -serverfiles="${rootdir}/serverfiles" - ## Server Specific Directories systemdir="${serverfiles}" executabledir="${serverfiles}" diff --git a/lgsm/config-default/config-lgsm/roserver/_default.cfg b/lgsm/config-default/config-lgsm/roserver/_default.cfg index 52fe3273f..157cebcba 100644 --- a/lgsm/config-default/config-lgsm/roserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/roserver/_default.cfg @@ -65,15 +65,6 @@ engine="unreal2" #### Directories #### # Edit with care -## Work Directories -rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" -selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -lockselfname=".${servicename}.lock" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" - ## Server Specific Directories serverfiles="${rootdir}/serverfiles" systemdir="${serverfiles}/system" diff --git a/lgsm/config-default/config-lgsm/rustserver/_default.cfg b/lgsm/config-default/config-lgsm/rustserver/_default.cfg index 74176bd96..efdea8c57 100644 --- a/lgsm/config-default/config-lgsm/rustserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rustserver/_default.cfg @@ -81,16 +81,6 @@ engine="unity3d" #### Directories #### # Edit with care -## Work Directories -rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" -selfname=$(basename $(readlink -f "${BASH_SOURCE[0]}")) -lockselfname=".${servicename}.lock" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -serverfiles="${rootdir}/serverfiles" - ## Server Specific Directories systemdir="${serverfiles}" executabledir="${serverfiles}" From fb0d75d829aef68c71fd7d19e5050743d6623ac6 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 29 May 2017 14:32:48 +0100 Subject: [PATCH 186/216] changed servername to gameservername as var already used --- linuxgsm.sh | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index 1edcaf1d2..4fe9e5672 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -18,7 +18,7 @@ fi version="170305" shortname="core" -servername="core" +gameservername="core" rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" servicename="${selfname}" @@ -31,7 +31,7 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" configdir="${lgsmdir}/config-lgsm" -configdirserver="${configdir}/${servername}" +configdirserver="${configdir}/${gameservername}" configdirdefault="${lgsmdir}/config-default" ## GitHub Branch Select @@ -212,7 +212,7 @@ fn_server_info(){ IFS="," server_info_array=($(grep -w "${userinput}" "${serverlist}")) shortname="${server_info_array[0]}" # csgo - servername="${server_info_array[1]}" # csgoserver + gameservername="${server_info_array[1]}" # csgoserver gamename="${server_info_array[2]}" # Counter Strike: Global Offensive } @@ -231,7 +231,7 @@ fn_install_getopt(){ } fn_install_file(){ - local_filename="${servername}" + local_filename="${gameservername}" if [ -e "${local_filename}" ]; then i=2 while [ -e "${local_filename}-${i}" ] ; do @@ -241,7 +241,7 @@ fn_install_file(){ fi cp -R "${selfname}" "${local_filename}" sed -i -e "s/shortname=\"core\"/shortname=\"${shortname}\"/g" "${local_filename}" - sed -i -e "s/servername=\"core\"/servername=\"${servername}\"/g" "${local_filename}" + sed -i -e "s/gameservername=\"core\"/gameservername=\"${gameservername}\"/g" "${local_filename}" echo "Installed ${gamename} server as ${local_filename}" echo "" if [ ! -d "${serverfiles}" ]; then @@ -291,18 +291,18 @@ if [ "${shortname}" == "core" ]; then fn_install_menu result "LinuxGSM" "Select game to install" "${serverlist}" userinput="${result}" fn_server_info - if [ "${result}" == "${servername}" ]; then + if [ "${result}" == "${gameservername}" ]; then fn_install_file elif [ "${result}" == "" ]; then echo "Install canceled" else - echo "[ FAIL ] menu result does not match servername" + echo "[ FAIL ] menu result does not match gameservername" echo "result: ${result}" - echo "servername: ${servername}" + echo "gameservername: ${gameservername}" fi elif [ -n "${userinput}" ]; then fn_server_info - if [ "${userinput}" == "${servername}" ]; then + if [ "${userinput}" == "${gameservername}" ]; then fn_install_file fi else @@ -316,14 +316,14 @@ else # Load LinuxGSM configs # These are required to get all the default variables for the specific server. # Load the default config. If missing download it. If changed reload it. - if [ ! -f "${configdirdefault}/config-lgsm/${servername}/_default.cfg" ]; then - mkdir -p "${configdirdefault}/config-lgsm/${servername}" - fn_fetch_config "lgsm/config-default/config-lgsm/${servername}" "_default.cfg" "${configdirdefault}/config-lgsm/${servername}" "_default.cfg" "nochmodx" "norun" "noforcedl" "nomd5" + if [ ! -f "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" ]; then + mkdir -p "${configdirdefault}/config-lgsm/${gameservername}" + fn_fetch_config "lgsm/config-default/config-lgsm/${gameservername}" "_default.cfg" "${configdirdefault}/config-lgsm/${gameservername}" "_default.cfg" "nochmodx" "norun" "noforcedl" "nomd5" fi if [ ! -f "${configdirserver}/_default.cfg" ]; then mkdir -p "${configdirserver}" echo -ne " copying _default.cfg...\c" - cp -R "${configdirdefault}/config-lgsm/${servername}/_default.cfg" "${configdirserver}/_default.cfg" + cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg" exitcode=$? if [ ${exitcode} -ne 0 ]; then echo -e "\e[0;31mFAIL\e[0m\n" @@ -332,11 +332,11 @@ else echo -e "\e[0;32mOK\e[0m" fi else - function_file_diff=$(diff -q ${configdirdefault}/config-lgsm/${servername}/_default.cfg ${configdirserver}/_default.cfg) + function_file_diff=$(diff -q ${configdirdefault}/config-lgsm/${gameservername}/_default.cfg ${configdirserver}/_default.cfg) if [ "${function_file_diff}" != "" ]; then fn_print_warn_nl "_default.cfg has been altered. reloading config." echo -ne " copying _default.cfg...\c" - cp -R "${configdirdefault}/config-lgsm/${servername}/_default.cfg" "${configdirserver}/_default.cfg" + cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg" exitcode=$? if [ ${exitcode} -ne 0 ]; then echo -e "\e[0;31mFAIL\e[0m\n" From 421fcd6972b74294f7d8f665bcab9f2127329f91 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 29 May 2017 14:38:49 +0100 Subject: [PATCH 187/216] Added hurtworld --- lgsm/functions/command_console.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/command_console.sh b/lgsm/functions/command_console.sh index f25138add..bbf215a96 100644 --- a/lgsm/functions/command_console.sh +++ b/lgsm/functions/command_console.sh @@ -10,10 +10,10 @@ local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" check.sh fn_print_header -if [ "${gamename}" == "Rust" ]; then +if [ "${gamename}" == "Rust" ]||[ "${gamename}" == "Hurtworld" ]; then fn_print_information_nl "${gamename} does not produce a verbose output to the console" fi -if [ "${gamename}" == "Rust" ]; then +if [ "${gamename}" == "Rust" ]||[ "${gamename}" == "Hurtworld" ]; then fn_print_information_nl "${gamename} does not allow server commands to be entered in to the console" fi fn_print_information_nl "Press \"CTRL+b\" then \"d\" to exit console." From 921450bab61cf940224ff417877ea054671794cf Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 29 May 2017 15:46:03 +0100 Subject: [PATCH 188/216] corrected project cars steam port details --- lgsm/functions/command_details.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index 687033740..4e5eb2eca 100644 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -533,7 +533,7 @@ fn_details_projectcars(){ echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" echo -e "> Game\tINBOUND\t${port}\tudp" echo -e "> Query\tINBOUND\t${queryport}\tudp" - echo -e "> Steam\tINBOUND\t${queryport}\tudp" + echo -e "> Steam\tINBOUND\t${steamport}\tudp" } | column -s $'\t' -t } From bc6eddb6323e18ad181157fde554e578d0d77e4f Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 29 May 2017 15:46:25 +0100 Subject: [PATCH 189/216] added madness engine to gsquery --- lgsm/functions/command_monitor.sh | 2 +- lgsm/functions/gsquery.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index cd12285cf..d940bea70 100644 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -79,7 +79,7 @@ fn_monitor_tmux(){ fn_print_ok_eol_nl fn_script_log_pass "Checking session: OK" # runs gsquery check on game with specific engines. - local allowed_engines_array=( avalanche goldsource idtech3 idtech3_ql iw2.0 iw3.0 quake refractor realvirtuality source spark unity3d unreal unreal2 ) + local allowed_engines_array=( avalanche goldsource idtech3 idtech3_ql iw2.0 iw3.0 madness quake refractor realvirtuality source spark unity3d unreal unreal2 ) for allowed_engine in "${allowed_engines_array[@]}" do if [ "${allowed_engine}" == "${engine}" ]; then diff --git a/lgsm/functions/gsquery.py b/lgsm/functions/gsquery.py index e1f5c3f77..40e6c2950 100644 --- a/lgsm/functions/gsquery.py +++ b/lgsm/functions/gsquery.py @@ -17,7 +17,7 @@ class PythonGSQ: self.server_response_timeout = 5 self.default_buffer_length = 1024 # - sourcequery=['quakelive','realvirtuality','refractor','source','goldsource','spark','unity3d'] + sourcequery=['madness','quakelive','realvirtuality','refractor','source','goldsource','spark','unity3d'] idtech2query=['idtech3','quake','iw3.0'] idtech3query=['idtech2','iw2.0'] if self.option.engine in sourcequery: From 4a2fef2e67bc6100dac4e66bf29fb54ede5ddcff Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 29 May 2017 15:59:38 +0100 Subject: [PATCH 190/216] changed servername to gameservername --- lgsm/functions/command_update_linuxgsm.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/functions/command_update_linuxgsm.sh index 92334ffe4..29f48a826 100644 --- a/lgsm/functions/command_update_linuxgsm.sh +++ b/lgsm/functions/command_update_linuxgsm.sh @@ -17,12 +17,12 @@ echo -ne "\n" if [ -z "${legacymode}" ];then # Check and update _default.cfg echo -ne " checking config _default.cfg...\c" - config_file_diff=$(diff "${configdirdefault}/config-lgsm/${servername}/_default.cfg" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${servername}/_default.cfg")) + config_file_diff=$(diff "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg")) if [ "${config_file_diff}" != "" ]; then fn_print_update_eol_nl fn_script_log_info "checking config _default.cfg: UPDATE" - rm -f "${configdirdefault}/config-lgsm/${servername}/_default.cfg" - fn_fetch_config "lgsm/config-default/config-lgsm/${servername}" "_default.cfg" "${configdirdefault}/config-lgsm/${servername}" "_default.cfg" "nochmodx" "norun" "noforce" "nomd5" + rm -f "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" + fn_fetch_config "lgsm/config-default/config-lgsm/${gameservername}" "_default.cfg" "${configdirdefault}/config-lgsm/${gameservername}" "_default.cfg" "nochmodx" "norun" "noforce" "nomd5" else fn_print_ok_eol_nl fn_script_log_info "checking config _default.cfg: OK" @@ -41,7 +41,7 @@ if [ -z "${legacymode}" ];then fn_print_ok_eol_nl fi echo -ne " checking ${selfname}...\c" - script_diff=$(diff <(sed '/shortname/d;/servername/d;/gamename/d' "${tmpdir}/linuxgsm.sh") <(sed '/shortname/d;/servername/d;/gamename/d' "${rootdir}/${selfname}")) + script_diff=$(diff <(sed '/shortname/d;/gameservername/d;/gamename/d' "${tmpdir}/linuxgsm.sh") <(sed '/shortname/d;/gameservername/d;/gamename/d' "${rootdir}/${selfname}")) if [ "${script_diff}" != "" ]; then fn_print_update_eol_nl echo -ne " backup ${selfname}...\c" @@ -57,7 +57,7 @@ if [ -z "${legacymode}" ];then echo -ne " fetching ${selfname}...\c" cp "${tmpdir}/linuxgsm.sh" "${rootdir}/${selfname}" sed -i "s/shortname=\"core\"/shortname=\"${shortname}\"/g" "${rootdir}/${selfname}" - sed -i "s/servername=\"core\"/servername=\"${servername}\"/g" "${rootdir}/${selfname}" + sed -i "s/gameservername=\"core\"/gameservername=\"${gameservername}\"/g" "${rootdir}/${selfname}" sed -i "s/gamename=\"core\"/gamename=\"${gamename}\"/g" "${rootdir}/${selfname}" if [ $? -ne 0 ]; then fn_print_fail_eol_nl From be4a807219961c7bb3221c26269a29ee95da5f17 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 29 May 2017 16:27:11 +0100 Subject: [PATCH 191/216] updated log dir vars --- lgsm/config-default/config-lgsm/doiserver/_default.cfg | 4 ++-- lgsm/config-default/config-lgsm/hwserver/_default.cfg | 2 +- lgsm/config-default/config-lgsm/kfserver/_default.cfg | 6 +++--- lgsm/config-default/config-lgsm/qlserver/_default.cfg | 2 +- lgsm/config-default/config-lgsm/roserver/_default.cfg | 2 +- lgsm/config-default/config-lgsm/rustserver/_default.cfg | 2 +- lgsm/config-default/config-lgsm/ss3server/_default.cfg | 2 +- lgsm/config-default/config-lgsm/ts3server/_default.cfg | 2 +- lgsm/config-default/config-lgsm/twserver/_default.cfg | 2 +- lgsm/config-default/config-lgsm/ut2k4server/_default.cfg | 2 +- lgsm/config-default/config-lgsm/ut3server/_default.cfg | 2 +- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lgsm/config-default/config-lgsm/doiserver/_default.cfg b/lgsm/config-default/config-lgsm/doiserver/_default.cfg index f32e6137e..c58a526bd 100644 --- a/lgsm/config-default/config-lgsm/doiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/doiserver/_default.cfg @@ -82,8 +82,8 @@ backupdir="${rootdir}/backups" ## Logging Directories logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" +scriptlogdir="${logdir}/script" +consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${lgsmlogdir}/${servicename}-email.log" diff --git a/lgsm/config-default/config-lgsm/hwserver/_default.cfg b/lgsm/config-default/config-lgsm/hwserver/_default.cfg index 9e64dfd46..d2da42f5f 100644 --- a/lgsm/config-default/config-lgsm/hwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hwserver/_default.cfg @@ -92,7 +92,7 @@ backupdir="${rootdir}/backups" ## Logging Directories logdir="${rootdir}/log" -gamelogdir="${rootdir}/log/server" +gamelogdir="${logdir}/server" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" gamelog="${gamelogdir}/${servicename}-game.log" diff --git a/lgsm/config-default/config-lgsm/kfserver/_default.cfg b/lgsm/config-default/config-lgsm/kfserver/_default.cfg index 982e6a6a1..bb0f0643f 100644 --- a/lgsm/config-default/config-lgsm/kfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/kfserver/_default.cfg @@ -83,9 +83,9 @@ compressedmapsdir="${rootdir}/Maps-Compressed" backupdir="${rootdir}/backups" ## Logging Directories -gamelogdir="${rootdir}/log/server" -scriptlogdir="${rootdir}/log/script" -consolelogdir="${rootdir}/log/console" +gamelogdir="${logdir}/server" +scriptlogdir="${logdir}/script" +consolelogdir="${logdir}/console" gamelog="${gamelogdir}/${servicename}-game.log" lgsmlog="${lgsmlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" diff --git a/lgsm/config-default/config-lgsm/qlserver/_default.cfg b/lgsm/config-default/config-lgsm/qlserver/_default.cfg index e73a5ec6d..6cc27f2c1 100644 --- a/lgsm/config-default/config-lgsm/qlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/qlserver/_default.cfg @@ -76,7 +76,7 @@ backupdir="${rootdir}/backups" ## Logging Directories logdir="${rootdir}/log" -gamelogdir="${rootdir}/log/server" +gamelogdir="${logdir}/server" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${servicename}-script.log" diff --git a/lgsm/config-default/config-lgsm/roserver/_default.cfg b/lgsm/config-default/config-lgsm/roserver/_default.cfg index 157cebcba..c7429cfa0 100644 --- a/lgsm/config-default/config-lgsm/roserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/roserver/_default.cfg @@ -81,7 +81,7 @@ backupdir="${rootdir}/backups" ## Logging Directories logdir="${rootdir}/log" -gamelogdir="${rootdir}/log/server" +gamelogdir="${logdir}/server" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${servicename}-script.log" diff --git a/lgsm/config-default/config-lgsm/rustserver/_default.cfg b/lgsm/config-default/config-lgsm/rustserver/_default.cfg index efdea8c57..30d8210b3 100644 --- a/lgsm/config-default/config-lgsm/rustserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rustserver/_default.cfg @@ -96,7 +96,7 @@ backupdir="${rootdir}/backups" ## Logging Directories logdir="${rootdir}/log" -gamelogdir="${rootdir}/log/server" +gamelogdir="${logdir}/server" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${servicename}-script.log" diff --git a/lgsm/config-default/config-lgsm/ss3server/_default.cfg b/lgsm/config-default/config-lgsm/ss3server/_default.cfg index a34ccc4f2..b83450c19 100644 --- a/lgsm/config-default/config-lgsm/ss3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ss3server/_default.cfg @@ -75,7 +75,7 @@ backupdir="${rootdir}/backups" ## Logging Directories logdir="${rootdir}/log" -gamelogdir="${rootdir}/log/server" +gamelogdir="${logdir}/server" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${servicename}-script.log" diff --git a/lgsm/config-default/config-lgsm/ts3server/_default.cfg b/lgsm/config-default/config-lgsm/ts3server/_default.cfg index 192d8be34..04ec3fdb6 100644 --- a/lgsm/config-default/config-lgsm/ts3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ts3server/_default.cfg @@ -60,7 +60,7 @@ backupdir="${rootdir}/backups" ## Logging Directories logdir="${rootdir}/log" gamelogdir="${serverfiles}/Logs" -scriptlogdir="${rootdir}/log/script" +scriptlogdir="${logdir}/script" scriptlog="${scriptlogdir}/${servicename}-script.log" emaillog="${scriptlogdir}/${servicename}-email.log" diff --git a/lgsm/config-default/config-lgsm/twserver/_default.cfg b/lgsm/config-default/config-lgsm/twserver/_default.cfg index 759bb9e6b..f3da6804d 100644 --- a/lgsm/config-default/config-lgsm/twserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/twserver/_default.cfg @@ -78,7 +78,7 @@ backupdir="${rootdir}/backups" ## Logging Directories logdir="${rootdir}/log" -gamelogdir="${rootdir}/log/server" +gamelogdir="${logdir}/server" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${servicename}-script.log" diff --git a/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg index 01dc64635..a939289a3 100644 --- a/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg @@ -65,7 +65,7 @@ backupdir="${rootdir}/backups" ## Logging Directories logdir="${rootdir}/log" -gamelogdir="${rootdir}/log/server" +gamelogdir="${logdir}/server" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" gamelog="${gamelogdir}/${servicename}-game.log" diff --git a/lgsm/config-default/config-lgsm/ut3server/_default.cfg b/lgsm/config-default/config-lgsm/ut3server/_default.cfg index 1dbb05849..31c63b300 100644 --- a/lgsm/config-default/config-lgsm/ut3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut3server/_default.cfg @@ -76,7 +76,7 @@ backupdir="${rootdir}/backups" ## Logging Directories logdir="${rootdir}/log" -gamelogdir="${rootdir}/log/server" +gamelogdir="${logdir}/server" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${servicename}-script.log" From e716151277154d8e8c726c98be3ae317b42987c8 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 29 May 2017 16:31:00 +0100 Subject: [PATCH 192/216] commented out gamelogdir --- lgsm/config-default/config-lgsm/mumbleserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg b/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg index 40d127f6b..c14dc05b6 100644 --- a/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg @@ -63,7 +63,7 @@ backupdir="${rootdir}/backups" ## Logging Directories logdir="${rootdir}/log" -gamelogdir="${rootdir}/log" +#gamelogdir="" # No server logs available lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${servicename}-script.log" From 986bbfcc2d0375a7b267fe721681e2947578dd27 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 3 Jun 2017 21:04:36 +0100 Subject: [PATCH 193/216] Added gslt to insserver --- lgsm/config-default/config-lgsm/insserver/_default.cfg | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/insserver/_default.cfg b/lgsm/config-default/config-lgsm/insserver/_default.cfg index 94102ad1a..26b0a5244 100644 --- a/lgsm/config-default/config-lgsm/insserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/insserver/_default.cfg @@ -18,9 +18,14 @@ maxplayers="16" tickrate="64" workshop="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 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" +parms="-game insurgency -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} -tickrate ${tickrate} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers} +sv_workshop_enabled ${workshop} -norestart" } #### LinuxGSM Settings #### From d087f0ba3c1afb219b533621d47ea78ba107c2cf Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 3 Jun 2017 21:36:48 +0100 Subject: [PATCH 194/216] Added discord alert (dev) still under developement --- .../config-lgsm/arkserver/_default.cfg | 4 ++++ lgsm/functions/alert.sh | 12 ++++++++++- lgsm/functions/alert_discord.sh | 20 +++++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 lgsm/functions/alert_discord.sh diff --git a/lgsm/config-default/config-lgsm/arkserver/_default.cfg b/lgsm/config-default/config-lgsm/arkserver/_default.cfg index b8cdf0c69..2d059901d 100644 --- a/lgsm/config-default/config-lgsm/arkserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/arkserver/_default.cfg @@ -34,6 +34,10 @@ pushbulletalert="off" pushbullettoken="accesstoken" channeltag="" +# Discord Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Discord +discordalert="off" +discordwebhook="https://discordapp.com/api/webhooks/12345/abcd12345" + ## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update updateonstart="off" diff --git a/lgsm/functions/alert.sh b/lgsm/functions/alert.sh index afcec526c..120227612 100644 --- a/lgsm/functions/alert.sh +++ b/lgsm/functions/alert.sh @@ -67,4 +67,14 @@ elif [ "${pushbulletalert}" != "on" ]&&[ "${function_selfname}" == "command_test elif [ -z "${pushbullettoken}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then fn_print_error_nl "Pushbullet token not set" fn_script_error_warn "Pushbullet token not set" -fi \ No newline at end of file +fi + +if [ "${discordalert}" == "on" ]&&[ -n "${discordalert}" ]; then + alert_discord.sh +elif [ "${discordalert}" != "on" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then + fn_print_warn_nl "Discord alerts not enabled" + fn_script_log_warn "Discord alerts not enabled" +elif [ -z "${discordalert}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then + fn_print_error_nl "Discord token not set" + fn_script_error_warn "Discord token not set" +fi diff --git a/lgsm/functions/alert_discord.sh b/lgsm/functions/alert_discord.sh new file mode 100644 index 000000000..11023a7d9 --- /dev/null +++ b/lgsm/functions/alert_discord.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# LinuxGSM alert_discord.sh function +# Author: Daniel Gibbs +# Contributor: faflfama +# Website: https://gameservermanagers.com +# Description: Sends Discord alert including the server status. + +if [ "$1" == "" ]; then echo "missing message"; exit; fi +prefix='{"content":"' +postfix='","file":"content","embed":"content"}' +echo "$prefix $1 $postfix" >f +curl -v -X POST --data @f "${discordwebhook}" + +#if [ "${discordsend}" == "invalid_access_token" ]; then +# fn_print_fail_nl "Sending Discord alert: invalid_access_token" +# fn_script_log_fatal "Sending Discord alert: invalid_access_token" +#else +# fn_print_ok_nl "Sending Discord alert" +# fn_script_log_pass "Sent Discord alert" +#fi \ No newline at end of file From e902468f783e19fa92970717cdc72f55e8a4e34c Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Sun, 4 Jun 2017 13:32:48 +0200 Subject: [PATCH 195/216] $filename > $modfilename + tidy "] ; then" to "]; then" --- lgsm/functions/mods_core.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/mods_core.sh b/lgsm/functions/mods_core.sh index 62d08ef1d..ad048de81 100644 --- a/lgsm/functions/mods_core.sh +++ b/lgsm/functions/mods_core.sh @@ -30,7 +30,7 @@ fn_mod_install_files(){ if [ ! -d "${extractdir}" ]; then mkdir -p "${extractdir}" fi - fn_dl_extract "${modstmpdir}" "${filename}" "${extractdir}" + fn_dl_extract "${modstmpdir}" "${modfilename}" "${extractdir}" } # Convert mod files to lowercase if needed @@ -228,7 +228,7 @@ fn_mods_installed_list(){ # Increment line check ((installedmodsline++)) done - if [ -n "${installedmodscount}" ] ; then + if [ -n "${installedmodscount}" ]; then fn_script_log_info "${installedmodscount} addons/mods are currently installed" fi } From 354802af652df39e8ab4aeea5091fcb176ee21cb Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 7 Jun 2017 21:26:11 +0100 Subject: [PATCH 196/216] Added alert_discord.sh --- lgsm/functions/core_functions.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 4323361b1..8a02c61e4 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -377,6 +377,11 @@ functionfile="${FUNCNAME}" fn_fetch_function } +alert_discord.sh(){ +functionfile="${FUNCNAME}" +fn_fetch_function +} + alert_email.sh(){ functionfile="${FUNCNAME}" fn_fetch_function From 40f89c9526d8effc3bbc8b9cb147a59983e99546 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 7 Jun 2017 21:34:54 +0100 Subject: [PATCH 197/216] Added discord alert --- lgsm/config-default/config-lgsm/rustserver/_default.cfg | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lgsm/config-default/config-lgsm/rustserver/_default.cfg b/lgsm/config-default/config-lgsm/rustserver/_default.cfg index 30d8210b3..2d6a29e40 100644 --- a/lgsm/config-default/config-lgsm/rustserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rustserver/_default.cfg @@ -41,6 +41,11 @@ fi ## Notification Alerts # (on|off) + +# Discord Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Discord +discordalert="off" +discordwebhook="https://discordapp.com/api/webhooks/12345/abcd12345" + # Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email emailalert="off" email="email@example.com" From 69aa7f32058bcba53aca58e40cc01420b712dbe8 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 7 Jun 2017 21:36:54 +0100 Subject: [PATCH 198/216] changed branch name --- linuxgsm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index 4fe9e5672..985761092 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -39,7 +39,7 @@ configdirdefault="${lgsmdir}/config-default" # from a different repo and/or branch. githubuser="GameServerManagers" githubrepo="LinuxGSM" -githubbranch="feature/config" +githubbranch="develop" # Core Function that is required first core_functions.sh(){ From 48f001be26f0c54030df5f88aeadeccbe192073a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 7 Jun 2017 21:56:43 +0100 Subject: [PATCH 199/216] further developments to alert_discord.sh --- lgsm/functions/alert_discord.sh | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/lgsm/functions/alert_discord.sh b/lgsm/functions/alert_discord.sh index 11023a7d9..bef8c3ae2 100644 --- a/lgsm/functions/alert_discord.sh +++ b/lgsm/functions/alert_discord.sh @@ -5,16 +5,4 @@ # Website: https://gameservermanagers.com # Description: Sends Discord alert including the server status. -if [ "$1" == "" ]; then echo "missing message"; exit; fi -prefix='{"content":"' -postfix='","file":"content","embed":"content"}' -echo "$prefix $1 $postfix" >f -curl -v -X POST --data @f "${discordwebhook}" - -#if [ "${discordsend}" == "invalid_access_token" ]; then -# fn_print_fail_nl "Sending Discord alert: invalid_access_token" -# fn_script_log_fatal "Sending Discord alert: invalid_access_token" -#else -# fn_print_ok_nl "Sending Discord alert" -# fn_script_log_pass "Sent Discord alert" -#fi \ No newline at end of file +curl -X POST --data '{ "embeds": [{"title": "${pbalertsubject}", "url": "https://example.com", "description": "${pbalertbody}", "type": "link", "thumbnail": {"url": "https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/master/images/logo/lgsm-square-184-dark.png"}}] }' -H "Content-Type: application/json" "${discordwebhook}" \ No newline at end of file From fabc5157e73f26c807d075b9d257c178d2eaac2a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 7 Jun 2017 21:58:15 +0100 Subject: [PATCH 200/216] Corrected alert variables --- lgsm/functions/alert_discord.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/alert_discord.sh b/lgsm/functions/alert_discord.sh index bef8c3ae2..f1ea069d4 100644 --- a/lgsm/functions/alert_discord.sh +++ b/lgsm/functions/alert_discord.sh @@ -5,4 +5,4 @@ # Website: https://gameservermanagers.com # Description: Sends Discord alert including the server status. -curl -X POST --data '{ "embeds": [{"title": "${pbalertsubject}", "url": "https://example.com", "description": "${pbalertbody}", "type": "link", "thumbnail": {"url": "https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/master/images/logo/lgsm-square-184-dark.png"}}] }' -H "Content-Type: application/json" "${discordwebhook}" \ No newline at end of file +curl -X POST --data '{ "embeds": [{"title": "${alertsubject}", "url": "https://example.com", "description": "${alertbody}", "type": "link", "thumbnail": {"url": "https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/master/images/logo/lgsm-square-184-dark.png"}}] }' -H "Content-Type: application/json" "${discordwebhook}" \ No newline at end of file From e1f4677588c6537afaf02cd5d61f4ad60f92f94c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 18 Jun 2017 20:15:32 +0100 Subject: [PATCH 201/216] changed delimiter to ; from , --- lgsm/data/serverlist.csv | 136 +++++++++++++++++++-------------------- linuxgsm.sh | 4 +- 2 files changed, 70 insertions(+), 70 deletions(-) diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index d21279969..b135ca6e6 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -1,68 +1,68 @@ -arma3,arma3server,ARMA 3 -sdtd,sdtdserver,7 Days to Die -ark,arkserver,ARK: Survival Evolved -bo,boserver,Ballistic Overkill -bf1942,bf1942server,Battlefield 1942 -bmdm,bmdmserver,Black Mesa: Deathmatch -bs,bsserver,Blade Symphony -bb2,bb2server,BrainBread 2 -cod,codserver,Call of Duty -cod2,cod2server,Call of Duty 2 -cod4,cod4server,Call of Duty 4 -coduo,coduoserver,Call of Duty: United Offensive -codwaw,codwawserver,Call of Duty: World at War -cc,ccserver,Codename CURE -cs,csserver,Counter-Strike 1.6 -cscz,csczserver,Counter-Strike: Condition Zero -csgo,csgoserver,Counter-Strike: Global Offensive -css,cssserver,Counter-Strike: Source -dod,dodserver,Day of Defeat -dods,dodsserver,Day of Defeat: Source -doi,doiserver,Day of Infamy -dmc,dmcserver,Deathmatch Classic -dst,dstserver,Don't Starve Together -dab,dabserver,Double Action: Boogaloo -em,emserver,Empires Mod -fctr,fctrserver,Factorio -fof,fofserver,Fistful of Frags -gmod,gmodserver,Garrys Mod -ges,gesserver,GoldenEye: Source -hl2dm,hl2dmserver,Half-Life 2: Deathmatch -hldms,hldmsserver,Half-Life Deathmatch: Source -hldm,hldmserver,Half-Life: Deathmatch -hw,hwserver,Hurtworld -ins,insserver,Insurgency -jc2,jc2server,Just Cause 2 -kf,kfserver,Killing Floor -l4d,l4dserver,Left 4 Dead -l4d2,l4d2server,Left 4 Dead 2 -mc,mcserver,Minecraft -mta,mtaserver,Multi Theft Auto -mumble,mumbleserver,Mumble -ns2,ns2server,Natural Selection 2 -nmrih,nmrihserver,No More Room in Hell -ns2c,ns2cserver,NS2: Combat -opfor,opforserver,Opposing Force -pvkii,pvkiiserver,Pirates, Vikings, & Knights II -pc,pcserver,Project Cars -pz,pzserver,Project Zomboid -q2,q2server,Quake 2 -q3,q3server,Quake 3: Arena -ql,qlserver,Quake Live -qw,qwserver,Quake World -ro,roserver,Red Orchestra: Ostfront 41-45 -ricochet,ricochetserver,Ricochet -rust,rustserver,Rust -ss3,ss3server,Serious Sam 3: BFE -sb,sbserver,Starbound -sven,svenserver,Sven Co-op -tf2,tf2server,Team Fortress 2 -tfc,tfcserver,Team Fortress Classic -ts3,ts3server,Teamspeak 3 -tw,twserver,Teeworlds -terraria,terrariaserver,Terraria -tu,tuserver,Tower Unite -ut2k4,ut2k4server,Unreal Tournament 2004 -ut3,ut3server,Unreal Tournament 3 -ut99,ut99server,Unreal Tournament 99 -wet,wetserver,Wolfenstein: Enemy Territory +arma3;arma3server;ARMA 3 +sdtd;sdtdserver;7 Days to Die +ark;arkserver;ARK: Survival Evolved +bo;boserver;Ballistic Overkill +bf1942;bf1942server;Battlefield 1942 +bmdm;bmdmserver;Black Mesa: Deathmatch +bs;bsserver;Blade Symphony +bb2;bb2server;BrainBread 2 +cod;codserver;Call of Duty +cod2;cod2server;Call of Duty 2 +cod4;cod4server;Call of Duty 4 +coduo;coduoserver;Call of Duty: United Offensive +codwaw;codwawserver;Call of Duty: World at War +cc;ccserver;Codename CURE +cs;csserver;Counter-Strike 1.6 +cscz;csczserver;Counter-Strike: Condition Zero +csgo;csgoserver;Counter-Strike: Global Offensive +css;cssserver;Counter-Strike: Source +dod;dodserver;Day of Defeat +dods;dodsserver;Day of Defeat: Source +doi;doiserver;Day of Infamy +dmc;dmcserver;Deathmatch Classic +dst;dstserver;Don't Starve Together +dab;dabserver;Double Action: Boogaloo +em;emserver;Empires Mod +fctr;fctrserver;Factorio +fof;fofserver;Fistful of Frags +gmod;gmodserver;Garrys Mod +ges;gesserver;GoldenEye: Source +hl2dm;hl2dmserver;Half-Life 2: Deathmatch +hldms;hldmsserver;Half-Life Deathmatch: Source +hldm;hldmserver;Half-Life: Deathmatch +hw;hwserver;Hurtworld +ins;insserver;Insurgency +jc2;jc2server;Just Cause 2 +kf;kfserver;Killing Floor +l4d;l4dserver;Left 4 Dead +l4d2;l4d2server;Left 4 Dead 2 +mc;mcserver;Minecraft +mta;mtaserver;Multi Theft Auto +mumble;mumbleserver;Mumble +ns2;ns2server;Natural Selection 2 +nmrih;nmrihserver;No More Room in Hell +ns2c;ns2cserver;NS2: Combat +opfor;opforserver;Opposing Force +pvkii;pvkiiserver;Pirates, Vikings, & Knights II +pc;pcserver;Project Cars +pz;pzserver;Project Zomboid +q2;q2server;Quake 2 +q3;q3server;Quake 3: Arena +ql;qlserver;Quake Live +qw;qwserver;Quake World +ro;roserver;Red Orchestra: Ostfront 41-45 +ricochet;ricochetserver;Ricochet +rust;rustserver;Rust +ss3;ss3server;Serious Sam 3: BFE +sb;sbserver;Starbound +sven;svenserver;Sven Co-op +tf2;tf2server;Team Fortress 2 +tfc;tfcserver;Team Fortress Classic +ts3;ts3server;Teamspeak 3 +tw;twserver;Teeworlds +terraria;terrariaserver;Terraria +tu;tuserver;Tower Unite +ut2k4;ut2k4server;Unreal Tournament 2004 +ut3;ut3server;Unreal Tournament 3 +ut99;ut99server;Unreal Tournament 99 +wet;wetserver;Wolfenstein: Enemy Territory diff --git a/linuxgsm.sh b/linuxgsm.sh index 985761092..93ac2a817 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -209,7 +209,7 @@ fn_install_menu() { # Gets server info from serverlist.csv and puts in to array fn_server_info(){ - IFS="," + IFS=";" server_info_array=($(grep -w "${userinput}" "${serverlist}")) shortname="${server_info_array[0]}" # csgo gameservername="${server_info_array[1]}" # csgoserver @@ -287,7 +287,7 @@ if [ "${shortname}" == "core" ]; then awk -F "," '{print $2 "\t" $3}' "${serverlist}" } | column -s $'\t' -t | more exit - elif [ "${userinput}" == "install" ]; then + elif [ "${userinput}" == "install" ]||[ "${userinput}" == "i" ]; then fn_install_menu result "LinuxGSM" "Select game to install" "${serverlist}" userinput="${result}" fn_server_info From c0101c9378b984114a68a5b90bc64a73c7548646 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 18 Jun 2017 20:19:39 +0100 Subject: [PATCH 202/216] changed to tab delimiter --- lgsm/data/serverlist.csv | 136 +++++++++++++++++++-------------------- linuxgsm.sh | 2 +- 2 files changed, 69 insertions(+), 69 deletions(-) diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index b135ca6e6..b671c06df 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -1,68 +1,68 @@ -arma3;arma3server;ARMA 3 -sdtd;sdtdserver;7 Days to Die -ark;arkserver;ARK: Survival Evolved -bo;boserver;Ballistic Overkill -bf1942;bf1942server;Battlefield 1942 -bmdm;bmdmserver;Black Mesa: Deathmatch -bs;bsserver;Blade Symphony -bb2;bb2server;BrainBread 2 -cod;codserver;Call of Duty -cod2;cod2server;Call of Duty 2 -cod4;cod4server;Call of Duty 4 -coduo;coduoserver;Call of Duty: United Offensive -codwaw;codwawserver;Call of Duty: World at War -cc;ccserver;Codename CURE -cs;csserver;Counter-Strike 1.6 -cscz;csczserver;Counter-Strike: Condition Zero -csgo;csgoserver;Counter-Strike: Global Offensive -css;cssserver;Counter-Strike: Source -dod;dodserver;Day of Defeat -dods;dodsserver;Day of Defeat: Source -doi;doiserver;Day of Infamy -dmc;dmcserver;Deathmatch Classic -dst;dstserver;Don't Starve Together -dab;dabserver;Double Action: Boogaloo -em;emserver;Empires Mod -fctr;fctrserver;Factorio -fof;fofserver;Fistful of Frags -gmod;gmodserver;Garrys Mod -ges;gesserver;GoldenEye: Source -hl2dm;hl2dmserver;Half-Life 2: Deathmatch -hldms;hldmsserver;Half-Life Deathmatch: Source -hldm;hldmserver;Half-Life: Deathmatch -hw;hwserver;Hurtworld -ins;insserver;Insurgency -jc2;jc2server;Just Cause 2 -kf;kfserver;Killing Floor -l4d;l4dserver;Left 4 Dead -l4d2;l4d2server;Left 4 Dead 2 -mc;mcserver;Minecraft -mta;mtaserver;Multi Theft Auto -mumble;mumbleserver;Mumble -ns2;ns2server;Natural Selection 2 -nmrih;nmrihserver;No More Room in Hell -ns2c;ns2cserver;NS2: Combat -opfor;opforserver;Opposing Force -pvkii;pvkiiserver;Pirates, Vikings, & Knights II -pc;pcserver;Project Cars -pz;pzserver;Project Zomboid -q2;q2server;Quake 2 -q3;q3server;Quake 3: Arena -ql;qlserver;Quake Live -qw;qwserver;Quake World -ro;roserver;Red Orchestra: Ostfront 41-45 -ricochet;ricochetserver;Ricochet -rust;rustserver;Rust -ss3;ss3server;Serious Sam 3: BFE -sb;sbserver;Starbound -sven;svenserver;Sven Co-op -tf2;tf2server;Team Fortress 2 -tfc;tfcserver;Team Fortress Classic -ts3;ts3server;Teamspeak 3 -tw;twserver;Teeworlds -terraria;terrariaserver;Terraria -tu;tuserver;Tower Unite -ut2k4;ut2k4server;Unreal Tournament 2004 -ut3;ut3server;Unreal Tournament 3 -ut99;ut99server;Unreal Tournament 99 -wet;wetserver;Wolfenstein: Enemy Territory +arma3 arma3server ARMA 3 +sdtd sdtdserver 7 Days to Die +ark arkserver ARK: Survival Evolved +bo boserver Ballistic Overkill +bf1942 bf1942server Battlefield 1942 +bmdm bmdmserver Black Mesa: Deathmatch +bs bsserver Blade Symphony +bb2 bb2server BrainBread 2 +cod codserver Call of Duty +cod2 cod2server Call of Duty 2 +cod4 cod4server Call of Duty 4 +coduo coduoserver Call of Duty: United Offensive +codwaw codwawserver Call of Duty: World at War +cc ccserver Codename CURE +cs csserver Counter-Strike 1.6 +cscz csczserver Counter-Strike: Condition Zero +csgo csgoserver Counter-Strike: Global Offensive +css cssserver Counter-Strike: Source +dod dodserver Day of Defeat +dods dodsserver Day of Defeat: Source +doi doiserver Day of Infamy +dmc dmcserver Deathmatch Classic +dst dstserver Don't Starve Together +dab dabserver Double Action: Boogaloo +em emserver Empires Mod +fctr fctrserver Factorio +fof fofserver Fistful of Frags +gmod gmodserver Garrys Mod +ges gesserver GoldenEye: Source +hl2dm hl2dmserver Half-Life 2: Deathmatch +hldms hldmsserver Half-Life Deathmatch: Source +hldm hldmserver Half-Life: Deathmatch +hw hwserver Hurtworld +ins insserver Insurgency +jc2 jc2server Just Cause 2 +kf kfserver Killing Floor +l4d l4dserver Left 4 Dead +l4d2 l4d2server Left 4 Dead 2 +mc mcserver Minecraft +mta mtaserver Multi Theft Auto +mumble mumbleserver Mumble +ns2 ns2server Natural Selection 2 +nmrih nmrihserver No More Room in Hell +ns2c ns2cserver NS2: Combat +opfor opforserver Opposing Force +pvkii pvkiiserver Pirates, Vikings, & Knights II +pc pcserver Project Cars +pz pzserver Project Zomboid +q2 q2server Quake 2 +q3 q3server Quake 3: Arena +ql qlserver Quake Live +qw qwserver Quake World +ro roserver Red Orchestra: Ostfront 41-45 +ricochet ricochetserver Ricochet +rust rustserver Rust +ss3 ss3server Serious Sam 3: BFE +sb sbserver Starbound +sven svenserver Sven Co-op +tf2 tf2server Team Fortress 2 +tfc tfcserver Team Fortress Classic +ts3 ts3server Teamspeak 3 +tw twserver Teeworlds +terraria terrariaserver Terraria +tu tuserver Tower Unite +ut2k4 ut2k4server Unreal Tournament 2004 +ut3 ut3server Unreal Tournament 3 +ut99 ut99server Unreal Tournament 99 +wet wetserver Wolfenstein: Enemy Territory diff --git a/linuxgsm.sh b/linuxgsm.sh index 93ac2a817..af7241ae1 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -209,7 +209,7 @@ fn_install_menu() { # Gets server info from serverlist.csv and puts in to array fn_server_info(){ - IFS=";" + IFS=" " server_info_array=($(grep -w "${userinput}" "${serverlist}")) shortname="${server_info_array[0]}" # csgo gameservername="${server_info_array[1]}" # csgoserver From b0b9bd234286f426025ff1eacaf076412fe61e7b Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 18 Jun 2017 20:22:14 +0100 Subject: [PATCH 203/216] renamed csv to tsv --- lgsm/data/{serverlist.csv => serverlist.tsv} | 0 linuxgsm.sh | 16 +++++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) rename lgsm/data/{serverlist.csv => serverlist.tsv} (100%) diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.tsv similarity index 100% rename from lgsm/data/serverlist.csv rename to lgsm/data/serverlist.tsv diff --git a/linuxgsm.sh b/linuxgsm.sh index af7241ae1..2258f83e4 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -32,14 +32,14 @@ libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" configdir="${lgsmdir}/config-lgsm" configdirserver="${configdir}/${gameservername}" -configdirdefault="${lgsmdir}/config-default" +configdirdefault="${lgsmdir}/develop" ## GitHub Branch Select # Allows for the use of different function files # from a different repo and/or branch. githubuser="GameServerManagers" githubrepo="LinuxGSM" -githubbranch="develop" +githubbranch="feature/config" # Core Function that is required first core_functions.sh(){ @@ -207,7 +207,7 @@ fn_install_menu() { eval "$resultvar=\"${selection}\"" } -# Gets server info from serverlist.csv and puts in to array +# Gets server info from serverlist.tsv and puts in to array fn_server_info(){ IFS=" " server_info_array=($(grep -w "${userinput}" "${serverlist}")) @@ -251,6 +251,7 @@ fn_install_file(){ echo "./${local_filename} details" fi echo "" + echo "server_info_array: ${server_info_array}" exit } @@ -269,16 +270,16 @@ fi if [ "${shortname}" == "core" ]; then userinput=$1 datadir="${tmpdir}/data" - serverlist="${datadir}/serverlist.csv" + serverlist="${datadir}/serverlist.tsv" # Download the serverlist. This is the complete list of all supported servers. if [ -f "${serverlist}" ]; then rm "${serverlist}" fi - fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "serverlist.csv" "nochmodx" "norun" "noforcedl" "nomd5" + fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.tsv" "${datadir}" "serverlist.tsv" "nochmodx" "norun" "noforcedl" "nomd5" if [ ! -f "${serverlist}" ]; then - echo "[ FAIL ] serverlist.csv could not be loaded." + echo "[ FAIL ] serverlist.tsv could not be loaded." exit 1 fi @@ -287,7 +288,7 @@ if [ "${shortname}" == "core" ]; then awk -F "," '{print $2 "\t" $3}' "${serverlist}" } | column -s $'\t' -t | more exit - elif [ "${userinput}" == "install" ]||[ "${userinput}" == "i" ]; then + elif [ "${userinput}" == "install" ]; then fn_install_menu result "LinuxGSM" "Select game to install" "${serverlist}" userinput="${result}" fn_server_info @@ -299,6 +300,7 @@ if [ "${shortname}" == "core" ]; then echo "[ FAIL ] menu result does not match gameservername" echo "result: ${result}" echo "gameservername: ${gameservername}" + echo "server_info_array: ${server_info_array}" fi elif [ -n "${userinput}" ]; then fn_server_info From 56d126e70f61d81856e557caaa49e9ec12c56fc6 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 18 Jun 2017 20:24:52 +0100 Subject: [PATCH 204/216] corrected branch --- linuxgsm.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index 2258f83e4..a02f62795 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -32,14 +32,14 @@ libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" configdir="${lgsmdir}/config-lgsm" configdirserver="${configdir}/${gameservername}" -configdirdefault="${lgsmdir}/develop" +configdirdefault="${lgsmdir}/config-default" ## GitHub Branch Select # Allows for the use of different function files # from a different repo and/or branch. githubuser="GameServerManagers" githubrepo="LinuxGSM" -githubbranch="feature/config" +githubbranch="develop" # Core Function that is required first core_functions.sh(){ From 91f297df6673a0592f5f05abd7dd9dbc10ffe5aa Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 18 Jun 2017 22:07:32 +0100 Subject: [PATCH 205/216] reverted back to csv and removed . from PVKII --- lgsm/data/serverlist.csv | 68 ++++++++++++++++++++++++++++++++++++++++ lgsm/data/serverlist.tsv | 68 ---------------------------------------- linuxgsm.sh | 14 ++++----- 3 files changed, 74 insertions(+), 76 deletions(-) create mode 100644 lgsm/data/serverlist.csv delete mode 100644 lgsm/data/serverlist.tsv diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv new file mode 100644 index 000000000..9e82ea15a --- /dev/null +++ b/lgsm/data/serverlist.csv @@ -0,0 +1,68 @@ +arma3,arma3server,ARMA 3 +sdtd,sdtdserver,7 Days to Die +ark,arkserver,ARK: Survival Evolved +bo,boserver,Ballistic Overkill +bf1942,bf1942server,Battlefield 1942 +bmdm,bmdmserver,Black Mesa: Deathmatch +bs,bsserver,Blade Symphony +bb2,bb2server,BrainBread 2 +cod,codserver,Call of Duty +cod2,cod2server,Call of Duty 2 +cod4,cod4server,Call of Duty 4 +coduo,coduoserver,Call of Duty: United Offensive +codwaw,codwawserver,Call of Duty: World at War +cc,ccserver,Codename CURE +cs,csserver,Counter-Strike 1.6 +cscz,csczserver,Counter-Strike: Condition Zero +csgo,csgoserver,Counter-Strike: Global Offensive +css,cssserver,Counter-Strike: Source +dod,dodserver,Day of Defeat +dods,dodsserver,Day of Defeat: Source +doi,doiserver,Day of Infamy +dmc,dmcserver,Deathmatch Classic +dst,dstserver,Don't Starve Together +dab,dabserver,Double Action: Boogaloo +em,emserver,Empires Mod +fctr,fctrserver,Factorio +fof,fofserver,Fistful of Frags +gmod,gmodserver,Garrys Mod +ges,gesserver,GoldenEye: Source +hl2dm,hl2dmserver,Half-Life 2: Deathmatch +hldms,hldmsserver,Half-Life Deathmatch: Source +hldm,hldmserver,Half-Life: Deathmatch +hw,hwserver,Hurtworld +ins,insserver,Insurgency +jc2,jc2server,Just Cause 2 +kf,kfserver,Killing Floor +l4d,l4dserver,Left 4 Dead +l4d2,l4d2server,Left 4 Dead 2 +mc,mcserver,Minecraft +mta,mtaserver,Multi Theft Auto +mumble,mumbleserver,Mumble +ns2,ns2server,Natural Selection 2 +nmrih,nmrihserver,No More Room in Hell +ns2c,ns2cserver,NS2: Combat +opfor,opforserver,Opposing Force +pvkii,pvkiiserver,Pirates Vikings & Knights II +pc,pcserver,Project Cars +pz,pzserver,Project Zomboid +q2,q2server,Quake 2 +q3,q3server,Quake 3: Arena +ql,qlserver,Quake Live +qw,qwserver,Quake World +ro,roserver,Red Orchestra: Ostfront 41-45 +ricochet,ricochetserver,Ricochet +rust,rustserver,Rust +ss3,ss3server,Serious Sam 3: BFE +sb,sbserver,Starbound +sven,svenserver,Sven Co-op +tf2,tf2server,Team Fortress 2 +tfc,tfcserver,Team Fortress Classic +ts3,ts3server,Teamspeak 3 +tw,twserver,Teeworlds +terraria,terrariaserver,Terraria +tu,tuserver,Tower Unite +ut2k4,ut2k4server,Unreal Tournament 2004 +ut3,ut3server,Unreal Tournament 3 +ut99,ut99server,Unreal Tournament 99 +wet,wetserver,Wolfenstein: Enemy Territory diff --git a/lgsm/data/serverlist.tsv b/lgsm/data/serverlist.tsv deleted file mode 100644 index b671c06df..000000000 --- a/lgsm/data/serverlist.tsv +++ /dev/null @@ -1,68 +0,0 @@ -arma3 arma3server ARMA 3 -sdtd sdtdserver 7 Days to Die -ark arkserver ARK: Survival Evolved -bo boserver Ballistic Overkill -bf1942 bf1942server Battlefield 1942 -bmdm bmdmserver Black Mesa: Deathmatch -bs bsserver Blade Symphony -bb2 bb2server BrainBread 2 -cod codserver Call of Duty -cod2 cod2server Call of Duty 2 -cod4 cod4server Call of Duty 4 -coduo coduoserver Call of Duty: United Offensive -codwaw codwawserver Call of Duty: World at War -cc ccserver Codename CURE -cs csserver Counter-Strike 1.6 -cscz csczserver Counter-Strike: Condition Zero -csgo csgoserver Counter-Strike: Global Offensive -css cssserver Counter-Strike: Source -dod dodserver Day of Defeat -dods dodsserver Day of Defeat: Source -doi doiserver Day of Infamy -dmc dmcserver Deathmatch Classic -dst dstserver Don't Starve Together -dab dabserver Double Action: Boogaloo -em emserver Empires Mod -fctr fctrserver Factorio -fof fofserver Fistful of Frags -gmod gmodserver Garrys Mod -ges gesserver GoldenEye: Source -hl2dm hl2dmserver Half-Life 2: Deathmatch -hldms hldmsserver Half-Life Deathmatch: Source -hldm hldmserver Half-Life: Deathmatch -hw hwserver Hurtworld -ins insserver Insurgency -jc2 jc2server Just Cause 2 -kf kfserver Killing Floor -l4d l4dserver Left 4 Dead -l4d2 l4d2server Left 4 Dead 2 -mc mcserver Minecraft -mta mtaserver Multi Theft Auto -mumble mumbleserver Mumble -ns2 ns2server Natural Selection 2 -nmrih nmrihserver No More Room in Hell -ns2c ns2cserver NS2: Combat -opfor opforserver Opposing Force -pvkii pvkiiserver Pirates, Vikings, & Knights II -pc pcserver Project Cars -pz pzserver Project Zomboid -q2 q2server Quake 2 -q3 q3server Quake 3: Arena -ql qlserver Quake Live -qw qwserver Quake World -ro roserver Red Orchestra: Ostfront 41-45 -ricochet ricochetserver Ricochet -rust rustserver Rust -ss3 ss3server Serious Sam 3: BFE -sb sbserver Starbound -sven svenserver Sven Co-op -tf2 tf2server Team Fortress 2 -tfc tfcserver Team Fortress Classic -ts3 ts3server Teamspeak 3 -tw twserver Teeworlds -terraria terrariaserver Terraria -tu tuserver Tower Unite -ut2k4 ut2k4server Unreal Tournament 2004 -ut3 ut3server Unreal Tournament 3 -ut99 ut99server Unreal Tournament 99 -wet wetserver Wolfenstein: Enemy Territory diff --git a/linuxgsm.sh b/linuxgsm.sh index a02f62795..516f04fe6 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -207,9 +207,9 @@ fn_install_menu() { eval "$resultvar=\"${selection}\"" } -# Gets server info from serverlist.tsv and puts in to array +# Gets server info from serverlist.csv and puts in to array fn_server_info(){ - IFS=" " + IFS="," server_info_array=($(grep -w "${userinput}" "${serverlist}")) shortname="${server_info_array[0]}" # csgo gameservername="${server_info_array[1]}" # csgoserver @@ -251,7 +251,6 @@ fn_install_file(){ echo "./${local_filename} details" fi echo "" - echo "server_info_array: ${server_info_array}" exit } @@ -270,16 +269,16 @@ fi if [ "${shortname}" == "core" ]; then userinput=$1 datadir="${tmpdir}/data" - serverlist="${datadir}/serverlist.tsv" + serverlist="${datadir}/serverlist.csv" # Download the serverlist. This is the complete list of all supported servers. if [ -f "${serverlist}" ]; then rm "${serverlist}" fi - fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.tsv" "${datadir}" "serverlist.tsv" "nochmodx" "norun" "noforcedl" "nomd5" + fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "serverlist.csv" "nochmodx" "norun" "noforcedl" "nomd5" if [ ! -f "${serverlist}" ]; then - echo "[ FAIL ] serverlist.tsv could not be loaded." + echo "[ FAIL ] serverlist.csv could not be loaded." exit 1 fi @@ -288,7 +287,7 @@ if [ "${shortname}" == "core" ]; then awk -F "," '{print $2 "\t" $3}' "${serverlist}" } | column -s $'\t' -t | more exit - elif [ "${userinput}" == "install" ]; then + elif [ "${userinput}" == "install" ]||[ "${userinput}" == "i" ]; then fn_install_menu result "LinuxGSM" "Select game to install" "${serverlist}" userinput="${result}" fn_server_info @@ -300,7 +299,6 @@ if [ "${shortname}" == "core" ]; then echo "[ FAIL ] menu result does not match gameservername" echo "result: ${result}" echo "gameservername: ${gameservername}" - echo "server_info_array: ${server_info_array}" fi elif [ -n "${userinput}" ]; then fn_server_info From 6fda525dc4c6e2f2e3a975845b6eadc0db4d3699 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 18 Jun 2017 22:08:51 +0100 Subject: [PATCH 206/216] added return in first line of csv file --- lgsm/data/serverlist.csv | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 9e82ea15a..848c29978 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -1,4 +1,5 @@ -arma3,arma3server,ARMA 3 + +arma3,arma3server,ARMA 3 sdtd,sdtdserver,7 Days to Die ark,arkserver,ARK: Survival Evolved bo,boserver,Ballistic Overkill From f8142d8bde20ba9c58063f6aea8f0c08a516ae45 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 18 Jun 2017 22:33:01 +0100 Subject: [PATCH 207/216] removed space --- lgsm/data/serverlist.csv | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 848c29978..9e82ea15a 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -1,5 +1,4 @@ - -arma3,arma3server,ARMA 3 +arma3,arma3server,ARMA 3 sdtd,sdtdserver,7 Days to Die ark,arkserver,ARK: Survival Evolved bo,boserver,Ballistic Overkill From ea3273aa54156b30bf46b642afd89c9a6279296a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 18 Jun 2017 23:14:41 +0100 Subject: [PATCH 208/216] fixed bug causing arma3server to not load --- linuxgsm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index 516f04fe6..b3237b921 100644 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -210,7 +210,7 @@ fn_install_menu() { # Gets server info from serverlist.csv and puts in to array fn_server_info(){ IFS="," - server_info_array=($(grep -w "${userinput}" "${serverlist}")) + server_info_array=($(grep -aw "${userinput}" "${serverlist}")) shortname="${server_info_array[0]}" # csgo gameservername="${server_info_array[1]}" # csgoserver gamename="${server_info_array[2]}" # Counter Strike: Global Offensive From a9b488c3a4375d1f7c86d710d0dcbb7fcba6ac30 Mon Sep 17 00:00:00 2001 From: Chaos Date: Sun, 18 Jun 2017 16:24:31 -0600 Subject: [PATCH 209/216] Fixed MTA not finding the update version --- lgsm/functions/update_mta.sh | 250 ++++++++++++++++++----------------- 1 file changed, 126 insertions(+), 124 deletions(-) diff --git a/lgsm/functions/update_mta.sh b/lgsm/functions/update_mta.sh index 2afc94abd..5159a7dcc 100644 --- a/lgsm/functions/update_mta.sh +++ b/lgsm/functions/update_mta.sh @@ -9,145 +9,147 @@ local commandaction="Update" local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" fn_update_mta_dl(){ - fn_fetch_file "http://linux.mtasa.com/dl/${numversion}/multitheftauto_linux_x64-${fullversion}.tar.gz" "${tmpdir}" "multitheftauto_linux_x64-${fullversion}.tar.gz" - fn_dl_extract "${tmpdir}" "multitheftauto_linux_x64-${fullversion}.tar.gz" "${tmpdir}" - echo -e "copying to ${serverfiles}...\c" - fn_script_log "Copying to ${serverfiles}" - cp -R "${tmpdir}/multitheftauto_linux_x64-${fullversion}/"* "${serverfiles}" - local exitcode=$? - if [ "${exitcode}" == "0" ]; then - fn_print_ok_eol_nl - else - fn_print_fail_eol_nl - fi + fn_fetch_file "http://linux.mtasa.com/dl/${numversion}/multitheftauto_linux_x64-${fullversion}.tar.gz" "${tmpdir}" "multitheftauto_linux_x64-${fullversion}.tar.gz" + mkdir "${tmpdir}/multitheftauto_linux_x64-${fullversion}" + fn_dl_extract "${tmpdir}" "multitheftauto_linux_x64-${fullversion}.tar.gz" "${tmpdir}/multitheftauto_linux_x64-${fullversion}" + echo -e "copying to ${filesdir}...\c" + fn_script_log "Copying to ${filesdir}" + cp -R "${tmpdir}/multitheftauto_linux_x64-${fullversion}/multitheftauto_linux_x64-${fullversion}/"* "${filesdir}" + local exitcode=$? + if [ "${exitcode}" == "0" ]; then + fn_print_ok_eol_nl + else + fn_print_fail_eol_nl + fi } fn_update_mta_currentbuild(){ - # Gets current build info - # Checks if current build info is available. If it fails, then a server restart will be forced to generate logs. - if [ ! -f "${consolelogdir}/${servicename}-console.log" ]; then - fn_print_error "Checking for update: linux.mtasa.com" - sleep 1 - fn_print_error_nl "Checking for update: linux.mtasa.com: No logs with server version found" - fn_script_log_error "Checking for update: linux.mtasa.com: No logs with server version found" - sleep 1 - fn_print_info_nl "Checking for update: linux.mtasa.com: Forcing server restart" - fn_script_log_info "Checking for update: linux.mtasa.com: Forcing server restart" - sleep 1 - exitbypass=1 - command_stop.sh - exitbypass=1 - command_start.sh - sleep 1 - # Check again and exit on failure. - if [ ! -f "${consolelogdir}/${servicename}-console.log" ]; then - fn_print_fail_nl "Checking for update: linux.mtasa.com: Still No logs with server version found" - fn_script_log_fatal "Checking for update: linux.mtasa.com: Still No logs with server version found" - core_exit.sh - fi - fi + # Gets current build info + # Checks if current build info is available. If it fails, then a server restart will be forced to generate logs. + if [ ! -f "${gamelogdir}"/server.log ]; then + fn_print_error "Checking for update: linux.mtasa.com" + sleep 1 + fn_print_error_nl "Checking for update: linux.mtasa.com: No logs with server version found" + fn_script_log_error "Checking for update: linux.mtasa.com: No logs with server version found" + sleep 1 + fn_print_info_nl "Checking for update: linux.mtasa.com: Forcing server restart" + fn_script_log_info "Checking for update: linux.mtasa.com: Forcing server restart" + sleep 1 + exitbypass=1 + command_stop.sh + exitbypass=1 + command_start.sh + sleep 1 + # Check again and exit on failure. + if [ ! -f "${gamelogdir}"/server.log ]; then + fn_print_fail_nl "Checking for update: linux.mtasa.com: Still No logs with server version found" + fn_script_log_fatal "Checking for update: linux.mtasa.com: Still No logs with server version found" + core_exit.sh + fi + fi - # Get current build from logs - currentbuild=$(awk -F"= Multi Theft Auto: San Andreas v" '{print $2}' "${consolelogdir}"/"${servicename}"-console.log | awk '{print $1}') - if [ -z "${currentbuild}" ]; then - fn_print_error_nl "Checking for update: linux.mtasa.com: Current build version not found" - fn_script_log_error "Checking for update: linux.mtasa.com: Current build version not found" - sleep 1 - fn_print_info_nl "Checking for update: linux.mtasa.com: Forcing server restart" - fn_script_log_info "Checking for update: linux.mtasa.com: Forcing server restart" - exitbypass=1 - command_stop.sh - exitbypass=1 - command_start.sh - currentbuild=$(awk -F"= Multi Theft Auto: San Andreas v" '{print $2}' "${consolelogdir}"/"${servicename}"-console.log | awk '{print $1}') - if [ -z "${currentbuild}" ]; then - fn_print_fail_nl "Checking for update: linux.mtasa.com: Current build version still not found" - fn_script_log_fatal "Checking for update: linux.mtasa.com: Current build version still not found" - core_exit.sh - fi - fi + # Get current build from logs + currentbuild=$(cat "${gamelogdir}"/server.log | grep "= Multi Theft Auto: San Andreas v" | awk '{ print $7 }'| sed -r 's/^.{1}//' | tail -1) + if [ -z "${currentbuild}" ]; then + fn_print_error_nl "Checking for update: linux.mtasa.com: Current build version not found" + fn_script_log_error "Checking for update: linux.mtasa.com: Current build version not found" + sleep 1 + fn_print_info_nl "Checking for update: linux.mtasa.com: Forcing server restart" + fn_script_log_info "Checking for update: linux.mtasa.com: Forcing server restart" + exitbypass=1 + command_stop.sh + exitbypass=1 + command_start.sh + currentbuild=$(cat "${gamelogdir}"/server.log | grep "= Multi Theft Auto: San Andreas v" | awk '{ print $7 }'| sed -r 's/^.{1}//' | tail -1) + if [ -z "${currentbuild}" ]; then + fn_print_fail_nl "Checking for update: linux.mtasa.com: Current build version still not found" + fn_script_log_fatal "Checking for update: linux.mtasa.com: Current build version still not found" + core_exit.sh + fi + fi } fn_mta_get_availablebuild() { - fn_fetch_file "https://raw.githubusercontent.com/multitheftauto/mtasa-blue/master/Server/version.h" "${tmpdir}" "version.h" # we need to find latest stable version here - local majorversion="$(cat ${tmpdir}/version.h | grep "#define MTASA_VERSION_MAJOR" | awk '{ print $3 }' | sed 's/\r//g')" - local minorversion="$(cat ${tmpdir}/version.h | grep "#define MTASA_VERSION_MINOR" | awk '{ print $3 }' | sed 's/\r//g')" - local maintenanceversion="$(cat ${tmpdir}/version.h | grep "#define MTASA_VERSION_MAINTENANCE" | awk '{ print $3 }' | sed 's/\r//g')" - numversion="${majorversion}${minorversion}${maintenanceversion}" - fullversion="${majorversion}.${minorversion}.${maintenanceversion}" - rm -f "${tmpdir}/version.h" + fn_fetch_file "https://raw.githubusercontent.com/multitheftauto/mtasa-blue/master/Server/version.h" "${tmpdir}" "version.h" # we need to find latest stable version here + local majorversion="$(cat ${tmpdir}/version.h | grep "#define MTASA_VERSION_MAJOR" | awk '{ print $3 }' | sed 's/\r//g')" + local minorversion="$(cat ${tmpdir}/version.h | grep "#define MTASA_VERSION_MINOR" | awk '{ print $3 }' | sed 's/\r//g')" + local maintenanceversion="$(cat ${tmpdir}/version.h | grep "#define MTASA_VERSION_MAINTENANCE" | awk '{ print $3 }' | sed 's/\r//g')" + numversion="${majorversion}${minorversion}${maintenanceversion}" + fullversion="${majorversion}.${minorversion}.${maintenanceversion}" + rm -f "${tmpdir}/version.h" } fn_update_mta_compare(){ - # Removes dots so if can compare version numbers - currentbuilddigit=$(echo "${currentbuild}"|tr -cd '[:digit:]') - if [ "${currentbuilddigit}" -ne "${numversion}" ]||[ "${forceupdate}" == "1" ]; then - if [ "${forceupdate}" == "1" ]; then - # forceupdate bypasses checks, useful for small build changes - mta_update_string="forced" - else - mta_update_string="available" - fi - echo -e "\n" - echo -e "Update ${mta_update_string}:" - sleep 1 - echo -e " Current build: ${red}${currentbuild} ${default}" - echo -e " Available build: ${green}${fullversion} ${default}" - echo -e "" - sleep 1 - echo "" - echo -en "Applying update.\r" - sleep 1 - echo -en "Applying update..\r" - sleep 1 - echo -en "Applying update...\r" - sleep 1 - echo -en "\n" - fn_script_log "Update ${mta_update_string}" - fn_script_log "Current build: ${currentbuild}" - fn_script_log "Available build: ${fullversion}" - fn_script_log "${currentbuild} > ${fullversion}" + # Removes dots so if can compare version numbers + currentbuilddigit=$(echo "${currentbuild}"|tr -cd '[:digit:]') + if [ "${currentbuilddigit}" -ne "${numversion}" ]||[ "${forceupdate}" == "1" ]; then + if [ "${forceupdate}" == "1" ]; then + # forceupdate bypasses checks, useful for small build changes + mta_update_string="forced" + else + mta_update_string="available" + fi + echo -e "\n" + echo -e "Update ${mta_update_string}:" + sleep 1 + echo -e " Current build: ${red}${currentbuild} ${default}" + echo -e " Available build: ${green}${fullversion} ${default}" + echo -e "" + sleep 1 + echo "" + echo -en "Applying update.\r" + sleep 1 + echo -en "Applying update..\r" + sleep 1 + echo -en "Applying update...\r" + sleep 1 + echo -en "\n" + fn_script_log "Update ${mta_update_string}" + fn_script_log "Current build: ${currentbuild}" + fn_script_log "Available build: ${fullversion}" + fn_script_log "${currentbuild} > ${fullversion}" - unset updateonstart + unset updateonstart - check_status.sh - if [ "${status}" == "0" ]; then - fn_update_mta_dl - exitbypass=1 - command_start.sh - exitbypass=1 - command_stop.sh - else - exitbypass=1 - command_stop.sh - fn_update_mta_dl - exitbypass=1 - command_start.sh - fi - alert="update" - alert.sh - else - echo -e "\n" - echo -e "No update available:" - echo -e " Current version: ${green}${currentbuild}${default}" - echo -e " Available version: ${green}${fullversion}${default}" - echo -e "" - fn_print_ok_nl "No update available" - fn_script_log_info "Current build: ${currentbuild}" - fn_script_log_info "Available build: ${fullversion}" - fi + check_status.sh + if [ "${status}" == "0" ]; then + fn_update_mta_dl + exitbypass=1 + command_start.sh + exitbypass=1 + command_stop.sh + else + exitbypass=1 + command_stop.sh + fn_update_mta_dl + exitbypass=1 + command_start.sh + fi + alert="update" + alert.sh + else + echo -e "\n" + echo -e "No update available:" + echo -e " Current version: ${green}${currentbuild}${default}" + echo -e " Available version: ${green}${fullversion}${default}" + echo -e "" + fn_print_ok_nl "No update available" + fn_script_log_info "Current build: ${currentbuild}" + fn_script_log_info "Available build: ${fullversion}" + fi } + if [ "${installer}" == "1" ]; then - fn_mta_get_availablebuild - fn_update_mta_dl + fn_mta_get_availablebuild + fn_update_mta_dl else - # Checks for server update from linux.mtasa.com using the github repo. - fn_print_dots "Checking for update: linux.mtasa.com" - fn_script_log_info "Checking for update: linux.mtasa.com" - sleep 1 - fn_update_mta_currentbuild - fn_mta_get_availablebuild - fn_update_mta_compare + # Checks for server update from linux.mtasa.com using the github repo. + fn_print_dots "Checking for update: linux.mtasa.com" + fn_script_log_info "Checking for update: linux.mtasa.com" + sleep 1 + fn_update_mta_currentbuild + fn_mta_get_availablebuild + fn_update_mta_compare fi From f0855a16d14cee3dbf51a428dad1c99fe7b540ef Mon Sep 17 00:00:00 2001 From: Chaos Date: Sun, 18 Jun 2017 16:32:44 -0600 Subject: [PATCH 210/216] Fixes force update for MTA --- lgsm/functions/core_getopt.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/core_getopt.sh b/lgsm/functions/core_getopt.sh index c7faba788..4e52b0d1f 100644 --- a/lgsm/functions/core_getopt.sh +++ b/lgsm/functions/core_getopt.sh @@ -58,8 +58,8 @@ currentopt+=( "${cmd_update_linuxgsm[@]}" ) # Exclude noupdate games here if [ "${gamename}" != "Battlefield: 1942" ]&&[ "${engine}" != "quake" ]&&[ "${engine}" != "idtech2" ]&&[ "${engine}" != "idtech3" ]&&[ "${engine}" != "iw2.0" ]&&[ "${engine}" != "iw3.0" ]; then currentopt+=( "${cmd_update[@]}" ) - # force update for SteamCMD only - if [ -n "${appid}" ]; then + # force update for SteamCMD only or MTA + if [ -n "${appid}" ] || [ "${gamename}" == "Multi Theft Auto" ]; then currentopt+=( "${cmd_force_update[@]}" ) fi fi From 1d5af36a3ffd3d0ceba51c99932633df8a27b02c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 19 Jun 2017 09:14:54 +0100 Subject: [PATCH 211/216] tidy --- lgsm/functions/update_mta.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lgsm/functions/update_mta.sh b/lgsm/functions/update_mta.sh index 2afc94abd..c186ea25b 100644 --- a/lgsm/functions/update_mta.sh +++ b/lgsm/functions/update_mta.sh @@ -68,8 +68,7 @@ fn_update_mta_currentbuild(){ fi } -fn_mta_get_availablebuild() -{ +fn_mta_get_availablebuild(){ fn_fetch_file "https://raw.githubusercontent.com/multitheftauto/mtasa-blue/master/Server/version.h" "${tmpdir}" "version.h" # we need to find latest stable version here local majorversion="$(cat ${tmpdir}/version.h | grep "#define MTASA_VERSION_MAJOR" | awk '{ print $3 }' | sed 's/\r//g')" local minorversion="$(cat ${tmpdir}/version.h | grep "#define MTASA_VERSION_MINOR" | awk '{ print $3 }' | sed 's/\r//g')" From 0a21609af0406f83dfd042259bb4398aec896f68 Mon Sep 17 00:00:00 2001 From: Chaos Date: Sun, 18 Jun 2017 16:24:31 -0600 Subject: [PATCH 212/216] Fixed MTA not finding the update version --- lgsm/functions/update_mta.sh | 236 ++++++++++++++++++----------------- 1 file changed, 119 insertions(+), 117 deletions(-) diff --git a/lgsm/functions/update_mta.sh b/lgsm/functions/update_mta.sh index c186ea25b..390b0aafc 100644 --- a/lgsm/functions/update_mta.sh +++ b/lgsm/functions/update_mta.sh @@ -9,63 +9,64 @@ local commandaction="Update" local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" fn_update_mta_dl(){ - fn_fetch_file "http://linux.mtasa.com/dl/${numversion}/multitheftauto_linux_x64-${fullversion}.tar.gz" "${tmpdir}" "multitheftauto_linux_x64-${fullversion}.tar.gz" - fn_dl_extract "${tmpdir}" "multitheftauto_linux_x64-${fullversion}.tar.gz" "${tmpdir}" - echo -e "copying to ${serverfiles}...\c" - fn_script_log "Copying to ${serverfiles}" - cp -R "${tmpdir}/multitheftauto_linux_x64-${fullversion}/"* "${serverfiles}" - local exitcode=$? - if [ "${exitcode}" == "0" ]; then - fn_print_ok_eol_nl - else - fn_print_fail_eol_nl - fi + fn_fetch_file "http://linux.mtasa.com/dl/${numversion}/multitheftauto_linux_x64-${fullversion}.tar.gz" "${tmpdir}" "multitheftauto_linux_x64-${fullversion}.tar.gz" + mkdir "${tmpdir}/multitheftauto_linux_x64-${fullversion}" + fn_dl_extract "${tmpdir}" "multitheftauto_linux_x64-${fullversion}.tar.gz" "${tmpdir}/multitheftauto_linux_x64-${fullversion}" + echo -e "copying to ${filesdir}...\c" + fn_script_log "Copying to ${filesdir}" + cp -R "${tmpdir}/multitheftauto_linux_x64-${fullversion}/multitheftauto_linux_x64-${fullversion}/"* "${filesdir}" + local exitcode=$? + if [ "${exitcode}" == "0" ]; then + fn_print_ok_eol_nl + else + fn_print_fail_eol_nl + fi } fn_update_mta_currentbuild(){ - # Gets current build info - # Checks if current build info is available. If it fails, then a server restart will be forced to generate logs. - if [ ! -f "${consolelogdir}/${servicename}-console.log" ]; then - fn_print_error "Checking for update: linux.mtasa.com" - sleep 1 - fn_print_error_nl "Checking for update: linux.mtasa.com: No logs with server version found" - fn_script_log_error "Checking for update: linux.mtasa.com: No logs with server version found" - sleep 1 - fn_print_info_nl "Checking for update: linux.mtasa.com: Forcing server restart" - fn_script_log_info "Checking for update: linux.mtasa.com: Forcing server restart" - sleep 1 - exitbypass=1 - command_stop.sh - exitbypass=1 - command_start.sh - sleep 1 - # Check again and exit on failure. - if [ ! -f "${consolelogdir}/${servicename}-console.log" ]; then - fn_print_fail_nl "Checking for update: linux.mtasa.com: Still No logs with server version found" - fn_script_log_fatal "Checking for update: linux.mtasa.com: Still No logs with server version found" - core_exit.sh - fi - fi + # Gets current build info + # Checks if current build info is available. If it fails, then a server restart will be forced to generate logs. + if [ ! -f "${gamelogdir}"/server.log ]; then + fn_print_error "Checking for update: linux.mtasa.com" + sleep 1 + fn_print_error_nl "Checking for update: linux.mtasa.com: No logs with server version found" + fn_script_log_error "Checking for update: linux.mtasa.com: No logs with server version found" + sleep 1 + fn_print_info_nl "Checking for update: linux.mtasa.com: Forcing server restart" + fn_script_log_info "Checking for update: linux.mtasa.com: Forcing server restart" + sleep 1 + exitbypass=1 + command_stop.sh + exitbypass=1 + command_start.sh + sleep 1 + # Check again and exit on failure. + if [ ! -f "${gamelogdir}"/server.log ]; then + fn_print_fail_nl "Checking for update: linux.mtasa.com: Still No logs with server version found" + fn_script_log_fatal "Checking for update: linux.mtasa.com: Still No logs with server version found" + core_exit.sh + fi + fi - # Get current build from logs - currentbuild=$(awk -F"= Multi Theft Auto: San Andreas v" '{print $2}' "${consolelogdir}"/"${servicename}"-console.log | awk '{print $1}') - if [ -z "${currentbuild}" ]; then - fn_print_error_nl "Checking for update: linux.mtasa.com: Current build version not found" - fn_script_log_error "Checking for update: linux.mtasa.com: Current build version not found" - sleep 1 - fn_print_info_nl "Checking for update: linux.mtasa.com: Forcing server restart" - fn_script_log_info "Checking for update: linux.mtasa.com: Forcing server restart" - exitbypass=1 - command_stop.sh - exitbypass=1 - command_start.sh - currentbuild=$(awk -F"= Multi Theft Auto: San Andreas v" '{print $2}' "${consolelogdir}"/"${servicename}"-console.log | awk '{print $1}') - if [ -z "${currentbuild}" ]; then - fn_print_fail_nl "Checking for update: linux.mtasa.com: Current build version still not found" - fn_script_log_fatal "Checking for update: linux.mtasa.com: Current build version still not found" - core_exit.sh - fi - fi + # Get current build from logs + currentbuild=$(cat "${gamelogdir}"/server.log | grep "= Multi Theft Auto: San Andreas v" | awk '{ print $7 }'| sed -r 's/^.{1}//' | tail -1) + if [ -z "${currentbuild}" ]; then + fn_print_error_nl "Checking for update: linux.mtasa.com: Current build version not found" + fn_script_log_error "Checking for update: linux.mtasa.com: Current build version not found" + sleep 1 + fn_print_info_nl "Checking for update: linux.mtasa.com: Forcing server restart" + fn_script_log_info "Checking for update: linux.mtasa.com: Forcing server restart" + exitbypass=1 + command_stop.sh + exitbypass=1 + command_start.sh + currentbuild=$(cat "${gamelogdir}"/server.log | grep "= Multi Theft Auto: San Andreas v" | awk '{ print $7 }'| sed -r 's/^.{1}//' | tail -1) + if [ -z "${currentbuild}" ]; then + fn_print_fail_nl "Checking for update: linux.mtasa.com: Current build version still not found" + fn_script_log_fatal "Checking for update: linux.mtasa.com: Current build version still not found" + core_exit.sh + fi + fi } fn_mta_get_availablebuild(){ @@ -79,74 +80,75 @@ fn_mta_get_availablebuild(){ } fn_update_mta_compare(){ - # Removes dots so if can compare version numbers - currentbuilddigit=$(echo "${currentbuild}"|tr -cd '[:digit:]') - if [ "${currentbuilddigit}" -ne "${numversion}" ]||[ "${forceupdate}" == "1" ]; then - if [ "${forceupdate}" == "1" ]; then - # forceupdate bypasses checks, useful for small build changes - mta_update_string="forced" - else - mta_update_string="available" - fi - echo -e "\n" - echo -e "Update ${mta_update_string}:" - sleep 1 - echo -e " Current build: ${red}${currentbuild} ${default}" - echo -e " Available build: ${green}${fullversion} ${default}" - echo -e "" - sleep 1 - echo "" - echo -en "Applying update.\r" - sleep 1 - echo -en "Applying update..\r" - sleep 1 - echo -en "Applying update...\r" - sleep 1 - echo -en "\n" - fn_script_log "Update ${mta_update_string}" - fn_script_log "Current build: ${currentbuild}" - fn_script_log "Available build: ${fullversion}" - fn_script_log "${currentbuild} > ${fullversion}" + # Removes dots so if can compare version numbers + currentbuilddigit=$(echo "${currentbuild}"|tr -cd '[:digit:]') + if [ "${currentbuilddigit}" -ne "${numversion}" ]||[ "${forceupdate}" == "1" ]; then + if [ "${forceupdate}" == "1" ]; then + # forceupdate bypasses checks, useful for small build changes + mta_update_string="forced" + else + mta_update_string="available" + fi + echo -e "\n" + echo -e "Update ${mta_update_string}:" + sleep 1 + echo -e " Current build: ${red}${currentbuild} ${default}" + echo -e " Available build: ${green}${fullversion} ${default}" + echo -e "" + sleep 1 + echo "" + echo -en "Applying update.\r" + sleep 1 + echo -en "Applying update..\r" + sleep 1 + echo -en "Applying update...\r" + sleep 1 + echo -en "\n" + fn_script_log "Update ${mta_update_string}" + fn_script_log "Current build: ${currentbuild}" + fn_script_log "Available build: ${fullversion}" + fn_script_log "${currentbuild} > ${fullversion}" - unset updateonstart + unset updateonstart - check_status.sh - if [ "${status}" == "0" ]; then - fn_update_mta_dl - exitbypass=1 - command_start.sh - exitbypass=1 - command_stop.sh - else - exitbypass=1 - command_stop.sh - fn_update_mta_dl - exitbypass=1 - command_start.sh - fi - alert="update" - alert.sh - else - echo -e "\n" - echo -e "No update available:" - echo -e " Current version: ${green}${currentbuild}${default}" - echo -e " Available version: ${green}${fullversion}${default}" - echo -e "" - fn_print_ok_nl "No update available" - fn_script_log_info "Current build: ${currentbuild}" - fn_script_log_info "Available build: ${fullversion}" - fi + check_status.sh + if [ "${status}" == "0" ]; then + fn_update_mta_dl + exitbypass=1 + command_start.sh + exitbypass=1 + command_stop.sh + else + exitbypass=1 + command_stop.sh + fn_update_mta_dl + exitbypass=1 + command_start.sh + fi + alert="update" + alert.sh + else + echo -e "\n" + echo -e "No update available:" + echo -e " Current version: ${green}${currentbuild}${default}" + echo -e " Available version: ${green}${fullversion}${default}" + echo -e "" + fn_print_ok_nl "No update available" + fn_script_log_info "Current build: ${currentbuild}" + fn_script_log_info "Available build: ${fullversion}" + fi } + if [ "${installer}" == "1" ]; then - fn_mta_get_availablebuild - fn_update_mta_dl + fn_mta_get_availablebuild + fn_update_mta_dl else - # Checks for server update from linux.mtasa.com using the github repo. - fn_print_dots "Checking for update: linux.mtasa.com" - fn_script_log_info "Checking for update: linux.mtasa.com" - sleep 1 - fn_update_mta_currentbuild - fn_mta_get_availablebuild - fn_update_mta_compare + # Checks for server update from linux.mtasa.com using the github repo. + fn_print_dots "Checking for update: linux.mtasa.com" + fn_script_log_info "Checking for update: linux.mtasa.com" + sleep 1 + fn_update_mta_currentbuild + fn_mta_get_availablebuild + fn_update_mta_compare fi From 0b987e41059e06616db42d98de8d621d44895030 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 19 Jun 2017 15:00:38 +0100 Subject: [PATCH 213/216] Updated media files --- README.md | 25 +- images/logo/apple-touch-icon-precomposed.png | Bin 0 -> 4736 bytes .../logo/assets/lgsm-font-source_code_pro.zip | Bin 0 -> 394692 bytes images/logo/assets/lgsm-square.xcf | Bin 472808 -> 0 bytes images/logo/assets/lgsm.xcf | Bin 470728 -> 0 bytes images/logo/assets/lgsm_full.xcf | Bin 760477 -> 0 bytes .../svg/linuxgsm_black_gradiant_vector.svg | 238 +++++++++++++ .../linuxgsm_black_gradiant_vector_full.svg | 304 ++++++++++++++++ .../logo/assets/svg/linuxgsm_black_vector.svg | 286 ++++++++++++++++ .../logo/assets/svg/linuxgsm_white_vector.svg | 248 ++++++++++++++ .../assets/svg/linuxgsm_white_vector_full.svg | 324 ++++++++++++++++++ images/logo/facebook.png | Bin 0 -> 22166 bytes images/logo/lgsm-250x130-dark.png | Bin 17303 -> 0 bytes images/logo/lgsm-250x143-light.png | Bin 13744 -> 0 bytes images/logo/lgsm-dark-full.png | Bin 0 -> 131443 bytes images/logo/lgsm-dark-square-114.png | Bin 0 -> 4736 bytes images/logo/lgsm-dark-square-16.png | Bin 0 -> 653 bytes images/logo/lgsm-dark-square-184.png | Bin 0 -> 7507 bytes images/logo/lgsm-dark-square-24.png | Bin 0 -> 1008 bytes images/logo/lgsm-dark-square-512.png | Bin 0 -> 22166 bytes images/logo/lgsm-dark-square-64.png | Bin 0 -> 2685 bytes images/logo/lgsm-full-dark.png | Bin 56251 -> 0 bytes images/logo/lgsm-full-light.png | Bin 69852 -> 0 bytes images/logo/lgsm-light-full.png | Bin 0 -> 85504 bytes images/logo/lgsm-site-foot.png | Bin 1172 -> 0 bytes images/logo/lgsm-site-head.png | Bin 3182 -> 0 bytes images/logo/lgsm-square-114-dark.png | Bin 5072 -> 0 bytes images/logo/lgsm-square-114-light.png | Bin 4148 -> 0 bytes images/logo/lgsm-square-16-dark.png | Bin 697 -> 0 bytes images/logo/lgsm-square-16-light.png | Bin 695 -> 0 bytes images/logo/lgsm-square-184-dark.png | Bin 7312 -> 0 bytes images/logo/lgsm-square-184-light.png | Bin 7147 -> 0 bytes images/logo/lgsm-square-24-dark.png | Bin 1051 -> 0 bytes images/logo/lgsm-square-24-light.png | Bin 1085 -> 0 bytes images/logo/lgsm-square-32-dark.png | Bin 1155 -> 0 bytes images/logo/lgsm-square-32-light.png | Bin 1019 -> 0 bytes images/logo/lgsm-square-512-dark.png | Bin 17049 -> 0 bytes images/logo/lgsm-square-512-light.png | Bin 17480 -> 0 bytes images/logo/lgsm-square-64-dark.png | Bin 2630 -> 0 bytes images/logo/lgsm-square-64-light.png | Bin 2216 -> 0 bytes images/wallpaper/LinuxGSM_wallpaper.png | Bin 0 -> 282053 bytes images/wallpaper/LinuxGSM_wallpaper_2.png | Bin 0 -> 48869 bytes 42 files changed, 1412 insertions(+), 13 deletions(-) create mode 100644 images/logo/apple-touch-icon-precomposed.png create mode 100644 images/logo/assets/lgsm-font-source_code_pro.zip delete mode 100644 images/logo/assets/lgsm-square.xcf delete mode 100644 images/logo/assets/lgsm.xcf delete mode 100644 images/logo/assets/lgsm_full.xcf create mode 100644 images/logo/assets/svg/linuxgsm_black_gradiant_vector.svg create mode 100644 images/logo/assets/svg/linuxgsm_black_gradiant_vector_full.svg create mode 100644 images/logo/assets/svg/linuxgsm_black_vector.svg create mode 100644 images/logo/assets/svg/linuxgsm_white_vector.svg create mode 100644 images/logo/assets/svg/linuxgsm_white_vector_full.svg create mode 100644 images/logo/facebook.png delete mode 100644 images/logo/lgsm-250x130-dark.png delete mode 100644 images/logo/lgsm-250x143-light.png create mode 100644 images/logo/lgsm-dark-full.png create mode 100644 images/logo/lgsm-dark-square-114.png create mode 100644 images/logo/lgsm-dark-square-16.png create mode 100644 images/logo/lgsm-dark-square-184.png create mode 100644 images/logo/lgsm-dark-square-24.png create mode 100644 images/logo/lgsm-dark-square-512.png create mode 100644 images/logo/lgsm-dark-square-64.png delete mode 100644 images/logo/lgsm-full-dark.png delete mode 100644 images/logo/lgsm-full-light.png create mode 100644 images/logo/lgsm-light-full.png delete mode 100644 images/logo/lgsm-site-foot.png delete mode 100644 images/logo/lgsm-site-head.png delete mode 100644 images/logo/lgsm-square-114-dark.png delete mode 100644 images/logo/lgsm-square-114-light.png delete mode 100644 images/logo/lgsm-square-16-dark.png delete mode 100644 images/logo/lgsm-square-16-light.png delete mode 100644 images/logo/lgsm-square-184-dark.png delete mode 100644 images/logo/lgsm-square-184-light.png delete mode 100644 images/logo/lgsm-square-24-dark.png delete mode 100644 images/logo/lgsm-square-24-light.png delete mode 100644 images/logo/lgsm-square-32-dark.png delete mode 100644 images/logo/lgsm-square-32-light.png delete mode 100644 images/logo/lgsm-square-512-dark.png delete mode 100644 images/logo/lgsm-square-512-light.png delete mode 100644 images/logo/lgsm-square-64-dark.png delete mode 100644 images/logo/lgsm-square-64-light.png create mode 100644 images/wallpaper/LinuxGSM_wallpaper.png create mode 100644 images/wallpaper/LinuxGSM_wallpaper_2.png diff --git a/README.md b/README.md index e6a26cae3..e657a800b 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,27 @@ -

    Linux Game Server Managers_

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

    Hassle-Free Dedicated Servers

    -Game servers traditionally are not easy to manage yourself. Admins often have to spend hours just messing around trying to get their server working. LGSM is designed to be a simple as possible allowing Admins to spend less time on management and more time on the fun stuff. +Game servers traditionally are not easy to manage yourself. Admins often have to spend hours just messing around trying to get their server working. LinuxGSM is designed to be a simple as possible allowing admins to spend less time on management and more time gaming.

    Main features

      -
    • Backup
    • -
    • Console
    • -
    • Details
    • -
    • Installer (SteamCMD)
    • +
    • Simple installer
    • Monitor
    • -
    • Alerts (Email, Pushbullet)
    • -
    • Update (SteamCMD)
    • -
    • Start/Stop/Restart server
    • +
    • Alerts
    • +
    • Updater
    • +
    • Backups
    • +
    • Console (tmux)
    • +
    • Server details
    • +
    • Mods Installer

    Compatibility

    -The Linux Game Server Managers are tested to work on the following Linux distros. +The LinuxGSM is tested to work on the following Linux distros.
    • Debian based (Ubuntu, Mint etc.).
    • Redhat based (CentOS, Fedora etc.).
    • @@ -44,7 +43,7 @@ If you want to donate to the project you can via PayPal. I have had a may kind p

    Useful Links