diff --git a/7DaysToDie/sdtdserver b/7DaysToDie/sdtdserver index 5825a9248..0c532d2e5 100644 --- a/7DaysToDie/sdtdserver +++ b/7DaysToDie/sdtdserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -43,9 +43,11 @@ parms="-logfile ${gamelogdir}/output_log__`date +%Y-%m-%d__%H-%M-%S`.txt -quit - 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" @@ -190,7 +192,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/ARKSurvivalEvolved/arkserver b/ARKSurvivalEvolved/arkserver index f2a9f2641..aa562c209 100644 --- a/ARKSurvivalEvolved/arkserver +++ b/ARKSurvivalEvolved/arkserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -45,9 +45,11 @@ parms="\"TheIsland?listen?MultiHome=${ip}?SessionName=${servername}?MaxPlayers=$ 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" @@ -191,7 +193,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/Arma3/arma3server b/Arma3/arma3server index e4b4fb83b..f5a1c7830 100644 --- a/Arma3/arma3server +++ b/Arma3/arma3server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -59,9 +59,11 @@ parms="-netlog -ip=${ip} -port=${port} -cfg=${networkcfgfullpath} -config=${serv 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" @@ -208,7 +210,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/Battlefield1942/bf1942server b/Battlefield1942/bf1942server index 43212f78a..52eca3409 100644 --- a/Battlefield1942/bf1942server +++ b/Battlefield1942/bf1942server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -35,9 +35,11 @@ parms="+hostServer 1 +dedicated 1" 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" @@ -174,7 +176,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/BlackMesa/bmdmserver b/BlackMesa/bmdmserver index 62bea603e..e59419347 100644 --- a/BlackMesa/bmdmserver +++ b/BlackMesa/bmdmserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -49,9 +49,11 @@ parms="-game bms -strictportbind -ip ${ip} -port ${port} +clientport ${clientpor 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" @@ -196,7 +198,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/BladeSymphony/bsserver b/BladeSymphony/bsserver index 548adea2a..89423115b 100644 --- a/BladeSymphony/bsserver +++ b/BladeSymphony/bsserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -48,9 +48,11 @@ parms="-autoupdate -strictportbind -ip ${ip} -port ${port} +clientport ${clientp 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" @@ -186,7 +188,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/BrainBread2/bb2server b/BrainBread2/bb2server index 86c2fc9c8..932600773 100644 --- a/BrainBread2/bb2server +++ b/BrainBread2/bb2server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -52,9 +52,11 @@ parms="-game brainbread2 -insecure -strictportbind -ip ${ip} -port ${port} +clie 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" @@ -198,7 +200,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/CallOfDuty/codserver b/CallOfDuty/codserver index ae19879e8..795f89b83 100755 --- a/CallOfDuty/codserver +++ b/CallOfDuty/codserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -41,9 +41,11 @@ parms="+set sv_punkbuster 0 +set fs_basepath ${filesdir} +set dedicated 1 +set n 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" @@ -176,7 +178,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/CallOfDuty2/cod2server b/CallOfDuty2/cod2server new file mode 100755 index 000000000..885175339 --- /dev/null +++ b/CallOfDuty2/cod2server @@ -0,0 +1,188 @@ +#!/bin/bash +# Project: Game Server Managers - LinuxGSM +# Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Call of Duty 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="161118" + +########################## +######## 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/CallOfDutyUnitedOffensive/coduoserver b/CallOfDutyUnitedOffensive/coduoserver new file mode 100755 index 000000000..95675a10f --- /dev/null +++ b/CallOfDutyUnitedOffensive/coduoserver @@ -0,0 +1,188 @@ +#!/bin/bash +# Project: Game Server Managers - LinuxGSM +# Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Call of Duty: 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="161118" + +########################## +######## 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 new file mode 100755 index 000000000..d89788aaf --- /dev/null +++ b/CallOfDutyWorldAtWar/codwawserver @@ -0,0 +1,188 @@ +#!/bin/bash +# Project: Game Server Managers - LinuxGSM +# Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Call of Duty: World at War | Server Management Script +# Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors +# Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki +# Website: https://gameservermanagers.com + +# Debugging +if [ -f ".dev-debug" ]; then + exec 5>dev-debug.log + BASH_XTRACEFD="5" + set -x +fi + +version="161118" + +########################## +######## Settings ######## +########################## + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters + +defaultmap="mp_castle" +maxclients="20" +port="28960" +ip="0.0.0.0" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="+set sv_punkbuster 0 +set fs_basepath ${filesdir} +set dedicated 1 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxclients} +exec ${servercfg} +map ${defaultmap}" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### Advanced Variables #### + +## Github Branch Select +# Allows for the use of different function files +# from a different repo and/or branch. +githubuser="GameServerManagers" +githubrepo="LinuxGSM" +githubbranch="master" + +## LinuxGSM Server Details +# Do not edit +gamename="Call of Duty: World at War" +engine="IW 3.0" + +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="coduo-server" + +#### Directories #### +# Edit with care + +## Work Directories +rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" +selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" +lockselfname=".${servicename}.lock" +lgsmdir="${rootdir}/lgsm" +functionsdir="${lgsmdir}/functions" +libdir="${lgsmdir}/lib" +tmpdir="${lgsmdir}/tmp" +filesdir="${rootdir}/serverfiles" + +## Server Specific Directories +systemdir="${filesdir}" +executabledir="${filesdir}" +executable="./codwaw_lnxded" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}/main" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +gamelogdir="${filesdir}/Logs" +scriptlogdir="${rootdir}/log/script" +consolelogdir="${rootdir}/log/console" +scriptlog="${scriptlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${scriptlogdir}/${servicename}-email.log" + +## Logs Naming +scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +######################## +######## Script ######## +###### Do not edit ##### +######################## + +# Fetches core_dl for file downloads +fn_fetch_core_dl(){ +github_file_url_dir="lgsm/functions" +github_file_url_name="${functionfile}" +filedir="${functionsdir}" +filename="${github_file_url_name}" +githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" +# If the file is missing, then download +if [ ! -f "${filedir}/${filename}" ]; then + if [ ! -d "${filedir}" ]; then + mkdir -p "${filedir}" + fi + echo -e " fetching ${filename}...\c" + # Check curl exists and use available path + curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" + for curlcmd in ${curlpaths} + do + if [ -x "${curlcmd}" ]; then + break + fi + done + # If curl exists download file + if [ "$(basename ${curlcmd})" == "curl" ]; then + curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) + if [ $? -ne 0 ]; then + echo -e "\e[0;31mFAIL\e[0m\n" + echo "${curlfetch}" + echo -e "${githuburl}\n" + exit 1 + else + echo -e "\e[0;32mOK\e[0m" + fi + else + echo -e "\e[0;31mFAIL\e[0m\n" + echo "Curl is not installed!" + echo -e "" + exit 1 + fi + chmod +x "${filedir}/${filename}" +fi +source "${filedir}/${filename}" +} + +core_dl.sh(){ +# Functions are defined in core_functions.sh. +functionfile="${FUNCNAME}" +fn_fetch_core_dl +} + +core_functions.sh(){ +# Functions are defined in core_functions.sh. +functionfile="${FUNCNAME}" +fn_fetch_core_dl +} + +# Prevent from running this script as root. +if [ "$(whoami)" = "root" ]; then + if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then + echo "[ FAIL ] Do NOT run this script as root!" + exit 1 + else + core_functions.sh + check_root.sh + fi +fi + +core_dl.sh +core_functions.sh +getopt=$1 +core_getopt.sh \ No newline at end of file diff --git a/CodenameCURE/ccserver b/CodenameCURE/ccserver index dd622b8ae..00767735f 100644 --- a/CodenameCURE/ccserver +++ b/CodenameCURE/ccserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -42,9 +42,11 @@ parms="-game cure -insecure -strictportbind -ip ${ip} -port ${port} +clientport 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" @@ -188,7 +190,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/CounterStrike/csserver b/CounterStrike/csserver index bca3e12a3..1acc5c203 100644 --- a/CounterStrike/csserver +++ b/CounterStrike/csserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -43,9 +43,11 @@ parms="-game cstrike -strictportbind +ip ${ip} -port ${port} +clientport ${clien 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" @@ -190,7 +192,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/CounterStrikeConditionZero/csczserver b/CounterStrikeConditionZero/csczserver index 5eb278771..d478e5130 100644 --- a/CounterStrikeConditionZero/csczserver +++ b/CounterStrikeConditionZero/csczserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -43,9 +43,11 @@ parms="-game czero -strictportbind +ip ${ip} -port ${port} +clientport ${clientp 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" @@ -190,7 +192,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/CounterStrikeGlobalOffensive/csgoserver b/CounterStrikeGlobalOffensive/csgoserver index 8018883b9..6e06cce57 100755 --- a/CounterStrikeGlobalOffensive/csgoserver +++ b/CounterStrikeGlobalOffensive/csgoserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -67,9 +67,11 @@ parms="-game csgo -usercon -strictportbind -ip ${ip} -port ${port} +clientport $ 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" @@ -213,7 +215,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/CounterStrikeSource/cssserver b/CounterStrikeSource/cssserver index 78345eb9c..5748f9482 100644 --- a/CounterStrikeSource/cssserver +++ b/CounterStrikeSource/cssserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -50,9 +50,11 @@ parms="-game cstrike -strictportbind -ip ${ip} -port ${port} +clientport ${clien 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" @@ -196,7 +198,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/DayOfDefeat/dodserver b/DayOfDefeat/dodserver index e6db43522..b8d5fd24c 100644 --- a/DayOfDefeat/dodserver +++ b/DayOfDefeat/dodserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -44,9 +44,11 @@ parms="-game dod -strictportbind +ip ${ip} -port ${port} +clientport ${clientpor 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" @@ -191,7 +193,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/DayOfDefeatSource/dodsserver b/DayOfDefeatSource/dodsserver index 8386384b6..feae13543 100644 --- a/DayOfDefeatSource/dodsserver +++ b/DayOfDefeatSource/dodsserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -44,9 +44,11 @@ parms="-game dod -strictportbind -ip ${ip} -port ${port} +clientport ${clientpor 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" @@ -190,7 +192,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/DayOfInfamy/doiserver b/DayOfInfamy/doiserver index d39568a53..3059345ab 100644 --- a/DayOfInfamy/doiserver +++ b/DayOfInfamy/doiserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -46,9 +46,11 @@ parms="-game doi -strictportbind -ip ${ip} -port ${port} +clientport ${clientpor 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" @@ -193,7 +195,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/DeathmatchClassic/dmcserver b/DeathmatchClassic/dmcserver index d2be5c1be..38487c7fc 100644 --- a/DeathmatchClassic/dmcserver +++ b/DeathmatchClassic/dmcserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -43,9 +43,11 @@ parms="-game dmc -strictportbind +ip ${ip} -port ${port} +clientport ${clientpor 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" @@ -190,7 +192,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/DontStarveTogether/dstserver b/DontStarveTogether/dstserver index c89ad92f6..1dd527100 100644 --- a/DontStarveTogether/dstserver +++ b/DontStarveTogether/dstserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161120" +version="161118" ########################## ######## Settings ######## @@ -46,9 +46,11 @@ parms="-persistent_storage_root ${persistentstorageroot} -conf_dir ${confdir} -c 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" @@ -196,7 +198,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/DoubleActionBoogaloo/dabserver b/DoubleActionBoogaloo/dabserver index c080c568a..8466f6d5d 100644 --- a/DoubleActionBoogaloo/dabserver +++ b/DoubleActionBoogaloo/dabserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -44,9 +44,11 @@ parms="-strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_por 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" @@ -190,7 +192,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/EmpiresMod/emserver b/EmpiresMod/emserver index 6c2fa539c..7fe58d3b5 100644 --- a/EmpiresMod/emserver +++ b/EmpiresMod/emserver @@ -28,9 +28,11 @@ parms="-game empires -strictportbind -ip ${ip} -port ${port} +clientport ${clien 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" @@ -174,7 +176,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/FistfulOfFrags/fofserver b/FistfulOfFrags/fofserver index 7dc5cc571..5be1b822a 100644 --- a/FistfulOfFrags/fofserver +++ b/FistfulOfFrags/fofserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -44,9 +44,11 @@ parms="-game fof -strictportbind -ip ${ip} -port ${port} +clientport ${clientpor 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" @@ -190,7 +192,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/GarrysMod/gmodserver b/GarrysMod/gmodserver index 1bbba189c..ea7e16c0a 100644 --- a/GarrysMod/gmodserver +++ b/GarrysMod/gmodserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -59,9 +59,11 @@ parms="-game garrysmod -strictportbind -ip ${ip} -port ${port} -tickrate ${tickr 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" @@ -206,7 +208,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/GoldenEyeSource/gesserver b/GoldenEyeSource/gesserver index 7dd85e2f6..7eb70c8ba 100644 --- a/GoldenEyeSource/gesserver +++ b/GoldenEyeSource/gesserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -44,9 +44,11 @@ parms="-game gesource -strictportbind -ip ${ip} -port ${port} +clientport ${clie 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" @@ -190,7 +192,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/HalfLife2Deathmatch/hl2dmserver b/HalfLife2Deathmatch/hl2dmserver index 6b0489fe6..d2e98e034 100644 --- a/HalfLife2Deathmatch/hl2dmserver +++ b/HalfLife2Deathmatch/hl2dmserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -44,9 +44,11 @@ parms="-game hl2mp -strictportbind -ip ${ip} -port ${port} +clientport ${clientp 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" @@ -190,7 +192,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/HalfLifeDeathmatch/hldmserver b/HalfLifeDeathmatch/hldmserver index 43e3bf106..455bd016c 100644 --- a/HalfLifeDeathmatch/hldmserver +++ b/HalfLifeDeathmatch/hldmserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -43,9 +43,11 @@ parms="-game valve -strictportbind +ip ${ip} -port ${port} +clientport ${clientp 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" @@ -189,7 +191,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/HalfLifeDeathmatchSource/hldmsserver b/HalfLifeDeathmatchSource/hldmsserver index 07b2c24cf..e5e992ef7 100644 --- a/HalfLifeDeathmatchSource/hldmsserver +++ b/HalfLifeDeathmatchSource/hldmsserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -44,9 +44,11 @@ parms="-game hl1mp -strictportbind -ip ${ip} -port ${port} +clientport ${clientp 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" @@ -193,7 +195,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/Hurtworld/hwserver b/Hurtworld/hwserver index d63e5a346..81e085dcd 100644 --- a/Hurtworld/hwserver +++ b/Hurtworld/hwserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -56,9 +56,11 @@ parms="-batchmode -nographics -exec \"host ${port} ${map} ${loadsave};queryport 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" @@ -203,7 +205,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/Insurgency/insserver b/Insurgency/insserver index 6a2748478..89589bdbb 100644 --- a/Insurgency/insserver +++ b/Insurgency/insserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -46,9 +46,11 @@ parms="-game insurgency -strictportbind -ip ${ip} -port ${port} +clientport ${cl 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" @@ -195,7 +197,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/JustCause2/jc2server b/JustCause2/jc2server index 4c89b31c1..5ee07555e 100644 --- a/JustCause2/jc2server +++ b/JustCause2/jc2server @@ -1,9 +1,8 @@ #!/bin/bash -# Just Cause 2 # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs # License: MIT License, Copyright (c) 2016 Daniel Gibbs -# Purpose: GAMENAME | Server Management Script +# 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 @@ -15,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -38,9 +37,11 @@ parms="" 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" @@ -184,7 +185,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/KillingFloor/kfserver b/KillingFloor/kfserver index 5f0e44154..6ff0300c1 100644 --- a/KillingFloor/kfserver +++ b/KillingFloor/kfserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -46,9 +46,11 @@ parms="server ${defaultmap}?game=KFmod.KFGameType?VACSecured=true -nohomedir ini 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" @@ -195,7 +197,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/Left4Dead/l4dserver b/Left4Dead/l4dserver index 2a7a20be1..c72e1c6ec 100644 --- a/Left4Dead/l4dserver +++ b/Left4Dead/l4dserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -43,9 +43,11 @@ parms="-game left4dead -strictportbind -ip ${ip} -port ${port} +clientport ${cli 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" @@ -189,7 +191,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/Left4Dead2/l4d2server b/Left4Dead2/l4d2server index 0a84f1d83..03f71e71e 100644 --- a/Left4Dead2/l4d2server +++ b/Left4Dead2/l4d2server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -43,9 +43,11 @@ parms="-game left4dead2 -strictportbind -ip ${ip} -port ${port} +clientport ${cl 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" @@ -189,7 +191,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/Minecraft/mcserver b/Minecraft/mcserver index ab69b9010..eaac52215 100644 --- a/Minecraft/mcserver +++ b/Minecraft/mcserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -38,9 +38,11 @@ parms="nogui" 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" @@ -175,7 +177,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/Mumble/mumbleserver b/Mumble/mumbleserver index ace1dac08..6e830badb 100644 --- a/Mumble/mumbleserver +++ b/Mumble/mumbleserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -37,9 +37,11 @@ parms="-fg -ini ${servercfgfullpath}" 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" @@ -174,7 +176,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/NS2Combat/ns2cserver b/NS2Combat/ns2cserver index 460ce874c..77688302f 100644 --- a/NS2Combat/ns2cserver +++ b/NS2Combat/ns2cserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -55,9 +55,11 @@ parms="-name \"${servername}\" -port ${port} -webadmin -webdomain ${ip} -webuser 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" @@ -200,7 +202,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/NaturalSelection2/ns2server b/NaturalSelection2/ns2server index 741f37862..bbb60dc34 100644 --- a/NaturalSelection2/ns2server +++ b/NaturalSelection2/ns2server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -55,9 +55,11 @@ parms="-name \"${servername}\" -port ${port} -webadmin -webdomain ${ip} -webuser 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" @@ -200,7 +202,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/NoMoreRoomInHell/nmrihserver b/NoMoreRoomInHell/nmrihserver index d5910ab44..2c4e37ffe 100644 --- a/NoMoreRoomInHell/nmrihserver +++ b/NoMoreRoomInHell/nmrihserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -49,9 +49,11 @@ parms="-game nmrih -insecure -strictportbind -ip ${ip} -port ${port} +clientport 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" @@ -195,7 +197,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/OpposingForce/opforserver b/OpposingForce/opforserver index 1c059ed6b..7b3cc6ef6 100644 --- a/OpposingForce/opforserver +++ b/OpposingForce/opforserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -43,9 +43,11 @@ parms="-game gearbox -strictportbind +ip ${ip} -port ${port} +clientport ${clien 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" @@ -190,7 +192,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/PiratesVikingandKnightsII/pvkiiserver b/PiratesVikingandKnightsII/pvkiiserver index bc7767adb..4861430fe 100644 --- a/PiratesVikingandKnightsII/pvkiiserver +++ b/PiratesVikingandKnightsII/pvkiiserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -44,9 +44,11 @@ parms="-game pvkii -strictportbind -ip ${ip} -port ${port} +clientport ${clientp 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" @@ -190,7 +192,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/ProjectZomboid/pzserver b/ProjectZomboid/pzserver index 0586a2c13..782a2118c 100644 --- a/ProjectZomboid/pzserver +++ b/ProjectZomboid/pzserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -27,7 +27,7 @@ adminpassword="CHANGE_ME" ip="0.0.0.0" fn_parms(){ -parms="-ip ${ip} -adminpassword \"${adminpassword}\"" +parms="-ip ${ip} -adminpassword \"${adminpassword}\" -servername ${servicename}" } #### LinuxGSM Settings #### @@ -38,9 +38,11 @@ parms="-ip ${ip} -adminpassword \"${adminpassword}\"" 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" @@ -96,8 +98,8 @@ filesdir="${rootdir}/serverfiles" systemdir="${filesdir}" executabledir="${filesdir}" executable="./start-server.sh" -servercfg="server.ini" -servercfgdefault="server.cfg" +servercfg="${servicename}.ini" +servercfgdefault="server.ini" servercfgdir="${HOME}/Zomboid/Server" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -184,7 +186,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/Quake2/q2server b/Quake2/q2server index 94de84180..3a0723a1a 100644 --- a/Quake2/q2server +++ b/Quake2/q2server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -39,9 +39,11 @@ parms="+set dedicated 1 +set ip ${ip} +set port ${port} +exec ${servercfg} +set 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" @@ -174,7 +176,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/Quake3/q3server b/Quake3/q3server index c302f10c0..445875a85 100644 --- a/Quake3/q3server +++ b/Quake3/q3server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -40,9 +40,11 @@ parms="+set sv_punkbuster 0 +set fs_basepath ${filesdir} +set dedicated 1 +set c 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" @@ -175,7 +177,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/QuakeLive/qlserver b/QuakeLive/qlserver index 33cc3696c..19fb451fa 100755 --- a/QuakeLive/qlserver +++ b/QuakeLive/qlserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -47,9 +47,11 @@ parms="+set net_strict 1 +set net_ip ${ip} +set net_port ${port} +set fs_homepat 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" @@ -194,7 +196,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/QuakeWorld/qwserver b/QuakeWorld/qwserver index 78449e81f..5e1bb60de 100644 --- a/QuakeWorld/qwserver +++ b/QuakeWorld/qwserver @@ -24,6 +24,7 @@ email="email@example.com" # https://www.pushbullet.com/#settings pushbulletalert="off" pushbullettoken="accesstoken" +channeltag="" # Start Variables ip="0.0.0.0" diff --git a/RedOrchestra/roserver b/RedOrchestra/roserver index 025bf348c..97534b981 100644 --- a/RedOrchestra/roserver +++ b/RedOrchestra/roserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -44,9 +44,11 @@ parms="server ${defaultmap}?game=ROGame.ROTeamGame?VACSecured=true -nohomedir in 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" @@ -197,7 +199,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/Ricochet/ricochetserver b/Ricochet/ricochetserver index 8eb18e0c1..419bc04c6 100644 --- a/Ricochet/ricochetserver +++ b/Ricochet/ricochetserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -67,9 +67,11 @@ parms="" 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" @@ -214,7 +216,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/Rust/rustserver b/Rust/rustserver index 0ac0ab260..6e153a9a9 100644 --- a/Rust/rustserver +++ b/Rust/rustserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -59,9 +59,11 @@ fi 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" @@ -208,10 +210,10 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh core_functions.sh getopt=$1 -core_getopt.sh \ No newline at end of file +core_getopt.sh diff --git a/SeriousSam3BFE/ss3sserver b/SeriousSam3BFE/ss3sserver index f0b1181e9..bf5b8b3d9 100644 --- a/SeriousSam3BFE/ss3sserver +++ b/SeriousSam3BFE/ss3sserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -39,9 +39,11 @@ parms="+ip ${ip} +logfile ${gamelog} +exec ${servercfgfullpath}" 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" @@ -187,7 +189,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/Starbound/sbserver b/Starbound/sbserver index dd5e70e4e..ef4f73ef9 100644 --- a/Starbound/sbserver +++ b/Starbound/sbserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -43,9 +43,11 @@ parms="" 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" @@ -189,7 +191,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/SvenCoop/svenserver b/SvenCoop/svenserver index 82101fefa..c6fecf4ba 100644 --- a/SvenCoop/svenserver +++ b/SvenCoop/svenserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -43,9 +43,11 @@ parms="-game svencoop -strictportbind +ip ${ip} -port ${port} +clientport ${clie 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" @@ -189,7 +191,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/TeamFortress2/tf2server b/TeamFortress2/tf2server index 5adfaa87b..2d9a3da3c 100644 --- a/TeamFortress2/tf2server +++ b/TeamFortress2/tf2server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -47,9 +47,11 @@ parms="-game tf -strictportbind -ip ${ip} -port ${port} +clientport ${clientport 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" @@ -193,7 +195,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/TeamFortressClassic/tfcserver b/TeamFortressClassic/tfcserver index 8b6994e4a..9b80dca60 100644 --- a/TeamFortressClassic/tfcserver +++ b/TeamFortressClassic/tfcserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -43,9 +43,11 @@ parms="-game tfc -strictportbind _ip ${ip} -port ${port} +clientport ${clientpor 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" @@ -190,7 +192,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/TeamSpeak3/ts3server b/TeamSpeak3/ts3server index f0bfbb8ea..10e3344ec 100644 --- a/TeamSpeak3/ts3server +++ b/TeamSpeak3/ts3server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -31,9 +31,11 @@ version="161030" 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" @@ -166,7 +168,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/Teeworlds/twserver b/Teeworlds/twserver index bae6a0427..2db116724 100644 --- a/Teeworlds/twserver +++ b/Teeworlds/twserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -43,9 +43,11 @@ parms="-f ${servercfgfullpath}" 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" @@ -190,7 +192,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/Terraria/terrariaserver b/Terraria/terrariaserver index a7b2b6c8b..bcc9a270e 100644 --- a/Terraria/terrariaserver +++ b/Terraria/terrariaserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -43,9 +43,11 @@ parms="-config ${servercfgfullpath}" 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" @@ -189,7 +191,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/UnrealTournament/utserver b/UnrealTournament/utserver index d011b93ad..e40cba5cb 100644 --- a/UnrealTournament/utserver +++ b/UnrealTournament/utserver @@ -1,5 +1,4 @@ #!/bin/bash -# Unreal Tournament # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs # License: MIT License, Copyright (c) 2016 Daniel Gibbs @@ -15,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -45,9 +44,11 @@ parms="UnrealTournament ${defaultmap}?Game=${gametype}?TimeLimit=${timelimit} -p 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" @@ -179,7 +180,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/UnrealTournament2004/ut2k4server b/UnrealTournament2004/ut2k4server index c8c1f55ee..bfbce6d08 100644 --- a/UnrealTournament2004/ut2k4server +++ b/UnrealTournament2004/ut2k4server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -40,9 +40,11 @@ parms="server ${defaultmap}?game=XGame.xDeathMatch -nohomedir ini=${servercfg} l 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" @@ -178,7 +180,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/UnrealTournament3/ut3server b/UnrealTournament3/ut3server index b65b633bb..3a70643ee 100644 --- a/UnrealTournament3/ut3server +++ b/UnrealTournament3/ut3server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -51,9 +51,11 @@ parms="server ${defaultmap}?Game=${game}?bIsDedicated=${isdedicated}?bIsLanMatch 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" @@ -188,7 +190,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/UnrealTournament99/ut99server b/UnrealTournament99/ut99server index 8787df657..c08403f97 100644 --- a/UnrealTournament99/ut99server +++ b/UnrealTournament99/ut99server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -40,9 +40,11 @@ parms="server ${defaultmap}.unr ini=${servercfgfullpath}" 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" @@ -176,7 +178,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/WolfensteinEnemyTerritory/wetserver b/WolfensteinEnemyTerritory/wetserver index c4a5a0db8..ff33e2647 100644 --- a/WolfensteinEnemyTerritory/wetserver +++ b/WolfensteinEnemyTerritory/wetserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161030" +version="161118" ########################## ######## Settings ######## @@ -39,9 +39,11 @@ fn_parms(){ 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" @@ -177,7 +179,7 @@ if [ "$(whoami)" = "root" ]; then else core_functions.sh check_root.sh - fi + fi fi core_dl.sh diff --git a/lgsm/functions/alert_email.sh b/lgsm/functions/alert_email.sh index abca02525..7ec60b661 100644 --- a/lgsm/functions/alert_email.sh +++ b/lgsm/functions/alert_email.sh @@ -100,7 +100,7 @@ fn_details_gameserver(){ # Server IP: 1.2.3.4:27960 # RCON password: CHANGE_ME # Server password: NOT SET - # Slots: 16 + # Maxplayers: 16 # Status: OFFLINE { @@ -133,9 +133,9 @@ fn_details_gameserver(){ echo -e "Stats password: ********" fi - # Slots - if [ -n "${slots}" ]; then - echo -e "Slots: ${slots}" + # Maxplayers + if [ -n "${maxplayers}" ]; then + echo -e "Maxplayers: ${slots}" fi # Game mode diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh index 75b99a70a..36e0a8f04 100644 --- a/lgsm/functions/check_deps.sh +++ b/lgsm/functions/check_deps.sh @@ -189,7 +189,7 @@ if [ -n "$(command -v dpkg-query)" ]; then elif [ "${gamename}" == "Battlefield: 1942" ]; then array_deps_required+=( libncurses5:i386 ) # Call of Duty - elif [ "${gamename}" == "Call of Duty" ]; then + elif [ "${gamename}" == "Call of Duty" ]||[ "${gamename}" == "Call of Duty 2" ]; then array_deps_required+=( libstdc++5:i386 ) # Project Zomboid and Minecraft elif [ "${engine}" == "projectzomboid" ]||[ "${engine}" == "lwjgl2" ]; then @@ -201,7 +201,7 @@ if [ -n "$(command -v dpkg-query)" ]; then fi # GoldenEye: Source elif [ "${gamename}" == "GoldenEye: Source" ]; then - array_deps_required+=( zlib1g:i386 ) + array_deps_required+=( zlib1g:i386 libldap-2.4-2:i386 ) # Unreal Engine elif [ "${executable}" == "./ucc-bin" ]; then #UT2K4 @@ -261,7 +261,7 @@ elif [ -n "$(command -v yum)" ]; then elif [ "${gamename}" == "Battlefield: 1942" ]; then array_deps_required+=( ncurses-libs.i686 ) # Call of Duty - elif [ "${gamename}" == "Call of Duty" ]; then + elif [ "${gamename}" == "Call of Duty" ]||[ "${gamename}" == "Call of Duty 2" ]; then array_deps_required+=( compat-libstdc++-33.i686 ) # Project Zomboid and Minecraft elif [ "${engine}" == "projectzomboid" ]||[ "${engine}" == "lwjgl2" ]; then @@ -273,7 +273,7 @@ elif [ -n "$(command -v yum)" ]; then fi # GoldenEye: Source elif [ "${gamename}" == "GoldenEye: Source" ]; then - array_deps_required+=( zlib.i686 ) + array_deps_required+=( zlib.i686 openldap.i686 ) # Unreal Engine elif [ "${executable}" == "./ucc-bin" ]; then #UT2K4 diff --git a/lgsm/functions/check_ip.sh b/lgsm/functions/check_ip.sh index c51015299..8141c534e 100644 --- a/lgsm/functions/check_ip.sh +++ b/lgsm/functions/check_ip.sh @@ -8,7 +8,7 @@ local commandname="CHECK" local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -if [ "${gamename}" != "TeamSpeak 3" ] && [ "${gamename}" != "Mumble" ]; then +if [ "${gamename}" != "TeamSpeak 3" ]&&[ "${gamename}" != "Mumble" ]&&[ "${travistest}" != "1" ]; then if [ ! -f "/bin/ip" ]; then ipcommand="/sbin/ip" else diff --git a/lgsm/functions/command_backup.sh b/lgsm/functions/command_backup.sh index 34d014c42..8e18a619b 100644 --- a/lgsm/functions/command_backup.sh +++ b/lgsm/functions/command_backup.sh @@ -127,18 +127,20 @@ fn_backup_compression(){ fn_print_ok_nl "Completed: ${backupname}.tar.gz, total size $(du -sh "${backupdir}/${backupname}.tar.gz" | awk '{print $1}')" fn_script_log_pass "Backup created: ${backupname}.tar.gz, total size $(du -sh "${backupdir}/${backupname}.tar.gz" | awk '{print $1}')" fi + # Remove lock file + rm -f "${tmpdir}/.backup.lock" } # Clear old backups according to maxbackups and maxbackupdays variables fn_backup_prune(){ - # How many backups there are - info_distro.sh - # How many backups exceed maxbackups - backupquotadiff=$((backupcount-maxbackups)) - # How many backups exceed maxbackupdays - backupsoudatedcount=$(find "${backupdir}"/ -type f -name "*.tar.gz" -mtime +"${maxbackupdays}"|wc -l) - # If backup variables are set - if [ -n "${maxbackupdays}" ]&&[ -n "${maxbackups}" ]; then + # Clear if backup variables are set + if [ -n "${maxbackups}" ]&&[ -n "${maxbackupdays}" ]; then + # How many backups there are + info_distro.sh + # How many backups exceed maxbackups + backupquotadiff=$((backupcount-maxbackups)) + # How many backups exceed maxbackupdays + backupsoudatedcount=$(find "${backupdir}"/ -type f -name "*.tar.gz" -mtime +"${maxbackupdays}"|wc -l) # If anything can be cleared if [ "${backupquotadiff}" -gt "0" ]||[ "${backupsoudatedcount}" -gt "0" ]; then fn_print_dots "Pruning" @@ -195,8 +197,4 @@ fn_backup_dir fn_backup_compression fn_backup_prune fn_backup_start_server - -# Remove lock file -rm -f "${tmpdir}/.backup.lock" - core_exit.sh diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index f42378504..2776d3f0d 100644 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -98,7 +98,7 @@ fn_details_gameserver(){ # Server IP: 1.2.3.4:27960 # RCON password: CHANGE_ME # Server password: NOT SET - # Slots: 16 + # Maxplayers: 16 # Status: OFFLINE echo -e "" @@ -133,9 +133,9 @@ fn_details_gameserver(){ echo -e "${blue}Stats password:\t${default}${statspassword}" fi - # Slots - if [ -n "${slots}" ]; then - echo -e "${blue}Slots:\t${default}${slots}" + # Maxplayers + if [ -n "${maxplayers}" ]; then + echo -e "${blue}Maxplayers:\t${default}${slots}" fi # Game mode @@ -318,7 +318,7 @@ fn_details_ports(){ fi done # engines that require editing in the script file - local ports_edit_array=( "starbound" "spark" "source" "goldsource" "Rust" "Hurtworld" "unreal4") + local ports_edit_array=( "Hurtworld" "iw3.0" "goldsource" "Rust" "spark" "source" "starbound" "unreal4" ) for port_edit in "${ports_edit_array[@]}" do if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]; then @@ -360,6 +360,33 @@ fn_details_cod(){ } | column -s $'\t' -t } +fn_details_coduo(){ + echo -e "netstat -atunp | grep coduo_lnxded" + echo -e "" + { + echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "> Game\tINBOUND\t${port}\tudp" + } | column -s $'\t' -t +} + +fn_details_cod2(){ + echo -e "netstat -atunp | grep cod2_lnxded" + echo -e "" + { + echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "> Game\tINBOUND\t${port}\tudp" + } | column -s $'\t' -t +} + +fn_details_codwaw(){ + echo -e "netstat -atunp | grep codwaw_lnxded" + echo -e "" + { + echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "> Game\tINBOUND\t${port}\tudp" + } | column -s $'\t' -t +} + fn_details_dontstarve(){ echo -e "netstat -atunp | grep dontstarve" echo -e "" @@ -665,7 +692,6 @@ fn_details_ark(){ } | column -s $'\t' -t } - # Run checks and gathers details to display. fn_display_details() { @@ -722,6 +748,12 @@ fn_display_details() { fn_details_ark elif [ "${gamename}" == "Call of Duty" ]; then fn_details_cod + elif [ "${gamename}" == "Call of Duty: United Offensive" ]; then + fn_details_coduo + elif [ "${gamename}" == "Call of Duty 2" ]; then + fn_details_cod2 + elif [ "${gamename}" == "Call of Duty: World at War" ]; then + fn_details_codwaw elif [ "${gamename}" == "Hurtworld" ]; then fn_details_hurtworld elif [ "${gamename}" == "QuakeWorld" ]; then diff --git a/lgsm/functions/command_install.sh b/lgsm/functions/command_install.sh index b415f47a3..d7c3cbc54 100644 --- a/lgsm/functions/command_install.sh +++ b/lgsm/functions/command_install.sh @@ -18,7 +18,7 @@ check_deps.sh if [ "${gamename}" == "Unreal Tournament 2004" ]; then install_server_files.sh install_ut2k4_key.sh -elif [ "${gamename}" == "Battlefield: 1942" ]||[ "${gamename}" == "Call of Duty" ]||[ "${gamename}" == "Minecraft" ]||[ "${gamename}" == "Quake 2" ]||[ "${gamename}" == "Quake 3: Arena" ]||[ "${gamename}" == "QuakeWorld" ]||[ "${gamename}" == "Unreal Tournament 99" ]||[ "${gamename}" == "Unreal Tournament 3" ]||[ "${gamename}" == "Unreal Tournament" ]||[ "${gamename}" == "TeamSpeak 3" ]||[ "${gamename}" == "Mumble" ]||[ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then +elif [ "${gamename}" == "Battlefield: 1942" ]||[ "${gamename}" == "Call of Duty" ]||[ "${gamename}" == "Call of Duty: United Offensive" ]||[ "${gamename}" == "Call of Duty 2" ]||[ "${gamename}" == "Call of Duty: World at War" ]||[ "${gamename}" == "Minecraft" ]||[ "${gamename}" == "Quake 2" ]||[ "${gamename}" == "Quake 3: Arena" ]||[ "${gamename}" == "QuakeWorld" ]||[ "${gamename}" == "Unreal Tournament 99" ]||[ "${gamename}" == "Unreal Tournament" ]||[ "${gamename}" == "Unreal Tournament 3" ]||[ "${gamename}" == "TeamSpeak 3" ]||[ "${gamename}" == "Mumble" ]||[ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then installer=1 install_server_files.sh elif [ -n "${appid}" ]; then diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index 3c6d7fad4..7f247795f 100644 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -79,7 +79,7 @@ fn_monitor_tmux(){ fn_print_ok_eol_nl fn_script_log_pass "Checking session: OK" # runs gsquery check on game with specific engines. - local allowed_engines_array=( avalanche goldsource idtech3 idtech3_ql quake refractor realvirtuality source spark unity3d unreal unreal2 ) + local allowed_engines_array=( avalanche goldsource idtech3 idtech3_ql iw2.0 iw3.0 quake refractor realvirtuality source spark unity3d unreal unreal2 ) for allowed_engine in "${allowed_engines_array[@]}" do if [ "${allowed_engine}" == "${engine}" ]; then diff --git a/lgsm/functions/command_start.sh b/lgsm/functions/command_start.sh index 57dcbfa60..30bbfccc8 100644 --- a/lgsm/functions/command_start.sh +++ b/lgsm/functions/command_start.sh @@ -37,7 +37,7 @@ fn_start_teamspeak3(){ date > "${rootdir}/${lockselfname}" cd "${executabledir}" if [ "${ts3serverpass}" == "1" ];then - ./ts3server_startscript.sh start serveradmin_password="${newpassword}" inifile="${servercfgfullpath}" + ./ts3server_startscript.sh start serveradmin_password="${newpassword}" inifile="${servercfgfullpath}" > /dev/null 2>&1 else ./ts3server_startscript.sh start inifile="${servercfgfullpath}" > /dev/null 2>&1 fi diff --git a/lgsm/functions/command_ts3_server_pass.sh b/lgsm/functions/command_ts3_server_pass.sh index 89c3cd036..1a9896889 100644 --- a/lgsm/functions/command_ts3_server_pass.sh +++ b/lgsm/functions/command_ts3_server_pass.sh @@ -29,22 +29,17 @@ fn_serveradmin_password_prompt(){ done fn_script_log_info "Initiating ${gamename} ServerAdmin password change" read -p "Enter new password : " newpassword - } +} - fn_serveradmin_password_set(){ - fn_print_info_nl "Applying new password" - fn_script_log_info "Applying new password" +fn_serveradmin_password_set(){ + fn_print_info_nl "Starting server with new password..." + fn_script_log_info "Starting server with new password" sleep 1 - # Stop any running server - command_stop.sh # Start server in "new password mode" ts3serverpass="1" - fn_print_info_nl "Starting server with new password" + exitbypass="1" command_start.sh - # Stop server in "new password mode" - command_stop.sh - ts3serverpass="0" fn_print_ok_nl "Password applied" fn_script_log_pass "New ServerAdmin password applied" sleep 1 @@ -55,9 +50,16 @@ check.sh fn_serveradmin_password_prompt check_status.sh if [ "${status}" != "0" ]; then + # Stop any running server + exitbypass="1" + command_stop.sh fn_serveradmin_password_set - command_start.sh + ts3serverpass="0" + fn_print_info_nl "Restarting server normally" + fn_script_log_info "Restarting server normally" + command_restart.sh else fn_serveradmin_password_set + command_stop.sh fi -core_exit.sh \ No newline at end of file +core_exit.sh diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 746027581..ae1b436ea 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -362,6 +362,11 @@ functionfile="${FUNCNAME}" fn_fetch_function } +fix_rust.sh(){ +functionfile="${FUNCNAME}" +fn_fetch_function +} + # Info info_config.sh(){ diff --git a/lgsm/functions/core_getopt.sh b/lgsm/functions/core_getopt.sh index 2a553b582..8434f4454 100644 --- a/lgsm/functions/core_getopt.sh +++ b/lgsm/functions/core_getopt.sh @@ -699,7 +699,7 @@ case "${getopt}" in if [ "${gamename}" == "Mumble" ]; then fn_getopt_mumble -elif [ "${gamename}" == "Battlefield: 1942" ]||[ "${gamename}" == "Call of Duty" ]||[ "${gamename}" == "QuakeWorld" ]||[ "${gamename}" == "Quake 2" ]||[ "${gamename}" == "Quake 3: Arena" ]||[ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then +elif [ "${gamename}" == "Battlefield: 1942" ]||[ "${gamename}" == "Call of Duty" ]||[ "${gamename}" == "Call of Duty: United Offensive" ]||[ "${gamename}" == "Call of Duty 2" ]||[ "${gamename}" == "Call of Duty: World at War" ]||[ "${gamename}" == "QuakeWorld" ]||[ "${gamename}" == "Quake 2" ]||[ "${gamename}" == "Quake 3: Arena" ]||[ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then fn_getopt_generic_no_update elif [ "${engine}" == "lwjgl2" ]; then fn_getopt_minecraft diff --git a/lgsm/functions/fix.sh b/lgsm/functions/fix.sh index 5671ed627..85a65a814 100644 --- a/lgsm/functions/fix.sh +++ b/lgsm/functions/fix.sh @@ -45,6 +45,8 @@ if [ "${function_selfname}" != "command_install.sh" ]; then fix_ges.sh elif [ "${gamename}" == "Insurgency" ]; then fix_ins.sh + elif [ "${gamename}" == "Rust" ]; then + fix_rust.sh fi fi diff --git a/lgsm/functions/fix_coduo.sh b/lgsm/functions/fix_coduo.sh new file mode 100644 index 000000000..09835eadb --- /dev/null +++ b/lgsm/functions/fix_coduo.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# LGSM fix_coduo.sh function +# Author: Alexander Hurd +# Website: https://gameservermanagers.com +# Description: Fixes for Call of Duty: United Offensive + +local commandname="FIX" +local commandaction="Fix" + +# Force glibc fix +fix_glibc.sh + diff --git a/lgsm/functions/fix_glibc.sh b/lgsm/functions/fix_glibc.sh index 5abc18e9a..bd793d72a 100644 --- a/lgsm/functions/fix_glibc.sh +++ b/lgsm/functions/fix_glibc.sh @@ -40,4 +40,12 @@ do fi done +if [ "${gamename}" == "Call of Duty: United Offensive" ]; then + fn_fetch_file_github "lgsm/lib/gcc3" "libgcc_s.so.1" "${lgsmdir}/lib" "noexecutecmd" "norun" "noforce" "nomd5" + fn_fetch_file_github "lgsm/lib/gcc3" "libstdc++.so.5.0.3" "${lgsmdir}/lib" "noexecutecmd" "norun" "noforce" "nomd5" + if [ ! -f "${lgsmdir}/lib/libstdc++.so.5" ]; then + ln -s "${lgsmdir}/lib/libstdc++.so.5.0.3" "${lgsmdir}/lib/libstdc++.so.5" + fi +fi + export LD_LIBRARY_PATH=:"${libdir}" diff --git a/lgsm/functions/fix_rust.sh b/lgsm/functions/fix_rust.sh new file mode 100644 index 000000000..ec0b125d4 --- /dev/null +++ b/lgsm/functions/fix_rust.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# LGSM fix_rust.sh function +# Author: Daniel Gibbs +# Website: https://gameservermanagers.com +# Description: Resolves startup issue with Rust + +local commandname="FIX" +local commandaction="Fix" + +# Fixes: [Raknet] Server Shutting Down (Shutting Down) +export LD_LIBRARY_PATH="${systemdir}/RustDedicated_Data/Plugins/x86_64" diff --git a/lgsm/functions/gsquery.py b/lgsm/functions/gsquery.py index cd46717cd..512d7411b 100644 --- a/lgsm/functions/gsquery.py +++ b/lgsm/functions/gsquery.py @@ -26,6 +26,10 @@ class GameServer: self.query_prompt_string = b'\xff\xff\xff\xffstatus\x00' elif self.option.engine == 'idtech3': self.query_prompt_string = b'\xff\xff\xff\xffgetstatus' + elif self.option.engine == 'iw2.0': + self.query_prompt_string = b'\xff\xff\xff\xffgetstatus' + elif self.option.engine == 'iw3.0': + self.query_prompt_string = b'\xff\xff\xff\xffgetstatus' elif self.option.engine == 'quake': self.query_prompt_string = b'\xff\xff\xff\xffstatus\x00' elif self.option.engine == 'quakelive': @@ -113,7 +117,7 @@ if __name__ == '__main__': action='store', dest='engine', default=False, - help='Engine type: avalanche, goldsource, idtech2, idtech3, realvirtuality, quake, quakelive, refractor, spark, source, unity3d, unreal, unreal2.' + help='Engine type: avalanche, goldsource, idtech2, idtech3, iw2.0, iw3.0, realvirtuality, quake, quakelive, refractor, spark, source, unity3d, unreal, unreal2.' ) parser.add_option( '-v', '--verbose', diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index e083e622a..09cd8900d 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -18,13 +18,13 @@ fn_info_config_avalanche(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" serverpassword="${unavailable}" - slots="${zero}" + maxplayers="${zero}" port="${zero}" else servername=$(grep "Name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/Name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') serverpassword=$(grep "Password" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - slots=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') + maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') port=$(grep "BindPort" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') ip=$(grep "BindIP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/BindIP//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') @@ -34,7 +34,7 @@ fn_info_config_avalanche(){ # Not Set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} - slots=${slots:-"0"} + maxplayers=${maxplayers:-"0"} port=${port:-"0"} fi } @@ -43,14 +43,14 @@ fn_info_config_bf1942(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" serverpassword="${unavailable}" - slots="${zero}" + maxplayers="${zero}" port="${zero}" queryport="${zero}" else servername=$(grep "game.serverName " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverName //g' | tr -d '=\";,:' | xargs) serverpassword=$(grep "game.serverPassword" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/game.serverPassword//g' | tr -d '=\";,:' | xargs) - slots=$(grep "game.serverMaxPlayers" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') + maxplayers=$(grep "game.serverMaxPlayers" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') port=$(grep "game.serverPort" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') queryport="22000" @@ -61,7 +61,7 @@ fn_info_config_bf1942(){ # Not Set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} - slots=${slots:-"0"} + maxplayers=${maxplayers:-"0"} port=${port:-"0"} fi } @@ -80,18 +80,46 @@ fn_info_config_cod(){ fi } +fn_info_config_cod2(){ + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + rconpassword="${unavailable}" + else + servername=$(grep "sv_hostname " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname //g' | tr -d '=\";,:' | xargs) + rconpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + + # Not Set + servername=${servername:-"NOT SET"} + rconpassword=${rconpassword=:-"NOT SET"} + fi +} + +fn_info_config_codwaw(){ + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + rconpassword="${unavailable}" + else + servername=$(grep "sv_hostname " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname //g' | tr -d '=\";,:' | xargs) + rconpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + + # Not Set + servername=${servername:-"NOT SET"} + rconpassword=${rconpassword=:-"NOT SET"} + fi +} + fn_info_config_dontstarve(){ if [ ! -f "${clustercfgfullpath}" ]; then servername="${unavailable}" serverpassword="${unavailable}" - slots="${zero}" + maxplayers="${zero}" gamemode="${unavailable}" tickrate="${zero}" masterport="${zero}" else servername=$(grep "cluster_name" "${clustercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/cluster_name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') serverpassword=$(grep "cluster_password" "${clustercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/cluster_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - slots=$(grep "max_players" "${clustercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + maxplayers=$(grep "max_players" "${clustercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') gamemode=$(grep "game_mode" "${clustercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/game_mode//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') tickrate=$(grep "tick_rate" "${clustercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') masterport=$(grep "master_port" "${clustercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') @@ -103,7 +131,7 @@ fn_info_config_dontstarve(){ # Not Set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} - slots=${slots:-"0"} + maxplayers=${maxplayers:-"0"} gamemode=${gamemode:-"NOT SET"} tickrate=${tickrate:-"0"} masterport=${masterport:-"0"} @@ -130,7 +158,7 @@ fn_info_config_minecraft(){ servername="${unavailable}" rconpassword="${unavailable}" rconport="${zero}" - slots="${zero}" + maxplayers="${zero}" port="${zero}" gamemode="${unavailable}" gameworld="${unavailable}" @@ -138,7 +166,7 @@ fn_info_config_minecraft(){ servername=$(grep "motd" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/motd//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') rconpassword=$(grep "rcon.password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/rcon.password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') rconport=$(grep "rcon.port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - slots=$(grep "max-players" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + maxplayers=$(grep "max-players" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') port=$(grep "server-port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') gamemode=$(grep "gamemode" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') gameworld=$(grep "level-name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/level-name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') @@ -151,7 +179,7 @@ fn_info_config_minecraft(){ servername=${servername:-"NOT SET"} rconpassword=${rconpassword:-"NOT SET"} rconport=${rconport:-"NOT SET"} - slots=${slots:-"NOT SET"} + maxplayers=${maxplayers:-"NOT SET"} port=${port:-"NOT SET"} gamemode=${gamemode:-"NOT SET"} gameworld=${gameworld:-"NOT SET"} @@ -164,14 +192,14 @@ fn_info_config_projectzomboid(){ servername="${unavailable}" serverpassword="${unavailable}" rconpassword="${unavailable}" - slots="${zero}" + maxplayers="${zero}" port="${zero}" gameworld="${unavailable}" else servername=$(grep "PublicName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/PublicName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') serverpassword=$(grep "Password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' | grep "^Password" | sed -e '/^#/d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') rconpassword=$(grep "RCONPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/RCONPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - slots=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') port=$(grep "DefaultPort" "${servercfgfullpath}" | tr -cd '[:digit:]') gameworld=$(grep "Map" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' | grep "^Map" | sed -e '/^#/d' -e 's/Map//g' | tr -d '=\";' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') @@ -179,7 +207,7 @@ fn_info_config_projectzomboid(){ servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} rconpassword=${rconpassword:-"NOT SET"} - slots=${slots:-"NOT SET"} + maxplayers=${maxplayers:-"NOT SET"} port=${port:-"NOT SET"} gameworld=${gameworld:-"NOT SET"} fi @@ -190,16 +218,16 @@ fn_info_config_quake2(){ rconpassword="${unavailable}" servername="${unavailable}" serverpassword="${unavailable}" - slots="${zero}" + maxplayers="${zero}" else rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - slots=$(grep "maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + maxplayers=$(grep "maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') # Not Set rconpassword=${rconpassword:-"NOT SET"} servername=${servername:-"NOT SET"} - slots=${slots:-"0"} + maxplayers=${maxplayers:-"0"} fi } @@ -208,18 +236,18 @@ fn_info_config_quake3(){ rconpassword="${unavailable}" servername="${unavailable}" serverpassword="${unavailable}" - slots="${zero}" + maxplayers="${zero}" else rconpassword=$(grep "zmq_rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set zmq_rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') serverpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - slots=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + maxplayers=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') # Not Set rconpassword=${rconpassword:-"NOT SET"} servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} - slots=${slots:-"0"} + maxplayers=${maxplayers:-"0"} fi } @@ -228,12 +256,12 @@ fn_info_config_quakelive(){ rconpassword="${unavailable}" servername="${unavailable}" serverpassword="${unavailable}" - slots="${zero}" + maxplayers="${zero}" else rconpassword=$(grep "zmq_rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set zmq_rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') serverpassword=$(grep "g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - slots=$(grep "sv_maxClients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + maxplayers=$(grep "sv_maxClients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') ip=$(grep "set net_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set net_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') ipsetinconfig=1 @@ -243,7 +271,7 @@ fn_info_config_quakelive(){ rconpassword=${rconpassword:-"NOT SET"} servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} - slots=${slots:-"0"} + maxplayers=${maxplayers:-"0"} fi } @@ -252,14 +280,14 @@ fn_info_config_wolfensteinenemyterritory(){ rconpassword="${unavailable}" servername="${unavailable}" serverpassword="${unavailable}" - slots="${zero}" + maxplayers="${zero}" port="${zero}" else port=$(grep "set net_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') rconpassword=$(grep "set zmq_rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set zmq_rcon_password //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//g' -e '/^\//d' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') servername=$(grep "set sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') serverpassword=$(grep "set g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - slots=$(grep "set sv_maxclients" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + maxplayers=$(grep "set sv_maxclients" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') ip=$(grep "set net_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set net_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') ipsetinconfig=1 @@ -269,7 +297,7 @@ fn_info_config_wolfensteinenemyterritory(){ rconpassword=${rconpassword:-"NOT SET"} servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} - slots=${slots:-"0"} + maxplayers=${maxplayers:-"0"} port=${port:-"27960"} fi } @@ -279,18 +307,18 @@ fn_info_config_realvirtuality(){ servername="${unavailable}" adminpassword="${unavailable}" serverpassword="${unavailable}" - slots="${zero}" + maxplayers="${zero}" else servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') adminpassword=$(grep "passwordAdmin" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/passwordAdmin//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') serverpassword=$(grep "password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - slots=$(grep "maxPlayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + maxplayers=$(grep "maxPlayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') # Not Set servername=${servername:-"NOT SET"} adminpassword=${adminpassword:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} - slots=${slots:-"0"} + maxplayers=${maxplayers:-"0"} fi } @@ -299,20 +327,20 @@ fn_info_config_seriousengine35(){ servername="${unavailable}" rconpassword="${unavailable}" gamemode="${unavailable}" - slots="${zero}" + maxplayers="${zero}" port="${zero}" else servername=$(grep "prj_strMultiplayerSessionName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/prj_strMultiplayerSessionName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') rconpassword=$(grep "rcts_strAdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/rcts_strAdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') gamemode=$(grep "gam_idGameMode" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/gam_idGameMode//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - slots=$(grep "gam_ctMaxPlayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + maxplayers=$(grep "gam_ctMaxPlayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') port=$(grep "prj_uwPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') # Not Set servername=${servername:-"NOT SET"} rconpassword=${rconpassword:-"NOT SET"} gamemode=${gamemode:-"NOT SET"} - slots=${slots:-"0"} + maxplayers=${maxplayers:-"0"} port=${port:-"0"} fi } @@ -341,14 +369,14 @@ fn_info_config_starbound(){ port="21025" queryport="21025" rconport="21026" - slots="8" + maxplayers="8" else servername=$(grep "serverName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e 's/serverName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') rconpassword=$(grep "rconServerPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e 's/rconServerPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') port=$(grep "gameServerPort" "${servercfgfullpath}" | tr -cd '[:digit:]') queryport=$(grep "queryServerPort" "${servercfgfullpath}" | tr -cd '[:digit:]') rconport=$(grep "rconServerPort" "${servercfgfullpath}" | tr -cd '[:digit:]') - slots=$(grep "maxPlayers" "${servercfgfullpath}" | tr -cd '[:digit:]') + maxplayers=$(grep "maxPlayers" "${servercfgfullpath}" | tr -cd '[:digit:]') # Not Set servername=${servername:-"NOT SET"} @@ -356,7 +384,7 @@ fn_info_config_starbound(){ port=${port:-"21025"} queryport=${queryport:-"21025"} rconport=${rconport:-"21026"} - slots=${slots:-"8"} + maxplayers=${maxplayers:-"8"} fi } @@ -409,20 +437,20 @@ fn_info_config_teeworlds(){ serverpassword="${unavailable}" rconpassword="${unavailable}" port="8303" - slots="12" + maxplayers="12" else servername=$(grep "sv_name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/^sv_name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') serverpassword=$(grep "password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' | grep "^password" | sed -e '/^#/d' -e 's/^password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') rconpassword=$(grep "sv_rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/^sv_rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') port=$(grep "sv_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - slots=$(grep "sv_max_clients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + maxplayers=$(grep "sv_max_clients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') # Not Set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} rconpassword=${rconpassword:-"NOT SET"} port=${port:-"8303"} - slots=${slots:-"12"} + maxplayers=${maxplayers:-"12"} fi } @@ -431,18 +459,18 @@ fn_info_config_terraria(){ servername="${unavailable}" port="${zero}" gameworld="${unavailable}" - slots="${zero}" + maxplayers="${zero}" else servername=$(grep "worldname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/worldname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') port=$(grep "port" "${servercfgfullpath}" | tr -cd '[:digit:]') gameworld=$(grep "world=" "${servercfgfullpath}" | grep -v "//" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/world=//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - slots=$(grep "maxplayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + maxplayers=$(grep "maxplayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') # Not Set servername=${servername:-"NOT SET"} port=${port:-"0"} gameworld=${gameworld:-"NOT SET"} - slots=${slots:-"0"} + maxplayers=${maxplayers:-"0"} fi } @@ -498,7 +526,7 @@ fn_info_config_sdtd(){ telnetenabled="${unavailable}" telnetport="${zero}" telnetpass="${unavailable}" - slots="${unavailable}" + maxplayers="${unavailable}" gamemode="${unavailable}" gameworld="${unavailable}" else @@ -514,7 +542,7 @@ fn_info_config_sdtd(){ telnetport=$(grep "TelnetPort" "${servercfgfullpath}" | tr -cd '[:digit:]') telnetpass=$(grep "TelnetPassword" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") - slots=$(grep "ServerMaxPlayerCount" "${servercfgfullpath}" | tr -cd '[:digit:]') + maxplayers=$(grep "ServerMaxPlayerCount" "${servercfgfullpath}" | tr -cd '[:digit:]') gamemode=$(grep "GameMode" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") gameworld=$(grep "GameWorld" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") @@ -529,7 +557,7 @@ fn_info_config_sdtd(){ telnetenabled=${telnetenabled:-"NOT SET"} telnetport=${telnetport:-"0"} telnetpass=${telnetpass:-"NOT SET"} - slots=${slots:-"NOT SET"} + maxplayers=${maxplayers:-"NOT SET"} gamemode=${gamemode:-"NOT SET"} gameworld=${gameworld:-"NOT SET"} fi @@ -542,8 +570,14 @@ if [ "${engine}" == "avalanche" ]; then elif [ "${gamename}" == "Battlefield: 1942" ]; then fn_info_config_bf1942 # Call of Duty -elif [ "${gamename}" == "Call of Duty" ]; then +elif [ "${gamename}" == "Call of Duty" ]||[ "${gamename}" == "Call of Duty: United Offensive" ]; then fn_info_config_cod +# Call of Duty 2 +elif [ "${gamename}" == "Call of Duty 2" ]; then + fn_info_config_cod2 +# Call of Duty: World at War +elif [ "${gamename}" == "Call of Duty: World at War" ]; then + fn_info_config_codwaw # Dont Starve Together elif [ "${engine}" == "dontstarve" ]; then fn_info_config_dontstarve diff --git a/lgsm/functions/info_glibc.sh b/lgsm/functions/info_glibc.sh index d5564bbe8..b8b29239c 100644 --- a/lgsm/functions/info_glibc.sh +++ b/lgsm/functions/info_glibc.sh @@ -16,7 +16,16 @@ elif [ "${gamename}" == "BrainBread 2" ]; then glibcrequired="2.17" elif [ "${gamename}" == "Call of Duty" ]; then glibcrequired="2.1" - glibcfix="yes" + glibcfix="no" +elif [ "${gamename}" == "Call of Duty 2" ]; then + glibcrequired="2.1.3" + glibcfix="no" +elif [ "${gamename}" == "Call of Duty: United Offensive" ]; then + glibcrequired="2.1" + glibcfix="no" +elif [ "${gamename}" == "Call of Duty: World at War" ]; then + glibcrequired="2.3.2" + glibcfix="no" elif [ "${gamename}" == "Day of Infamy" ]; then glibcrequired="2.15" glibcfix="yes" @@ -34,7 +43,7 @@ elif [ "${gamename}" == "Garry's Mod" ]; then glibcfix="yes" elif [ "${gamename}" == "GoldenEye: Source" ]; then glibcrequired="2.15" - glibcfix="no" + glibcfix="yes" elif [ "${gamename}" == "Insurgency" ]; then glibcrequired="2.15" glibcfix="yes" diff --git a/lgsm/functions/info_parms.sh b/lgsm/functions/info_parms.sh index 7cfdd8b8b..72ef857c9 100644 --- a/lgsm/functions/info_parms.sh +++ b/lgsm/functions/info_parms.sh @@ -49,20 +49,20 @@ fn_info_config_teeworlds(){ serverpassword="${unavailable}" rconpassword="${unavailable}" port="8303" - slots="12" + maxplayers="12" else servername=$(grep "sv_name" "${servercfgfullpath}" | sed 's/sv_name //g' | sed 's/"//g') serverpassword=$(grep "password " "${servercfgfullpath}" | awk '!/sv_rcon_password/'| sed 's/password //g' | tr -d '=\"; ') rconpassword=$(grep "sv_rcon_password" "${servercfgfullpath}" | sed 's/sv_rcon_password //g' | tr -d '=\"; ') port=$(grep "sv_port" "${servercfgfullpath}" | tr -cd '[:digit:]') - slots=$(grep "sv_max_clients" "${servercfgfullpath}" | tr -cd '[:digit:]') + maxplayers=$(grep "sv_max_clients" "${servercfgfullpath}" | tr -cd '[:digit:]') # Not Set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} rconpassword=${rconpassword:-"NOT SET"} port=${port:-"8303"} - slots=${slots:-"12"} + maxplayers=${maxplayers:-"12"} fi } diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 16b2882ee..b5f7a1148 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -170,6 +170,24 @@ elif [ "${gamename}" == "Call of Duty" ]; then fn_fetch_default_config fn_default_config_remote fn_set_config_vars +elif [ "${gamename}" == "Call of Duty: United Offensive" ]; then + gamedirname="CallOfDutyUnitedOffensive" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars +elif [ "${gamename}" == "Call of Duty 2" ]; then + gamedirname="CallofDuty2" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars +elif [ "${gamename}" == "Call of Duty: World at War" ]; then + gamedirname="CallOfDutyWorldAtWar" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars elif [ "${gamename}" == "Codename CURE" ]; then gamedirname="CodenameCURE" array_configs+=( server.cfg ) @@ -344,6 +362,7 @@ elif [ "${gamename}" == "Pirates, Vikings, and Knights II" ]; then fn_set_config_vars elif [ "${gamename}" == "Project Zomboid" ]; then gamedirname="ProjectZomboid" + fn_check_cfgdir array_configs+=( server.ini ) fn_fetch_default_config fn_default_config_remote @@ -394,7 +413,7 @@ elif [ "${gamename}" == "Serious Sam 3: BFE" ]; then fn_set_config_vars elif [ "${gamename}" == "Starbound" ]; then gamedirname="Starbound" - array_configs+=( starbound.config ) + array_configs+=( starbound_server.config ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index 18268fc3f..bc28bd2f2 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -9,29 +9,34 @@ local commandaction="Install" local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" fn_install_server_files(){ - if [ "${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" - 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 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" - elif [ "${gamename}" == "Battlefield: 1942" ]; then + 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" - 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" - elif [ "${gamename}" == "Unreal Tournament" ]; then - fileurl="http://files.gameservermanagers.com/UnrealTournament/UnrealTournament-Server-XAN-3045522-Linux.zip"; filedir="${tmpdir}"; filename="UnrealTournament-Server-XAN-3045522-Linux.zip"; executecmd="noexecute" run="norun"; force="noforce"; md5="553fed5645a9fc623e92563049bf79f6" - 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}" == "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" + 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" + elif [ "${gamename}" == "Call of Duty 2" ]; then + fileurl="http://files.gameservermanagers.com/CallOfDuty2/cod2-lnxded-1.3-full.tar.bz2"; filedir="${tmpdir}"; filename="cod2-lnxded-1.3-full.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="078128f83d06dc3d7699428dc2870214" + elif [ "${gamename}" == "Call of Duty: World at War" ]; then + fileurl="http://files.gameservermanagers.com/CallOfDutyWorldAtWar/codwaw-lnxded-1.7-full.tar.bz2"; filedir="${tmpdir}"; filename="codwaw-lnxded-1.7-full.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="0489697ff3bf678c109bfb377d1b7895" + elif [ "${gamename}" == "GoldenEye: Source" ]; then + fileurl="http://files.gameservermanagers.com/GoldenEyeSource/GoldenEye_Source_v5.0.1_full_server_linux.tar.bz2"; filedir="${tmpdir}"; filename="GoldenEye_Source_v5.0.1_server_full_Linux.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="ea227a150300abe346e757380325f84c" elif [ "${gamename}" == "Quake 2" ]; then 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" 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" 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" - + 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 + 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" + elif [ "${gamename}" == "Unreal Tournament" ]; then + fileurl="http://files.gameservermanagers.com/UnrealTournament/UnrealTournament-Server-XAN-3045522-Linux.zip"; filedir="${tmpdir}"; filename="UnrealTournament-Server-XAN-3045522-Linux.zip"; executecmd="noexecute" run="norun"; force="noforce"; md5="553fed5645a9fc623e92563049bf79f6" + 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" + 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" fi fn_fetch_file "${fileurl}" "${filedir}" "${filename}" "${executecmd}" "${run}" "${force}" "${md5}" fn_dl_extract "${filedir}" "${filename}" "${filesdir}" diff --git a/lgsm/lib/gcc3/libgcc_s.so.1 b/lgsm/lib/gcc3/libgcc_s.so.1 new file mode 100644 index 000000000..acb442512 Binary files /dev/null and b/lgsm/lib/gcc3/libgcc_s.so.1 differ diff --git a/lgsm/lib/gcc3/libstdc++.so.5.0.3 b/lgsm/lib/gcc3/libstdc++.so.5.0.3 new file mode 100755 index 000000000..65db75723 Binary files /dev/null and b/lgsm/lib/gcc3/libstdc++.so.5.0.3 differ diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 7a6b62b5d..d141d58c7 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -1,60 +1,91 @@ #!/bin/bash -# TravisCI Tests: Just Cause 2 -# Server Management Script +# Just Cause 2 +# Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: TravisCI Test: 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 -version="101716" +travistest=1 + +# Debugging if [ -f ".dev-debug" ]; then exec 5>dev-debug.log BASH_XTRACEFD="5" set -x fi -#### Variables #### +version="161118" -# Notification Alerts -# (on|off) +########################## +######## Settings ######## +########################## + +#### Server Settings #### +# No settings available for Just Cause 2 -# Email +## 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="email@example.com" +emailfrom="" -# Pushbullet -# https://www.pushbullet.com/#settings +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet pushbulletalert="off" pushbullettoken="accesstoken" -# Steam login -steamuser="anonymous" -steampass="" - -# Start Variables +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update updateonstart="off" -fn_parms(){ -parms="" -} +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" -#### Advanced Variables #### +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### 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 +## Github Branch Select # Allows for the use of different function files # from a different repo and/or branch. githubuser="GameServerManagers" githubrepo="LinuxGSM" githubbranch="$TRAVIS_BRANCH" -# Steam -appid="261140" - -# Server Details -servicename="jc2-server" +## LinuxGSM Server Details +# Do not edit gamename="Just Cause 2" engine="avalanche" -# Directories +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="jc2-server" + +#### Directories #### +# Edit with care + +## Work Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" @@ -63,6 +94,8 @@ functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" + +## Server Specific Directories systemdir="${filesdir}" executabledir="${filesdir}" executable="./Jcmp-Server" @@ -70,24 +103,26 @@ servercfg="config.lua" servercfgdefault="config.lua" servercfgdir="${filesdir}" servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory backupdir="${rootdir}/backups" -# Logging -logdays="7" +## Logging Directories #gamelogdir="" # No server logs available scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -consolelogging="on" - scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" -scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" +## Logs Naming +scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" -##### Script ##### -# Do not edit +######################## +######## Script ######## +###### Do not edit ##### +######################## # Fetches core_dl for file downloads fn_fetch_core_dl(){ @@ -144,6 +179,17 @@ 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