From 9ba341f125196fb1174a8b9b7ff41d5c9defdf31 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Sat, 19 Dec 2015 23:48:50 +0100 Subject: [PATCH 01/50] Testing, not working yet --- Hurtworld/hurtworldserver | 138 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 Hurtworld/hurtworldserver diff --git a/Hurtworld/hurtworldserver b/Hurtworld/hurtworldserver new file mode 100644 index 000000000..e669bff65 --- /dev/null +++ b/Hurtworld/hurtworldserver @@ -0,0 +1,138 @@ +#!/bin/bash +# Hurtworld +# Server Management Script +# Author: Daniel Gibbs, UltimateByte Fork +# Website: http://gameservermanagers.com +version="191215" + +#### Variables #### + +# Notification Email +# (on|off) +emailnotification="off" +email="email@example.com" + +# Steam login +steamuser="anonymous" +steampass="" + +# Start Variables +servername="Hurtworld LGSM Server" +logfile="gamelog.txt" +ip="0.0.0.0" +hostport="12871" +queryport="12881" +maxplayers="20" +map="" +creativemode="0" #Free Build (0 is off) +updateonstart="off" +loadsave="" #For maintenance only +logfile="gamelog.txt" + +# http://7daystodie.gamepedia.com/Server +fn_parms(){ +parms="-batchmode -nographics -exec \"host ${hostport} ${map} ${save};queryport ${queryport};maxplayers ${maxplayers};servername ${servername};creativemode ${creativemode}\" -logfile \"${logfile}\" " +} + +#### Advanced Variables #### + +# Github Branch Select +# Allows for the use of different function files +# from a different repo and/or branch. +githubuser="dgibbs64" +githubrepo="linuxgsm" +githubbranch="master" + +# Steam +appid="405100" + +# Server Details +servicename="hurtworld-server" +gamename="hurtworld" +engine="unity3d" + +# Directories +rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" +selfname=$(basename $(readlink -f "${BASH_SOURCE[0]}")) +lockselfname=".${servicename}.lock" +filesdir="${rootdir}/serverfiles" +systemdir="${filesdir}" +executabledir="${filesdir}" +executable="./Hurtworld.x86" +servercfg="${servicename}.xml" +servercfgdir="${filesdir}" +servercfgfullpath="${servercfgdir}/${servercfg}" +servercfgdefault="${servercfgdir}/serverconfig.xml" +backupdir="${rootdir}/backups" + +# Logging +logdays="7" +gamelogdir="${rootdir}/log/server" +scriptlogdir="${rootdir}/log/script" +consolelogdir="${rootdir}/log/console" + +gamelog="${gamelogdir}/${servicename}-game.log" +scriptlog="${scriptlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${scriptlogdir}/${servicename}-email.log" + +scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" + +##### Script ##### +# Do not edit + +fn_getgithubfile(){ +filename=$1 +exec=$2 +fileurl=${3:-$filename} +filepath="${rootdir}/${filename}" +filedir=$(dirname "${filepath}") +# If the function file is missing, then download +if [ ! -f "${filepath}" ]; then + if [ ! -d "${filedir}" ]; then + mkdir "${filedir}" + fi + githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${fileurl}" + echo -e " fetching ${filename}...\c" + if [ "$(command -v curl)" ]||[ "$(which curl >/dev/null 2>&1)" ]||[ -f "/usr/bin/curl" ]||[ -f "/bin/curl" ]; then + : + else + echo -e "\e[0;31mFAIL\e[0m\n" + echo "Curl is not installed!" + echo -e "" + exit + fi + curl=$(curl --fail -o "${filepath}" "${githuburl}" 2>&1) + if [ $? -ne 0 ]; then + echo -e "\e[0;31mFAIL\e[0m\n" + echo " ${curl}"|grep "curl:" + echo -e "${githuburl}\n" + exit + else + echo -e "\e[0;32mOK\e[0m" + fi + if [ "${exec}" ]; then + chmod +x "${filepath}" + fi +fi +if [ "${exec}" ]; then + source "${filepath}" +fi +} + +fn_runfunction(){ + fn_getgithubfile "functions/${functionfile}" 1 +} + +fn_functions(){ +# Functions are defined in fn_functions. +functionfile="${FUNCNAME}" +fn_runfunction +} + +fn_functions + +getopt=$1 +fn_getopt + From b69ea037a8402931d4f3d9fd374d8394993709be Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Sun, 20 Dec 2015 00:13:44 +0100 Subject: [PATCH 02/50] Update hurtworldserver --- Hurtworld/hurtworldserver | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Hurtworld/hurtworldserver b/Hurtworld/hurtworldserver index e669bff65..25f3d3175 100644 --- a/Hurtworld/hurtworldserver +++ b/Hurtworld/hurtworldserver @@ -29,7 +29,7 @@ updateonstart="off" loadsave="" #For maintenance only logfile="gamelog.txt" -# http://7daystodie.gamepedia.com/Server +# http://hurtworld.wikia.com/wiki/Hosting_A_Server fn_parms(){ parms="-batchmode -nographics -exec \"host ${hostport} ${map} ${save};queryport ${queryport};maxplayers ${maxplayers};servername ${servername};creativemode ${creativemode}\" -logfile \"${logfile}\" " } From 150110fbe8ea569c08a3428367e6f9e4f5b5348e Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 20 Dec 2015 23:35:59 +0000 Subject: [PATCH 03/50] Renamed to hwserver --- Hurtworld/{hurtworldserver => hwserver} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Hurtworld/{hurtworldserver => hwserver} (100%) diff --git a/Hurtworld/hurtworldserver b/Hurtworld/hwserver similarity index 100% rename from Hurtworld/hurtworldserver rename to Hurtworld/hwserver From aae4610b0c409d6581500f537d294444731f8202 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 20 Dec 2015 23:37:19 +0000 Subject: [PATCH 04/50] updated githubbranch= while in development --- Hurtworld/hwserver | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Hurtworld/hwserver b/Hurtworld/hwserver index 25f3d3175..15e077920 100644 --- a/Hurtworld/hwserver +++ b/Hurtworld/hwserver @@ -41,7 +41,7 @@ parms="-batchmode -nographics -exec \"host ${hostport} ${map} ${save};queryport # from a different repo and/or branch. githubuser="dgibbs64" githubrepo="linuxgsm" -githubbranch="master" +githubbranch="hurt-world" # Steam appid="405100" From 9e3789f7adec966f12d752a477b6253c923b8af0 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 20 Dec 2015 23:40:26 +0000 Subject: [PATCH 05/50] updated header now includes dev-debug option. --- Hurtworld/hwserver | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Hurtworld/hwserver b/Hurtworld/hwserver index 15e077920..388c0b5b5 100644 --- a/Hurtworld/hwserver +++ b/Hurtworld/hwserver @@ -1,8 +1,15 @@ #!/bin/bash # Hurtworld # Server Management Script -# Author: Daniel Gibbs, UltimateByte Fork +# Author: Daniel Gibbs, +# Contributor: UltimateByte # Website: http://gameservermanagers.com +if [ -f ".dev-debug" ]; then + exec 5>dev-debug.log + BASH_XTRACEFD="5" + set -x +fi + version="191215" #### Variables #### From 024545265885647230d5047ecbbdd09a7c8fe945 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Mon, 21 Dec 2015 00:47:07 +0100 Subject: [PATCH 06/50] Removed useless IP variable Need to see serverconfig.xml, could be useless. --- Hurtworld/hwserver | 1 - 1 file changed, 1 deletion(-) diff --git a/Hurtworld/hwserver b/Hurtworld/hwserver index 388c0b5b5..1ec1ecd96 100644 --- a/Hurtworld/hwserver +++ b/Hurtworld/hwserver @@ -26,7 +26,6 @@ steampass="" # Start Variables servername="Hurtworld LGSM Server" logfile="gamelog.txt" -ip="0.0.0.0" hostport="12871" queryport="12881" maxplayers="20" From b94e1adbe4e35c32bb338287ef2572afeac24fe4 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Mon, 21 Dec 2015 01:11:51 +0100 Subject: [PATCH 07/50] added hwunity3d matching the name in fn_monitor_query and hwserver as the serverport number isn't found into "${servercfgfullpath}" like for sdtd --- GameServerQuery/gsquery.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/GameServerQuery/gsquery.py b/GameServerQuery/gsquery.py index a1380a5a7..70eb08951 100644 --- a/GameServerQuery/gsquery.py +++ b/GameServerQuery/gsquery.py @@ -27,6 +27,8 @@ class GameServer: self.query_prompt_string = '\xFF\xFF\xFF\xFFTSource Engine Query\0' if self.option.engine == 'unity3d': self.query_prompt_string = '\xFF\xFF\xFF\xFFTSource Engine Query\0' + if self.option.engine == 'hwunity3d': + self.query_prompt_string = '\xFF\xFF\xFF\xFFTSource Engine Query\0' elif self.option.engine == 'unreal': self.query_prompt_string = '\x5C\x69\x6E\x66\x6F\x5C' elif self.option.engine == 'unreal2': @@ -101,7 +103,7 @@ if __name__ == '__main__': action = 'store', dest = 'engine', default = False, - help = 'Engine type: avalanche, goldsource, realvirtuality, spark, source, unity3d, unreal, unreal2.' + help = 'Engine type: avalanche, goldsource, realvirtuality, spark, source, unity3d, hwunity3d, unreal, unreal2.' ) parser.add_option( '-v', '--verbose', From d69576e34a51acaa641bd49474d5b5999a989a63 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Mon, 21 Dec 2015 01:22:10 +0100 Subject: [PATCH 08/50] Renamed variables, readded IP for gsquery --- Hurtworld/hwserver | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Hurtworld/hwserver b/Hurtworld/hwserver index 1ec1ecd96..e89901cdd 100644 --- a/Hurtworld/hwserver +++ b/Hurtworld/hwserver @@ -25,9 +25,9 @@ steampass="" # Start Variables servername="Hurtworld LGSM Server" -logfile="gamelog.txt" -hostport="12871" +port="12871" queryport="12881" +ip="0.0.0.0" #For server monitoring maxplayers="20" map="" creativemode="0" #Free Build (0 is off) @@ -37,7 +37,7 @@ logfile="gamelog.txt" # http://hurtworld.wikia.com/wiki/Hosting_A_Server fn_parms(){ -parms="-batchmode -nographics -exec \"host ${hostport} ${map} ${save};queryport ${queryport};maxplayers ${maxplayers};servername ${servername};creativemode ${creativemode}\" -logfile \"${logfile}\" " +parms="-batchmode -nographics -exec \"host ${port} ${map} ${save};queryport ${queryport};maxplayers ${maxplayers};servername ${servername};creativemode ${creativemode}\" -logfile \"${logfile}\" " } #### Advanced Variables #### @@ -55,7 +55,7 @@ appid="405100" # Server Details servicename="hurtworld-server" gamename="hurtworld" -engine="unity3d" +engine="hwunity3d" # Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" From ab920be2e961f8a7fdd7ce2eac9cec51839d00ab Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Mon, 21 Dec 2015 01:32:02 +0100 Subject: [PATCH 09/50] added hurtworld --- functions/fn_install | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/functions/fn_install b/functions/fn_install index 0cc9129c4..4c781b388 100644 --- a/functions/fn_install +++ b/functions/fn_install @@ -42,5 +42,7 @@ elif [ "${gamename}" == "Unreal Tournament 2004" ]; then fn_install_ut2k4fix elif [ "${gamename}" == "Unreal Tournament 99" ]; then fn_install_ut99fix +elif [ "${gamename}" == "Hurtworld" ]; then + fn_install_hwfix fi -fn_install_complete \ No newline at end of file +fn_install_complete From 38f391bb3258feb8bc3cfbfd123d6fecf0765c7a Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Mon, 21 Dec 2015 01:50:13 +0100 Subject: [PATCH 10/50] Added hurtworld fix Updated description --- functions/fn_install_steamfix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/functions/fn_install_steamfix b/functions/fn_install_steamfix index e977b0f11..c7c205210 100644 --- a/functions/fn_install_steamfix +++ b/functions/fn_install_steamfix @@ -14,10 +14,10 @@ cp -v "${rootdir}/steamcmd/linux32/steamclient.so" "${HOME}/.steam/sdk32/steamcl sleep 1 } -# Gary's Mod Specific +# Server specific fn_libsteamfix(){ echo "" -echo "Applying libsteam.so fix" +echo "Applying libsteam.so and steamclient.so fixes" echo "=================================" sleep 1 if [ "${gamename}" == "Garry's Mod" ]; then @@ -26,6 +26,9 @@ if [ "${gamename}" == "Garry's Mod" ]; then elif [ "${gamename}" == "Serious Sam 3: BFE" ]; then mkdir -pv "${HOME}/.steam/bin32" cp -v "${filesdir}/Bin/libsteam.so" "${HOME}/.steam/bin32/libsteam.so" +elif [ "${gamename}" == "Hurtworld" ]; then + cp -v "${rootdir}/steamcmd/linux32/steamclient.so" "${filesdir}/Hurtworld_Data/Plugins/x86/steamclient.so" + cp -v "${rootdir}/steamcmd/linux32/steamclient.so" "${filesdir}/Hurtworld_Data/Plugins/x86_64/steamclient.so" fi sleep 1 } From de8f3e76573e6a8487d3dfffc6d67fe5ec5bca69 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Mon, 21 Dec 2015 02:06:28 +0100 Subject: [PATCH 11/50] Should now actually run the fix for hurtworld --- functions/fn_install_steamfix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/fn_install_steamfix b/functions/fn_install_steamfix index c7c205210..d94ce3e28 100644 --- a/functions/fn_install_steamfix +++ b/functions/fn_install_steamfix @@ -34,6 +34,6 @@ sleep 1 } fn_steamclientfix -if [ "${gamename}" == "Garry's Mod" ]||[ "${gamename}" == "Serious Sam 3: BFE" ]; then +if [ "${gamename}" == "Garry's Mod" ]||[ "${gamename}" == "Serious Sam 3: BFE" ]||[ "${gamename}" == "Hurtworld" ]; then fn_libsteamfix fi From 4ecb781e8b36a8e78fd5bb2be1458134e3789203 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Mon, 21 Dec 2015 02:12:54 +0100 Subject: [PATCH 12/50] Capital to Hurtworld makes my life better --- Hurtworld/hwserver | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Hurtworld/hwserver b/Hurtworld/hwserver index e89901cdd..fb72533ec 100644 --- a/Hurtworld/hwserver +++ b/Hurtworld/hwserver @@ -54,7 +54,7 @@ appid="405100" # Server Details servicename="hurtworld-server" -gamename="hurtworld" +gamename="Hurtworld" engine="hwunity3d" # Directories From f66abbafad4a471f3503c0d0baae1efe31ca406b Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Mon, 21 Dec 2015 02:18:37 +0100 Subject: [PATCH 13/50] Actually removed useless hurtworld filefix Fix is done with fn_install_steamfix --- functions/fn_install | 2 -- 1 file changed, 2 deletions(-) diff --git a/functions/fn_install b/functions/fn_install index 4c781b388..39fca9c8e 100644 --- a/functions/fn_install +++ b/functions/fn_install @@ -42,7 +42,5 @@ elif [ "${gamename}" == "Unreal Tournament 2004" ]; then fn_install_ut2k4fix elif [ "${gamename}" == "Unreal Tournament 99" ]; then fn_install_ut99fix -elif [ "${gamename}" == "Hurtworld" ]; then - fn_install_hwfix fi fn_install_complete From 4f934bd7a1aaf259dabecf35b373c7c326798f68 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Mon, 21 Dec 2015 02:38:27 +0100 Subject: [PATCH 14/50] trying on hurtworld unity3d --- functions/fn_install_gsquery | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/fn_install_gsquery b/functions/fn_install_gsquery index 3f5bfcebf..5b7db65ea 100644 --- a/functions/fn_install_gsquery +++ b/functions/fn_install_gsquery @@ -11,7 +11,7 @@ wget -N /dev/null "http://gameservermanagers.com/dl/gsquery.py" 2>&1 | grep -F " chmod +x gsquery.py } -if [ "${engine}" == "avalanche" ]||[ "${engine}" == "goldsource" ]||[ "${engine}" == "realvirtuality" ]||[ "${engine}" == "source" ]||[ "${engine}" == "spark" ]||[ "${engine}" == "unity3d" ]||[ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then +if [ "${engine}" == "avalanche" ]||[ "${engine}" == "goldsource" ]||[ "${engine}" == "realvirtuality" ]||[ "${engine}" == "source" ]||[ "${engine}" == "spark" ]||[ "${engine}" == "unity3d" ]||[ "${engine}" == "hwunity3d" ]||[ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then echo "" echo "GameServerQuery" echo "============================" From 949775a4dd37dd39af19f6780fcf34feaa7a06fb Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Mon, 21 Dec 2015 02:58:06 +0100 Subject: [PATCH 15/50] Cleaned useless servercfgs --- Hurtworld/hwserver | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Hurtworld/hwserver b/Hurtworld/hwserver index fb72533ec..46ddc27ad 100644 --- a/Hurtworld/hwserver +++ b/Hurtworld/hwserver @@ -25,14 +25,16 @@ steampass="" # Start Variables servername="Hurtworld LGSM Server" +ip="0.0.0.0" port="12871" queryport="12881" -ip="0.0.0.0" #For server monitoring maxplayers="20" map="" creativemode="0" #Free Build (0 is off) updateonstart="off" -loadsave="" #For maintenance only + +# Maintenance Variables +loadsave="" logfile="gamelog.txt" # http://hurtworld.wikia.com/wiki/Hosting_A_Server @@ -65,10 +67,6 @@ filesdir="${rootdir}/serverfiles" systemdir="${filesdir}" executabledir="${filesdir}" executable="./Hurtworld.x86" -servercfg="${servicename}.xml" -servercfgdir="${filesdir}" -servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/serverconfig.xml" backupdir="${rootdir}/backups" # Logging From 7471a5975469f50158fcea7719a501be551d6a7e Mon Sep 17 00:00:00 2001 From: Phil Date: Mon, 21 Dec 2015 18:33:40 +0100 Subject: [PATCH 16/50] enhanced mod-support added parameters. descriptions taken from: https://community.bistudio.com/wiki/Arma_3_Startup_Parameters -servermod Loads the specified sub-folders for different server-side (not broadcasted to clients) mods. Separated by semi-colons. Absolute path and multiple stacked folders are possible. -autoinit: Automatically initialize mission just like first client does. Note: Server config file (server.cfg) must contain Persistent=1; , if it's 0 autoInit skips. -loadmissiontomemory: Server will load mission into memory on first client downloading it. Then it keeps it pre-processed pre-cached in memory for next clients, saving some server CPU cycles --- Arma3/arma3server | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Arma3/arma3server b/Arma3/arma3server index 93a4256c8..e39534122 100644 --- a/Arma3/arma3server +++ b/Arma3/arma3server @@ -28,7 +28,7 @@ ip="0.0.0.0" updateonstart="off" fn_parms(){ -parms="-netlog -ip=${ip} -cfg=${networkcfgfullpath} -config=${servercfgfullpath} -mod=${mods}" +parms="-netlog -ip=${ip} -cfg=${networkcfgfullpath} -config=${servercfgfullpath} -mod=${mods} -servermod=${servermods} -autoinit -loadmissiontomemory" } # ARMA 3 Modules @@ -38,6 +38,7 @@ parms="-netlog -ip=${ip} -cfg=${networkcfgfullpath} -config=${servercfgfullpath} # mods/\@CBA_A3\;mods/\@task_force_radio # and chmod modules directories to 775 mods="" +servermods="" #### Advanced Variables #### From c9e56d4ee8a14f6477ef25650ef5bd9d8fceac80 Mon Sep 17 00:00:00 2001 From: Phil Date: Mon, 21 Dec 2015 18:53:08 +0100 Subject: [PATCH 17/50] added "-bepath"-parameter This is needed for @Epoch. It does not crash my @Exile server when left empty (@Exile does not need this to be specified, I think it uses the standard path) --- Arma3/arma3server | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Arma3/arma3server b/Arma3/arma3server index e39534122..bd56afd7e 100644 --- a/Arma3/arma3server +++ b/Arma3/arma3server @@ -28,7 +28,7 @@ ip="0.0.0.0" updateonstart="off" fn_parms(){ -parms="-netlog -ip=${ip} -cfg=${networkcfgfullpath} -config=${servercfgfullpath} -mod=${mods} -servermod=${servermods} -autoinit -loadmissiontomemory" +parms="-netlog -ip=${ip} -cfg=${networkcfgfullpath} -config=${servercfgfullpath} -mod=${mods} -servermod=${servermods} -bepath=${bepath} -autoinit -loadmissiontomemory" } # ARMA 3 Modules @@ -39,6 +39,7 @@ parms="-netlog -ip=${ip} -cfg=${networkcfgfullpath} -config=${servercfgfullpath} # and chmod modules directories to 775 mods="" servermods="" +bepath="" #### Advanced Variables #### From 844ddca60d1cd8d887a797b314750ee4b3d3edf0 Mon Sep 17 00:00:00 2001 From: Phil Date: Mon, 21 Dec 2015 19:16:22 +0100 Subject: [PATCH 18/50] added "-port"-parameter If one wants to start multiple arma3servers on one ip. also added comments for my last commit. --- Arma3/arma3server | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Arma3/arma3server b/Arma3/arma3server index bd56afd7e..2a02b8da0 100644 --- a/Arma3/arma3server +++ b/Arma3/arma3server @@ -25,10 +25,11 @@ steampass="password" # Start Variables ip="0.0.0.0" +srvport="2302" updateonstart="off" fn_parms(){ -parms="-netlog -ip=${ip} -cfg=${networkcfgfullpath} -config=${servercfgfullpath} -mod=${mods} -servermod=${servermods} -bepath=${bepath} -autoinit -loadmissiontomemory" +parms="-netlog -ip=${ip} -port=${srvport} -cfg=${networkcfgfullpath} -config=${servercfgfullpath} -mod=${mods} -servermod=${servermods} -bepath=${bepath} -autoinit -loadmissiontomemory" } # ARMA 3 Modules @@ -38,7 +39,12 @@ parms="-netlog -ip=${ip} -cfg=${networkcfgfullpath} -config=${servercfgfullpath} # mods/\@CBA_A3\;mods/\@task_force_radio # and chmod modules directories to 775 mods="" + +# Server-side Mods servermods="" + +# Path to BattlEye +# leave empty for default bepath="" #### Advanced Variables #### From 3c0c237955d5be68394a624ce8b8a78015a11868 Mon Sep 17 00:00:00 2001 From: Phil Date: Mon, 21 Dec 2015 19:29:23 +0100 Subject: [PATCH 19/50] added headless-client server-support Added server-support for headless clients. If this is not specified, no headless-client will be able to connect. --- Arma3/cfg/lgsm-default.server.cfg | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Arma3/cfg/lgsm-default.server.cfg b/Arma3/cfg/lgsm-default.server.cfg index df3f59911..8c64ac36b 100644 --- a/Arma3/cfg/lgsm-default.server.cfg +++ b/Arma3/cfg/lgsm-default.server.cfg @@ -119,4 +119,13 @@ doubleIdDetected = ""; // // ban = ban (_this select 0) onUnsignedData = "kick (_this select 0)"; onHackedData = "kick (_this select 0)"; -onDifferentData = ""; \ No newline at end of file +onDifferentData = ""; + +// HEADLESS CLIENT SUPPORT +// specify ip-adresses of allowed headless clients +// if more than one: +// headlessClients[]={"127.0.0.1", "192.168.0.1"}; +// localClient[]={"127.0.0.1", "192.168.0.1"}; +headlessClients[]={"127.0.0.1"}; +localClient[]={"127.0.0.1"}; +battleyeLicense=1; From c6e6d9705f61ea52404ba62fc90213cc3512bd67 Mon Sep 17 00:00:00 2001 From: Phil Date: Mon, 21 Dec 2015 20:41:26 +0100 Subject: [PATCH 20/50] ARMA 3 port-details Shows the right ports when passing port as parameter --- functions/fn_details_config | 46 ++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/functions/fn_details_config b/functions/fn_details_config index d24751f81..aa0e50608 100644 --- a/functions/fn_details_config +++ b/functions/fn_details_config @@ -209,29 +209,29 @@ elif [ "${engine}" == "realvirtuality" ]; then slots="\e[0;31mUNAVAILABLE\e[0m" fi - # port - if [ -f "${servercfgfullpath}" ]; then - port=$(grep "serverport=" "${servercfgfullpath}" | grep -v // | tr -d '\r' | tr -cd '[:digit:]') - fi - if [ ! -n "${port}" ]; then - port="0" - fi - - # query port - if [ -f "${servercfgfullpath}" ]; then - queryport=$(grep "steamqueryport=" "${servercfgfullpath}" | grep -v // | tr -d '\r' | tr -cd '[:digit:]') - fi - if [ ! -n "${queryport}" ]; then - queryport="0" - fi - - # master port - if [ -f "${servercfgfullpath}" ]; then - masterport=$(grep "steamport=" "${servercfgfullpath}" | grep -v // | tr -d '\r' | tr -cd '[:digit:]') - fi - if [ ! -n "${masterport}" ]; then - masterport="0" - fi + # port + if [ "${srvport}" != "" ]; then + port=${srvport} + fi + if [ ! -n "${port}" ]; then + port="0" + fi + + # query port + if [ "${srvport}" != "" ]; then + queryport=$((srvport+1)) + fi + if [ ! -n "${queryport}" ]; then + queryport="0" + fi + + # master port + if [ "${srvport}" != "" ]; then + masterport=$((srvport+2)) + fi + if [ ! -n "${masterport}" ]; then + masterport="0" + fi fn_servercfgfullpath From 5d3313a96b29f7f53828d25682d2719d9e1d84d0 Mon Sep 17 00:00:00 2001 From: Phil Date: Mon, 21 Dec 2015 21:11:39 +0100 Subject: [PATCH 21/50] commented the ports --- Arma3/cfg/lgsm-default.server.cfg | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Arma3/cfg/lgsm-default.server.cfg b/Arma3/cfg/lgsm-default.server.cfg index 8c64ac36b..51b2c26e6 100644 --- a/Arma3/cfg/lgsm-default.server.cfg +++ b/Arma3/cfg/lgsm-default.server.cfg @@ -5,18 +5,20 @@ // PORTS - +// please specify the serverport as a parameter in arma3server executable +// it will automatically use the serverport including the next 3 for steam query & steam master. +// the fourth port ist not documented in https://community.bistudio.com/wiki/Arma_3_Dedicated_Server#Port_Forwarding // Server Port // default: 2302. -serverport=2302; +// serverport=2302; // Steam Master Port // default: 2304. -steamport=2304; +// steamport=2304; // Steam Query Port // default: 2303. -steamqueryport=2303; +//steamqueryport=2303; // GENERAL SETTINGS From 01890320ab00ecf34aa060da431693dc4764c66a Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Mon, 21 Dec 2015 22:46:14 +0100 Subject: [PATCH 22/50] added hurtworld --- functions/fn_details | 2 ++ 1 file changed, 2 insertions(+) diff --git a/functions/fn_details b/functions/fn_details index 84ac3c0d9..b0f2d7496 100644 --- a/functions/fn_details +++ b/functions/fn_details @@ -729,6 +729,8 @@ elif [ "${engine}" == "unreal" ] || [ "${engine}" == "unreal2" ]; then fn_details_unreal elif [ "${gamename}" == "ARK: Survivial Evolved" ]; then fn_details_ark +elif [ "${gamename}" == "Hurtworld" ]; then + fn_details_hurtworld elif [ "${gamename}" == "Teamspeak 3" ]; then fn_details_teamspeak3 else From 29fe60146bbc3312f66a3bf35571f4074b1feb9a Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Mon, 21 Dec 2015 23:37:00 +0100 Subject: [PATCH 23/50] added hurtworld and comments --- functions/fn_details_config | 52 ++++++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/functions/fn_details_config b/functions/fn_details_config index d24751f81..6fccda497 100644 --- a/functions/fn_details_config +++ b/functions/fn_details_config @@ -235,6 +235,7 @@ elif [ "${engine}" == "realvirtuality" ]; then fn_servercfgfullpath +# Serious Sam elif [ "${engine}" == "seriousengine35" ]; then # server name @@ -295,6 +296,7 @@ elif [ "${engine}" == "seriousengine35" ]; then fn_servercfgfullpath +# Source Engine Games elif [ "${engine}" == "source" ] || [ "${engine}" == "goldsource" ]; then # server name @@ -329,6 +331,7 @@ elif [ "${engine}" == "source" ] || [ "${engine}" == "goldsource" ]; then fn_servercfgfullpath +# Spark (NS2: Combat) elif [ "${engine}" == "spark" ]; then # query port @@ -341,6 +344,7 @@ elif [ "${engine}" == "spark" ]; then fn_servercfgfullpath +# Teamspeak 3 elif [ "${gamename}" == "Teamspeak 3" ]; then # ip @@ -388,6 +392,7 @@ elif [ "${gamename}" == "Teamspeak 3" ]; then fn_servercfgfullpath +# Teeworlds elif [ "${engine}" == "teeworlds" ]; then # server name @@ -440,6 +445,7 @@ elif [ "${engine}" == "teeworlds" ]; then fn_servercfgfullpath +# Terraria elif [ "${engine}" == "terraria" ]; then # port @@ -450,7 +456,8 @@ elif [ "${engine}" == "terraria" ]; then port="0" fi -elif [ "${engine}" == "unity3d" ]; then +# 7 Day To Die (unity3d) +elif [ "${gamename}" == "7 Days To Die" ]; then # server name if [ -f "${servercfgfullpath}" ]; then @@ -586,6 +593,48 @@ elif [ "${engine}" == "unity3d" ]; then fn_servercfgfullpath +# Hurtworld (unity3d) +elif [ "${gamename}" == "Hurtworld" ]; then + + # server name + if [ -n "${servername}" ]; then + servername="${servername}" + else + servername="\e[0;31mUNAVAILABLE\e[0m" + fi + + # server password + # not available yet + + # slots + if [ -n "${maxplayers}" ]; then + slots="{maxplayers}" + else + slots="NOT SET" + fi + + # game world + if [ -n "${map}" ]; then + gameworld="${map}" + else + gameworld="\e[0;31mUNAVAILABLE\e[0m" + fi + + # port + if [ -n "${port}" ]; then + port="${port}" + else + port="0" + fi + + # query port + if [ -n "${queryport}" ]; then + queryport="${queryport}" + else + queryport="0" + fi + +# Unreal Tournament elif [ "${engine}" == "unreal" ] || [ "${engine}" == "unreal2" ]; then # server name @@ -716,6 +765,7 @@ elif [ "${engine}" == "unreal" ] || [ "${engine}" == "unreal2" ]; then fn_servercfgfullpath +# ARK: Survivaial Evolved elif [ "${gamename}" == "ARK: Survivial Evolved" ]; then # server name From 2b95ac671c5b3b406036ade32e0a681c6e0496e6 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Tue, 22 Dec 2015 00:00:01 +0100 Subject: [PATCH 24/50] testing implementing hurtworld --- functions/fn_details | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/functions/fn_details b/functions/fn_details index 4b9b63a4f..b270ba5f4 100644 --- a/functions/fn_details +++ b/functions/fn_details @@ -601,6 +601,37 @@ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = fn_details_statusbottom } +fn_details_hurtworld(){ +fn_check_ip +fn_parms +fn_details_config +fn_details_distro +fn_details_os +fn_details_performance +fn_details_disk +fn_details_gameserver +fn_details_backup +fn_details_commandlineparms +echo -e "" +echo -e "\e[92mPorts\e[0m" +printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = +echo -e "Change ports by editing the parameters in" +echo -e "hwserver script" +echo -e "" +echo -e "Useful port diagnostic command:" +echo -e "netstat -atunp | grep Hurtworld.x86" +echo -e "" +{ + echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "> Game/RCON\tINBOUND\t${port}\tudp" + echo -e "> Query\tINBOUND\t${queryport}\tudp" + +} | column -s $'\t' -t +echo -e "" + +fn_details_statusbottom +} + fn_details_unreal(){ fn_check_ip fn_parms From 5512d400ebf959fd515e9811192abf5a4330f6a4 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Tue, 22 Dec 2015 00:58:14 +0100 Subject: [PATCH 25/50] remove config check for hurtworld --- functions/fn_details | 3 +++ 1 file changed, 3 insertions(+) diff --git a/functions/fn_details b/functions/fn_details index b270ba5f4..b25edca43 100644 --- a/functions/fn_details +++ b/functions/fn_details @@ -719,6 +719,9 @@ fn_details_statusbottom } if [ ! -e "${servercfgfullpath}" ]; then + if [ "${gamename}" == "Hurtworld"]; then + echo "No config file" + else echo "" fn_printwarnnl "\e[0;31mCONFIGURATION FILE MISSING!\e[0m" echo "${servercfgfullpath}" From 8bebb32766b0ba877faf17f993627f8d3b990ad4 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Tue, 22 Dec 2015 01:00:51 +0100 Subject: [PATCH 26/50] Update fn_details --- functions/fn_details | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/functions/fn_details b/functions/fn_details index b25edca43..d07d701cc 100644 --- a/functions/fn_details +++ b/functions/fn_details @@ -720,19 +720,20 @@ fn_details_statusbottom if [ ! -e "${servercfgfullpath}" ]; then if [ "${gamename}" == "Hurtworld"]; then - echo "No config file" + echo "No config file set or required" else - echo "" - fn_printwarnnl "\e[0;31mCONFIGURATION FILE MISSING!\e[0m" - echo "${servercfgfullpath}" - echo "Some details cannot be displayed" - echo -en ".\r" - sleep 1 - echo -en "..\r" - sleep 1 - echo -en "...\r" - sleep 1 - echo -en " \r" + echo "" + fn_printwarnnl "\e[0;31mCONFIGURATION FILE MISSING!\e[0m" + echo "${servercfgfullpath}" + echo "Some details cannot be displayed" + echo -en ".\r" + sleep 1 + echo -en "..\r" + sleep 1 + echo -en "...\r" + sleep 1 + echo -en " \r" + fi fi fn_details_glibc From d3cb2761af232b42fe811ea3f8cdbcbefcc90537 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Tue, 22 Dec 2015 01:05:26 +0100 Subject: [PATCH 27/50] Update fn_details --- functions/fn_details | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/fn_details b/functions/fn_details index d07d701cc..66d2cfbdd 100644 --- a/functions/fn_details +++ b/functions/fn_details @@ -719,7 +719,7 @@ fn_details_statusbottom } if [ ! -e "${servercfgfullpath}" ]; then - if [ "${gamename}" == "Hurtworld"]; then + if [ "${gamename}" == "Hurtworld" ]; then echo "No config file set or required" else echo "" From 12ebddc1cc3cb265b73012fd405582c414f42542 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Tue, 22 Dec 2015 01:10:10 +0100 Subject: [PATCH 28/50] missing $ on maxplayers --- functions/fn_details_config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/fn_details_config b/functions/fn_details_config index 6fccda497..f0be53cf8 100644 --- a/functions/fn_details_config +++ b/functions/fn_details_config @@ -608,7 +608,7 @@ elif [ "${gamename}" == "Hurtworld" ]; then # slots if [ -n "${maxplayers}" ]; then - slots="{maxplayers}" + slots="${maxplayers}" else slots="NOT SET" fi From e976f9b0e574babcddd8a0e19d17322239f7e3fe Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Tue, 22 Dec 2015 01:16:28 +0100 Subject: [PATCH 29/50] simplifying hurtworld checking --- functions/fn_details | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/functions/fn_details b/functions/fn_details index 66d2cfbdd..c85c96559 100644 --- a/functions/fn_details +++ b/functions/fn_details @@ -719,9 +719,7 @@ fn_details_statusbottom } if [ ! -e "${servercfgfullpath}" ]; then - if [ "${gamename}" == "Hurtworld" ]; then - echo "No config file set or required" - else + if [ "${gamename}" != "Hurtworld" ]; then echo "" fn_printwarnnl "\e[0;31mCONFIGURATION FILE MISSING!\e[0m" echo "${servercfgfullpath}" From 65c3158d7d1586f1ba434f40399602f2756bf17d Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Tue, 22 Dec 2015 02:19:55 +0100 Subject: [PATCH 30/50] Update fn_install_gsquery --- functions/fn_install_gsquery | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/fn_install_gsquery b/functions/fn_install_gsquery index 5b7db65ea..fe6ee2cef 100644 --- a/functions/fn_install_gsquery +++ b/functions/fn_install_gsquery @@ -11,7 +11,7 @@ wget -N /dev/null "http://gameservermanagers.com/dl/gsquery.py" 2>&1 | grep -F " chmod +x gsquery.py } -if [ "${engine}" == "avalanche" ]||[ "${engine}" == "goldsource" ]||[ "${engine}" == "realvirtuality" ]||[ "${engine}" == "source" ]||[ "${engine}" == "spark" ]||[ "${engine}" == "unity3d" ]||[ "${engine}" == "hwunity3d" ]||[ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then +if [ "${engine}" == "avalanche" ]||[ "${engine}" == "goldsource" ]||[ "${engine}" == "realvirtuality" ]||[ "${engine}" == "source" ]||[ "${engine}" == "spark" ]||[ "${engine}" == "unity3d" ]||[ "${gamename}" == "Hurtworld" ]||[ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then echo "" echo "GameServerQuery" echo "============================" From 7cb95400c3003d042a4605610065801145c61a42 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Tue, 22 Dec 2015 02:21:01 +0100 Subject: [PATCH 31/50] changed engine hwunity3d to gamename Hurtworld changed engine hwunity3d to gamename Hurtworld --- functions/fn_install_gsquery | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/fn_install_gsquery b/functions/fn_install_gsquery index fe6ee2cef..16b1534ee 100644 --- a/functions/fn_install_gsquery +++ b/functions/fn_install_gsquery @@ -2,7 +2,7 @@ # LGSM fn_install_gsquery function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="061115" +lgsm_version="221215" fn_dlgsquery(){ cd "${rootdir}" From f8d94fa91507b9306afacdfb60d50b50862c4a4b Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Tue, 22 Dec 2015 02:27:22 +0100 Subject: [PATCH 32/50] Don't create config for hurtworld --- functions/fn_install_config | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/functions/fn_install_config b/functions/fn_install_config index 2a0311634..dcd0811de 100644 --- a/functions/fn_install_config +++ b/functions/fn_install_config @@ -5,9 +5,11 @@ lgsm_version="201215" fn_defaultconfig(){ -echo "creating ${servercfg} config file." -cp -v "${servercfgdefault}" "${servercfgfullpath}" -sleep 1 +if [ "${gamename}" != "Hurtworld" ]; then + echo "creating ${servercfg} config file." + cp -v "${servercfgdefault}" "${servercfgfullpath}" + sleep 1 +fi } fn_userinputconfig(){ From 152aee400f25c4623a7ce001d74604dab882cb22 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Tue, 22 Dec 2015 02:28:15 +0100 Subject: [PATCH 33/50] engine set to unity3d --- Hurtworld/hwserver | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Hurtworld/hwserver b/Hurtworld/hwserver index 46ddc27ad..8b92753c3 100644 --- a/Hurtworld/hwserver +++ b/Hurtworld/hwserver @@ -57,7 +57,7 @@ appid="405100" # Server Details servicename="hurtworld-server" gamename="Hurtworld" -engine="hwunity3d" +engine="unity3d" # Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" From 1cdef4ad59144a6ebc418f0ed02dc76aee3242bc Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Tue, 22 Dec 2015 02:40:44 +0100 Subject: [PATCH 34/50] Actually don't create config for hurtworld --- functions/fn_install_config | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/functions/fn_install_config b/functions/fn_install_config index dcd0811de..9ad27b52a 100644 --- a/functions/fn_install_config +++ b/functions/fn_install_config @@ -5,11 +5,9 @@ lgsm_version="201215" fn_defaultconfig(){ -if [ "${gamename}" != "Hurtworld" ]; then echo "creating ${servercfg} config file." cp -v "${servercfgdefault}" "${servercfgfullpath}" sleep 1 -fi } fn_userinputconfig(){ @@ -156,9 +154,12 @@ echo "" echo "Creating Configs" echo "=================================" sleep 1 -mkdir -pv "${servercfgdir}" -cd "${servercfgdir}" -githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}" +if [ "${gamename}" != "Hurtworld" ]; then + mkdir -pv "${servercfgdir}" + cd "${servercfgdir}" + githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}" +fi + if [ "${gamename}" == "7 Days To Die" ]; then fn_defaultconfig elif [ "${gamename}" == "ARK: Survivial Evolved" ]; then From 5ac2e4309980e0df36d5b55b620c487ff572f522 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Tue, 22 Dec 2015 02:43:45 +0100 Subject: [PATCH 35/50] better placement for not creating HW config --- functions/fn_install_config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/fn_install_config b/functions/fn_install_config index 9ad27b52a..d91557360 100644 --- a/functions/fn_install_config +++ b/functions/fn_install_config @@ -151,10 +151,10 @@ echo "" } echo "" +if [ "${gamename}" != "Hurtworld" ]; then echo "Creating Configs" echo "=================================" sleep 1 -if [ "${gamename}" != "Hurtworld" ]; then mkdir -pv "${servercfgdir}" cd "${servercfgdir}" githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}" From 112bab51b74b2255f8f7e811559e5bfa64985103 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Tue, 22 Dec 2015 02:49:37 +0100 Subject: [PATCH 36/50] reverting, removing hwunity3d --- GameServerQuery/gsquery.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/GameServerQuery/gsquery.py b/GameServerQuery/gsquery.py index 70eb08951..a1380a5a7 100644 --- a/GameServerQuery/gsquery.py +++ b/GameServerQuery/gsquery.py @@ -27,8 +27,6 @@ class GameServer: self.query_prompt_string = '\xFF\xFF\xFF\xFFTSource Engine Query\0' if self.option.engine == 'unity3d': self.query_prompt_string = '\xFF\xFF\xFF\xFFTSource Engine Query\0' - if self.option.engine == 'hwunity3d': - self.query_prompt_string = '\xFF\xFF\xFF\xFFTSource Engine Query\0' elif self.option.engine == 'unreal': self.query_prompt_string = '\x5C\x69\x6E\x66\x6F\x5C' elif self.option.engine == 'unreal2': @@ -103,7 +101,7 @@ if __name__ == '__main__': action = 'store', dest = 'engine', default = False, - help = 'Engine type: avalanche, goldsource, realvirtuality, spark, source, unity3d, hwunity3d, unreal, unreal2.' + help = 'Engine type: avalanche, goldsource, realvirtuality, spark, source, unity3d, unreal, unreal2.' ) parser.add_option( '-v', '--verbose', From 22c8d2357d8defa687060d46af8dbc3f43b30c1b Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Tue, 22 Dec 2015 02:53:06 +0100 Subject: [PATCH 37/50] updated message for gameworld to non critical form --- functions/fn_details_config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/fn_details_config b/functions/fn_details_config index f0be53cf8..dfab6de64 100644 --- a/functions/fn_details_config +++ b/functions/fn_details_config @@ -617,7 +617,7 @@ elif [ "${gamename}" == "Hurtworld" ]; then if [ -n "${map}" ]; then gameworld="${map}" else - gameworld="\e[0;31mUNAVAILABLE\e[0m" + gameworld="NO MAP SET" fi # port From b4a40ecef4a3ef8bd73bc7d4e0bbe5bab1eb1ba0 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Tue, 22 Dec 2015 02:59:15 +0100 Subject: [PATCH 38/50] support for hurtworld 7 Days To Die now monitors through gamename, as well as the new Hurtworld --- functions/fn_monitor_query | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/functions/fn_monitor_query b/functions/fn_monitor_query index b75c6dba6..3bfb5077f 100644 --- a/functions/fn_monitor_query +++ b/functions/fn_monitor_query @@ -17,9 +17,12 @@ if [ -f "${rootdir}/gsquery.py" ]; then elif [ "${engine}" == "realvirtuality" ]; then queryport=$(grep -s steamqueryport= "${servercfgfullpath}"|grep -v //|tr -d '\r'|tr -cd '[:digit:]') port=${queryport} - elif [ "${engine}" == "unity3d" ]; then + elif [ "${gamename}" == "7 Days To Die" ]; then gameport=$(grep ServerPort "${servercfgfullpath}"|tr -cd '[:digit:]') port=$((${gameport} + 1)) + elif [ "${gamename}" == "Hurtworld" ]; then + gameport="${port}" + port="${queryport}" fi fn_printinfo "Detected gsquery.py" fn_scriptlog "Detected gsquery.py" From de99b7ee8fc8c69964ea62764171104d96af3c8d Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Tue, 22 Dec 2015 03:12:18 +0100 Subject: [PATCH 39/50] Renamed unity3d to sdtd and check gamename instead --- functions/fn_details | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/functions/fn_details b/functions/fn_details index c85c96559..30313d4e4 100644 --- a/functions/fn_details +++ b/functions/fn_details @@ -554,7 +554,7 @@ echo -e "" fn_details_statusbottom } -fn_details_unity3d(){ +fn_details_sdtd(){ fn_check_ip fn_parms fn_details_config @@ -756,14 +756,14 @@ elif [ "${engine}" == "teeworlds" ]; then fn_details_teeworlds elif [ "${engine}" == "terraria" ]; then fn_details_terraria -elif [ "${engine}" == "unity3d" ]; then - fn_details_unity3d elif [ "${engine}" == "unreal" ] || [ "${engine}" == "unreal2" ]; then fn_details_unreal elif [ "${gamename}" == "ARK: Survivial Evolved" ]; then fn_details_ark elif [ "${gamename}" == "Hurtworld" ]; then fn_details_hurtworld +elif [ "${gamename}" == "7 Days To Die" ]; then + fn_details_sdtd elif [ "${gamename}" == "Teamspeak 3" ]; then fn_details_teamspeak3 else From 310aba93f2628516c19b2493f790e852c92cd412 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Tue, 22 Dec 2015 03:48:35 +0100 Subject: [PATCH 40/50] x64 mode, addadmins, more settings categories --- Hurtworld/hwserver | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/Hurtworld/hwserver b/Hurtworld/hwserver index 8b92753c3..6a01aabfb 100644 --- a/Hurtworld/hwserver +++ b/Hurtworld/hwserver @@ -23,23 +23,31 @@ email="email@example.com" steamuser="anonymous" steampass="" -# Start Variables +# Server settings servername="Hurtworld LGSM Server" ip="0.0.0.0" port="12871" queryport="12881" maxplayers="20" -map="" -creativemode="0" #Free Build (0 is off) -updateonstart="off" +map="" #Optional +creativemode="0" #Free Build -# Maintenance Variables -loadsave="" +# Adding first admins +# Syntax : addadmin STEAMID64; addadmin STEAMID64-bis +# Example : addadmin="addadmin 012345678901234567; addadmin 987654321098765432" +addadmin="" + +# Maintenance settings logfile="gamelog.txt" +loadsave="" + +# EXPERIMENTAL ! Use at your own risk +# Setting this to 1 runs the server with the x64 bits exectutable +x64mode="0" # http://hurtworld.wikia.com/wiki/Hosting_A_Server fn_parms(){ -parms="-batchmode -nographics -exec \"host ${port} ${map} ${save};queryport ${queryport};maxplayers ${maxplayers};servername ${servername};creativemode ${creativemode}\" -logfile \"${logfile}\" " +parms="-batchmode -nographics -exec \"host ${port} ${map} ${save};queryport ${queryport};maxplayers ${maxplayers};servername ${servername};creativemode ${creativemode};${addadmin}\" -logfile \"${logfile}\" " } #### Advanced Variables #### @@ -66,7 +74,11 @@ lockselfname=".${servicename}.lock" filesdir="${rootdir}/serverfiles" systemdir="${filesdir}" executabledir="${filesdir}" -executable="./Hurtworld.x86" +if [ "${x64mode}" == "1" ]; then + executable="./Hurtworld.x86_64" +else + executable="./Hurtworld.x86" +fi backupdir="${rootdir}/backups" # Logging From df7fe2944211cbbe080663675ae0c5f778c5305d Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Tue, 22 Dec 2015 04:13:07 +0100 Subject: [PATCH 41/50] renamed addadmins to admins, save to loadsave, changed comments --- Hurtworld/hwserver | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/Hurtworld/hwserver b/Hurtworld/hwserver index 6a01aabfb..433e05619 100644 --- a/Hurtworld/hwserver +++ b/Hurtworld/hwserver @@ -31,23 +31,21 @@ queryport="12881" maxplayers="20" map="" #Optional creativemode="0" #Free Build +logfile="gamelog.txt" -# Adding first admins -# Syntax : addadmin STEAMID64; addadmin STEAMID64-bis -# Example : addadmin="addadmin 012345678901234567; addadmin 987654321098765432" -addadmin="" +# Adding admins using STEAMID64 +# Example : admins="addadmin 012345678901234567; addadmin 987654321098765432" +admins="" -# Maintenance settings -logfile="gamelog.txt" +# Advanced +# Rollback server state (remove after start command) loadsave="" - -# EXPERIMENTAL ! Use at your own risk -# Setting this to 1 runs the server with the x64 bits exectutable +# Use unstable 64 bit server executable (O/1) x64mode="0" # http://hurtworld.wikia.com/wiki/Hosting_A_Server fn_parms(){ -parms="-batchmode -nographics -exec \"host ${port} ${map} ${save};queryport ${queryport};maxplayers ${maxplayers};servername ${servername};creativemode ${creativemode};${addadmin}\" -logfile \"${logfile}\" " +parms="-batchmode -nographics -exec \"host ${port} ${map} ${loadsave};queryport ${queryport};maxplayers ${maxplayers};servername ${servername};creativemode ${creativemode};${admins}\" -logfile \"${logfile}\" " } #### Advanced Variables #### From a45936d8ff8b5317218808431f0c97eb157e0415 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Tue, 22 Dec 2015 04:16:59 +0100 Subject: [PATCH 42/50] removing quotes from a comment --- Hurtworld/hwserver | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Hurtworld/hwserver b/Hurtworld/hwserver index 433e05619..e74f5648a 100644 --- a/Hurtworld/hwserver +++ b/Hurtworld/hwserver @@ -34,7 +34,7 @@ creativemode="0" #Free Build logfile="gamelog.txt" # Adding admins using STEAMID64 -# Example : admins="addadmin 012345678901234567; addadmin 987654321098765432" +# Example : addadmin 012345678901234567; addadmin 987654321098765432 admins="" # Advanced From 52aba4d2c8c83d8ca44941bf4f2ce48fccaf05ca Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 24 Dec 2015 21:24:46 +0000 Subject: [PATCH 43/50] added more to check.sh --- functions/check.sh | 48 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 functions/check.sh diff --git a/functions/check.sh b/functions/check.sh new file mode 100644 index 000000000..140627aeb --- /dev/null +++ b/functions/check.sh @@ -0,0 +1,48 @@ +#!/bin/bash +# LGSM fn_check function +# Author: Daniel Gibbs +# Website: http://gameservermanagers.com +lgsm_version="201215" + +# Description: Overall function for managing checks. +# Runs checks that will either halt on or fix an issue. + +fn_module_compare() { + local e + for e in "${@:2}"; do [[ "$e" == "$1" ]] && return 0; done + return 1 +} + + +check_root.sh + +if [ "${cmd}" != "install" ]; then + check_systemdir.sh +fi + +no_check_logs=( debug details install map-compressor ) +fn_module_compare "${cmd}" "${no_check_logs[@]}" +if [ $? != 0 ]; then + fn_check_logs +fi + +check_ip=( debug ) +fn_module_compare "${cmd}" "${no_check_logs[@]}" +if [ $? != 0 ]; then + check_ip.sh +fi + +check_ip=( debug ) +fn_module_compare "${cmd}" "${no_check_logs[@]}" +if [ $? != 0 ]; then + check_steamuser.sh + check_steamcmd.sh +fi + +check_ip=( start ) +fn_module_compare "${cmd}" "${no_check_logs[@]}" +if [ $? != 0 ]; then + check_tmux.sh +fi + +#fn_check_ts3status # may need to move out of checks \ No newline at end of file From d52a343e25dd79f413066787646fbee0544a3c5f Mon Sep 17 00:00:00 2001 From: PhilPhonic Date: Fri, 25 Dec 2015 10:29:42 +0100 Subject: [PATCH 44/50] init Support for MariaDB/MySQL --- TeamSpeak3/cfg/lgsm-default.ini | 20 +++++++++++++ TeamSpeak3/ts3server | 1 + functions/fn_functions | 5 ++++ functions/fn_install | 2 ++ functions/fn_install_config | 15 +++------- functions/fn_install_ts3 | 12 -------- functions/fn_install_ts3db | 52 +++++++++++++++++++++++++++++++++ 7 files changed, 84 insertions(+), 23 deletions(-) create mode 100644 TeamSpeak3/cfg/lgsm-default.ini create mode 100644 functions/fn_install_ts3db diff --git a/TeamSpeak3/cfg/lgsm-default.ini b/TeamSpeak3/cfg/lgsm-default.ini new file mode 100644 index 000000000..71000a42e --- /dev/null +++ b/TeamSpeak3/cfg/lgsm-default.ini @@ -0,0 +1,20 @@ +machine_id= +default_voice_port=9987 +voice_ip=0.0.0.0 +licensepath= +filetransfer_port=30033 +filetransfer_ip=0.0.0.0 +query_port=10011 +query_ip=0.0.0.0 +query_ip_whitelist=query_ip_whitelist.txt +query_ip_blacklist=query_ip_blacklist.txt +dbplugin=ts3db_sqlite3 +dbpluginparameter= +dbsqlpath=sql/ +dbsqlcreatepath=create_sqlite/ +dbconnections=10 +logpath=logs +logquerycommands=0 +dbclientkeepdays=30 +logappend=0 +query_skipbruteforcecheck=0 \ No newline at end of file diff --git a/TeamSpeak3/ts3server b/TeamSpeak3/ts3server index 215cb2866..a428798e7 100644 --- a/TeamSpeak3/ts3server +++ b/TeamSpeak3/ts3server @@ -37,6 +37,7 @@ executable="./ts3server_startscript.sh" servercfg="${servicename}.ini" servercfgdir="${filesdir}" servercfgfullpath="${servercfgdir}/${servercfg}" +servercfgdefault="${servercfgdir}/lgsm-default.ini" backupdir="${rootdir}/backups" # Logging diff --git a/functions/fn_functions b/functions/fn_functions index 39e3220d6..30d4dfdd8 100644 --- a/functions/fn_functions +++ b/functions/fn_functions @@ -284,6 +284,11 @@ functionfile="${FUNCNAME}" fn_runfunction } +fn_install_ts3db(){ +functionfile="${FUNCNAME}" +fn_runfunction +} + fn_install_ut2k4(){ functionfile="${FUNCNAME}" fn_runfunction diff --git a/functions/fn_install b/functions/fn_install index 0cc9129c4..e6a1a346f 100644 --- a/functions/fn_install +++ b/functions/fn_install @@ -32,6 +32,8 @@ fn_install_config if [ "${gamename}" == "Counter Strike: Global Offensive" ]; then fn_install_gslt fn_csgofix +elif [ "${gamename}" == "Teamspeak 3" ]; then + fn_install_ts3db elif [ "${gamename}" == "Team Fortress 2" ]; then fn_install_gslt elif [ "${gamename}" == "Killing Floor" ]; then diff --git a/functions/fn_install_config b/functions/fn_install_config index 2a0311634..a95d1a652 100644 --- a/functions/fn_install_config +++ b/functions/fn_install_config @@ -102,16 +102,6 @@ fn_userinputconfig echo "" } -fn_ts3config(){ -echo "creating blank ${servercfg} config file." -sleep 1 -echo "${servercfg} can remain blank by default." -sleep 1 -echo "${servercfg} is located in ${servercfgfullpath}." -sleep 1 -touch "${servercfgfullpath}" -} - fn_ut99config(){ echo "${defaultcfg} > ${servercfgfullpath}" tr -d '\r' < "${servercfgdefault}" > "${servercfgfullpath}" @@ -283,7 +273,10 @@ elif [ "${gamename}" == "Serious Sam 3: BFE" ]; then sleep 1 fn_serious3config elif [ "${gamename}" == "Teamspeak 3" ]; then - fn_ts3config + echo -e "downloading lgsm-default.ini...\c" + wget -N /dev/null ${githuburl}/TeamSpeak3/cfg/lgsm-default.ini 2>&1 | grep -F HTTP | cut -c45- | uniq + sleep 1 + fn_defaultconfig elif [ "${gamename}" == "Team Fortress 2" ]; then echo -e "downloading lgsm-default.cfg...\c" wget -N /dev/null ${githuburl}/TeamFortress2/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq diff --git a/functions/fn_install_ts3 b/functions/fn_install_ts3 index 26f7a7724..f3fa529ba 100644 --- a/functions/fn_install_ts3 +++ b/functions/fn_install_ts3 @@ -79,15 +79,3 @@ else fi rm -f teamspeak3-server_linux-${ts3arch}-${availablebuild}.tar.gz rm -rf "${rootdir}/teamspeak3-server_linux-${ts3arch}" - -## Get privilege key -echo "" -echo "Getting privilege key" -echo "=================================" -sleep 1 -echo "IMPORANT! Save these details for later." -sleep 1 -cd "${executabledir}" -./ts3server_startscript.sh start -sleep 5 -./ts3server_startscript.sh stop \ No newline at end of file diff --git a/functions/fn_install_ts3db b/functions/fn_install_ts3db new file mode 100644 index 000000000..8216b9df9 --- /dev/null +++ b/functions/fn_install_ts3db @@ -0,0 +1,52 @@ +#!/bin/bash +# LGSM fn_install_ts3_mariadb function +# Author: Daniel Gibbs +# Website: http://gameservermanagers.com +lgsm_version="241215" + +fn_install_ts3db_mariadb(){ + echo "" + echo "Configuring ${gamename} Server for MariaDB" + echo "=================================" + sleep 1 + read -p "Enter MariaDB hostname: " mariahostname + read -p "Enter MariaDB port: " mariaport + read -p "Enter MariaDB username: " mariausername + read -p "Enter MariaDB password: " mariapassword + read -p "Enter MariaDB database name: " mariadbname + echo "updating config." + echo "[config]" >> ${servercfgdir}/ts3db_mariadb.ini + echo "host='${mariahostname}'" >> ${servercfgdir}/ts3db_mariadb.ini + echo "port='${mariaport}'" >> ${servercfgdir}/ts3db_mariadb.ini + echo "username='${mariausername}'" >> ${servercfgdir}/ts3db_mariadb.ini + echo "password='${mariapassword}'" >> ${servercfgdir}/ts3db_mariadb.ini + echo "database='${mariadbname}'" >> ${servercfgdir}/ts3db_mariadb.ini + echo "socket=" >> ${servercfgdir}/ts3db_mariadb.ini + sed -i "s/\"dbplugin=ts3db_sqlite3\"/\"dbplugin=ts3db_mariadb\"/g" "${servercfgfullpath}" + sed -i "s/\"dbpluginparameter=\"/\"dbpluginparameter=ts3db_mariadb.ini\"/g" "${servercfgfullpath}" + sed -i "s/\"dbsqlcreatepath=create_sqlite/\"/\"dbsqlcreatepath=create_mysql/\"/g" "${servercfgfullpath}" + echo "=================================" + sleep 1 +} + +echo "" +while true; do + read -e -i "n" -p "Do you want to use MariaDB/MySQL instead of sqlite (Database Server including user and database already has to be set up!)? [y/N]" yn + case $yn in + [Yy]* ) fn_install_ts3db_mariadb && break;; + [Nn]* ) break;; + * ) echo "Please answer yes or no.";; + esac +done + +## Get privilege key +echo "" +echo "Getting privilege key" +echo "=================================" +sleep 1 +echo "IMPORANT! Save these details for later." +sleep 1 +cd "${executabledir}" +./ts3server_startscript.sh start +sleep 5 +./ts3server_startscript.sh stop From fb90c1b42545a721ebd960871505940df013a393 Mon Sep 17 00:00:00 2001 From: PhilPhonic Date: Fri, 25 Dec 2015 10:48:52 +0100 Subject: [PATCH 45/50] fix removed doublequotes --- functions/fn_install_ts3db | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/functions/fn_install_ts3db b/functions/fn_install_ts3db index 8216b9df9..d8634faf4 100644 --- a/functions/fn_install_ts3db +++ b/functions/fn_install_ts3db @@ -22,9 +22,9 @@ fn_install_ts3db_mariadb(){ echo "password='${mariapassword}'" >> ${servercfgdir}/ts3db_mariadb.ini echo "database='${mariadbname}'" >> ${servercfgdir}/ts3db_mariadb.ini echo "socket=" >> ${servercfgdir}/ts3db_mariadb.ini - sed -i "s/\"dbplugin=ts3db_sqlite3\"/\"dbplugin=ts3db_mariadb\"/g" "${servercfgfullpath}" - sed -i "s/\"dbpluginparameter=\"/\"dbpluginparameter=ts3db_mariadb.ini\"/g" "${servercfgfullpath}" - sed -i "s/\"dbsqlcreatepath=create_sqlite/\"/\"dbsqlcreatepath=create_mysql/\"/g" "${servercfgfullpath}" + sed -i "s/dbplugin=ts3db_sqlite3/dbplugin=ts3db_mariadb/g" "${servercfgfullpath}" + sed -i "s/dbpluginparameter=/dbpluginparameter=ts3db_mariadb.ini/g" "${servercfgfullpath}" + sed -i "s/dbsqlcreatepath=create_sqlite\//dbsqlcreatepath=create_mysql\//g" "${servercfgfullpath}" echo "=================================" sleep 1 } From f321e72869a60f7afcc3bb80d42538fe7e54542f Mon Sep 17 00:00:00 2001 From: PhilPhonic Date: Fri, 25 Dec 2015 10:55:21 +0100 Subject: [PATCH 46/50] first startup use config-file --- functions/fn_install_ts3db | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/fn_install_ts3db b/functions/fn_install_ts3db index d8634faf4..9248f5103 100644 --- a/functions/fn_install_ts3db +++ b/functions/fn_install_ts3db @@ -47,6 +47,6 @@ sleep 1 echo "IMPORANT! Save these details for later." sleep 1 cd "${executabledir}" -./ts3server_startscript.sh start +./ts3server_startscript.sh start inifile=ts3-server.ini sleep 5 ./ts3server_startscript.sh stop From f340ae362d44069ffa6fd8f667046912758726a9 Mon Sep 17 00:00:00 2001 From: PhilPhonic Date: Fri, 25 Dec 2015 11:06:50 +0100 Subject: [PATCH 47/50] fixed path --- functions/fn_install_ts3db | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/fn_install_ts3db b/functions/fn_install_ts3db index 9248f5103..917067975 100644 --- a/functions/fn_install_ts3db +++ b/functions/fn_install_ts3db @@ -24,7 +24,7 @@ fn_install_ts3db_mariadb(){ echo "socket=" >> ${servercfgdir}/ts3db_mariadb.ini sed -i "s/dbplugin=ts3db_sqlite3/dbplugin=ts3db_mariadb/g" "${servercfgfullpath}" sed -i "s/dbpluginparameter=/dbpluginparameter=ts3db_mariadb.ini/g" "${servercfgfullpath}" - sed -i "s/dbsqlcreatepath=create_sqlite\//dbsqlcreatepath=create_mysql\//g" "${servercfgfullpath}" + sed -i "s/dbsqlcreatepath=create_sqlite\//dbsqlcreatepath=create_mariadb\//g" "${servercfgfullpath}" echo "=================================" sleep 1 } From 11d5227a5db19586e394fa730b817638abaf40a0 Mon Sep 17 00:00:00 2001 From: PhilPhonic Date: Fri, 25 Dec 2015 11:18:06 +0100 Subject: [PATCH 48/50] changed version numbers --- TeamSpeak3/ts3server | 2 +- functions/fn_functions | 2 +- functions/fn_install | 2 +- functions/fn_install_config | 2 +- functions/fn_install_ts3 | 2 +- functions/fn_install_ts3db | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/TeamSpeak3/ts3server b/TeamSpeak3/ts3server index a428798e7..5262b41f8 100644 --- a/TeamSpeak3/ts3server +++ b/TeamSpeak3/ts3server @@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="251215" #### Variables #### diff --git a/functions/fn_functions b/functions/fn_functions index 30d4dfdd8..b2f161396 100644 --- a/functions/fn_functions +++ b/functions/fn_functions @@ -2,7 +2,7 @@ # LGSM fn_functions function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="201215" +lgsm_version="251215" # Description: Defines all functions to allow download and execution of functions using fn_runfunction. # This function is called first before any other function. Without this file other functions would not load. diff --git a/functions/fn_install b/functions/fn_install index e6a1a346f..4ac5918b4 100644 --- a/functions/fn_install +++ b/functions/fn_install @@ -2,7 +2,7 @@ # LGSM fn_install function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="201215" +lgsm_version="251215" fn_check_root fn_install_header diff --git a/functions/fn_install_config b/functions/fn_install_config index a95d1a652..07fb3a1f1 100644 --- a/functions/fn_install_config +++ b/functions/fn_install_config @@ -2,7 +2,7 @@ # LGSM fn_install_config function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="201215" +lgsm_version="251215" fn_defaultconfig(){ echo "creating ${servercfg} config file." diff --git a/functions/fn_install_ts3 b/functions/fn_install_ts3 index f3fa529ba..3def559c4 100644 --- a/functions/fn_install_ts3 +++ b/functions/fn_install_ts3 @@ -2,7 +2,7 @@ # LGSM fn_install_ts3 function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="061115" +lgsm_version="251215" fn_details_distro # Gets the teamspeak server architecture diff --git a/functions/fn_install_ts3db b/functions/fn_install_ts3db index 917067975..dc7e62003 100644 --- a/functions/fn_install_ts3db +++ b/functions/fn_install_ts3db @@ -2,7 +2,7 @@ # LGSM fn_install_ts3_mariadb function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="241215" +lgsm_version="251215" fn_install_ts3db_mariadb(){ echo "" From bf5bb2c189a82ede53d7c08fc0f6af29f2326854 Mon Sep 17 00:00:00 2001 From: PhilPhonic Date: Fri, 25 Dec 2015 17:36:17 +0100 Subject: [PATCH 49/50] mkdir removed directory already created during fn_install_serverdir --- functions/fn_install_ts3 | 1 - 1 file changed, 1 deletion(-) diff --git a/functions/fn_install_ts3 b/functions/fn_install_ts3 index 3def559c4..3224667f7 100644 --- a/functions/fn_install_ts3 +++ b/functions/fn_install_ts3 @@ -49,7 +49,6 @@ if [ -z "${availablebuild}" ]; then fi cd "${rootdir}" -mkdir "${filesdir}" echo -e "downloading teamspeak3-server_linux-${ts3arch}-${availablebuild}.tar.gz...\c" wget -N /dev/null http://dl.4players.de/ts/releases/${ts3_version_number}/teamspeak3-server_linux-${ts3arch}-${ts3_version_number}.tar.gz 2>&1 | grep -F HTTP | cut -c45-| uniq sleep 1 From cb29924ea116691271e5278292696d401fadfbf0 Mon Sep 17 00:00:00 2001 From: PhilPhonic Date: Fri, 25 Dec 2015 17:49:43 +0100 Subject: [PATCH 50/50] check for libmariadb2 if the user chose to install ts3 with mariadb/mysql, the script checks if libmariadb2 is installed. if not, installation is aborted --- functions/fn_install_ts3db | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/functions/fn_install_ts3db b/functions/fn_install_ts3db index dc7e62003..b1119ee52 100644 --- a/functions/fn_install_ts3db +++ b/functions/fn_install_ts3db @@ -6,7 +6,18 @@ lgsm_version="251215" fn_install_ts3db_mariadb(){ echo "" - echo "Configuring ${gamename} Server for MariaDB" + echo "checking if libmariadb2 is installed" + echo "=================================" + ldd ${filesdir}/libts3db_mariadb.so | grep "libmariadb.so.2 => not found" + if [ $? -eq 0 ]; then + echo "libmariadb2 not installed. Please install it first." + echo "exiting..." + exit + else + echo "libmariadb2 installed." + fi + echo "" + echo "Configuring ${gamename} Server for MariaDB/MySQL" echo "=================================" sleep 1 read -p "Enter MariaDB hostname: " mariahostname