From 954e4e9f1be0522ac3191045376e5aa77de53e0b Mon Sep 17 00:00:00 2001 From: Frisasky Date: Mon, 6 May 2019 00:55:54 +0800 Subject: [PATCH 01/13] fix(q3server): correct Quake 3 dedicated parameter Co-authored-by: Frisa --- lgsm/config-default/config-lgsm/q3server/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/q3server/_default.cfg b/lgsm/config-default/config-lgsm/q3server/_default.cfg index 80b1b464d..fdbd4acec 100644 --- a/lgsm/config-default/config-lgsm/q3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/q3server/_default.cfg @@ -15,7 +15,7 @@ defaultmap="q3dm17" ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters fn_parms(){ -parms="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 1 +set com_hunkMegs 32 +set net_ip ${ip} +set net_port ${port} +exec ${servercfg} +map ${defaultmap}" +parms="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 2 +set com_hunkMegs 32 +set net_ip ${ip} +set net_port ${port} +exec ${servercfg} +map ${defaultmap}" } #### LinuxGSM Settings #### From 147dd20bc264bf4c60806c2ef36d457f0fa55ba1 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 6 May 2019 21:05:33 +0100 Subject: [PATCH 02/13] fix(update): correct minecraft localbuild var --- lgsm/functions/update_minecraft.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/update_minecraft.sh b/lgsm/functions/update_minecraft.sh index 7bdcf3e48..3cf19731a 100644 --- a/lgsm/functions/update_minecraft.sh +++ b/lgsm/functions/update_minecraft.sh @@ -81,7 +81,7 @@ fn_update_minecraft_localbuild(){ loopignore=1 fn_script_log_info "Waiting for local build to generate" fi - localbuild=$(cat "${serverfiles}/logs/latest.log" 2> /dev/null | grep version | grep -Eo '((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}' | grep -Eo "TeamSpeak 3 Server ((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}" | grep -Eo "((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}") + localbuild=$(cat "${serverfiles}/logs/latest.log" 2> /dev/null | grep version | grep -Eo '((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}') if [ "${localbuild}" ]||[ "${seconds}" == "120" ]; then break fi From a705a31a77e5d6166477c8c21ea359d8abd8b979 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 7 May 2019 09:34:10 +0100 Subject: [PATCH 03/13] feat(qwserver): update nquake download archive (#2340) --- lgsm/functions/install_server_files.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index 1ac39200d..adb56bf73 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -34,7 +34,7 @@ fn_install_server_files(){ elif [ "${shortname}" == "q3" ]; then remote_fileurl="https://files.linuxgsm.com/Quake3/quake3-1.32c-x86-full-linux.tar.bz2"; local_filedir="${tmpdir}"; local_filename="quake3-1.32c-x86-full-linux.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="fd7258d827474f67663dda297bff4306" elif [ "${shortname}" == "qw" ]; then - remote_fileurl="https://files.linuxgsm.com/QuakeWorld/nquake.server.linux.083116.full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="nquake.server.linux.083116.full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="75a409cf08d808f075e4dacdc7b21b78" + remote_fileurl="https://files.linuxgsm.com/QuakeWorld/nquake.server.linux.190506.full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="nquake.server.linux.190506.full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="74405ec030463c5e1175e776ab572d32" elif [ "${shortname}" == "rtcw" ]; then remote_fileurl="https://files.linuxgsm.com/ReturnToCastleWolfenstein/iortcw-1.51b-x86_64-server-linux-20190208.tar.bz2"; local_filedir="${tmpdir}"; local_filename="iortcw-1.51b-x86_64-server-linux-20190208.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="7e555481a3b98e168dfb5e6ddc2fb879" elif [ "${shortname}" == "ut2k4" ]; then From 09fe43935cc74c9c14ef887bb01cf6c965041a8b Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 7 May 2019 13:22:46 +0100 Subject: [PATCH 04/13] feat(config): standardise 32/64 bit binary selection (#2339) --- lgsm/config-default/config-lgsm/hwserver/_default.cfg | 9 +-------- lgsm/config-default/config-lgsm/qlserver/_default.cfg | 7 ++----- lgsm/config-default/config-lgsm/sdtdserver/_default.cfg | 6 +----- 3 files changed, 4 insertions(+), 18 deletions(-) diff --git a/lgsm/config-default/config-lgsm/hwserver/_default.cfg b/lgsm/config-default/config-lgsm/hwserver/_default.cfg index 19fadc681..0be9eba7c 100644 --- a/lgsm/config-default/config-lgsm/hwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hwserver/_default.cfg @@ -25,8 +25,6 @@ admins="" ## Advanced Server Start Settings # Rollback server state (remove after start command) loadsave="" -# Use unstable 64 bit server executable (O/1) -x64mode="0" ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters # Edit with care | http://hurtworld.wikia.com/wiki/Hosting_A_Server @@ -119,11 +117,7 @@ engine="unity3d" ## Server Specific Directories systemdir="${serverfiles}" executabledir="${serverfiles}" -if [ "${x64mode}" == "1" ]; then - executable="./Hurtworld.x86_64" -else - executable="./Hurtworld.x86" -fi +executable=$([ "$(uname -m)" == "x86_64" ] && echo "./Hurtworld.x86_64" || echo "./Hurtworld.x86") ## Backup Directory backupdir="${rootdir}/backups" @@ -143,4 +137,3 @@ postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" gamelogdate="${gamelogdir}/${servicename}-game-$(date '+%Y-%m-%d-%H:%M:%S').log" lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - diff --git a/lgsm/config-default/config-lgsm/qlserver/_default.cfg b/lgsm/config-default/config-lgsm/qlserver/_default.cfg index 0c8ffa81b..d77f20c5a 100644 --- a/lgsm/config-default/config-lgsm/qlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/qlserver/_default.cfg @@ -8,12 +8,9 @@ #### Server Settings #### -## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters -arch="x64" # x64 or x86 - ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters # Edit with care | Install/Config Guide : https://steamcommunity.com/sharedfiles/filedetails/?id=542966946 -# Console Commands : http://www.regurge.at/ql/ +# Console Commands : http://www.regurge.at/ql fn_parms(){ parms="+exec ${servercfg}" } @@ -103,7 +100,7 @@ engine="idtech3_ql" ## Server Specific Directories systemdir="${serverfiles}" executabledir="${serverfiles}" -executable=$([ "${arch}" == 'x64' ] && echo "./run_server_x64.sh" || echo "./run_server_x86.sh") +executable=$([ "$(uname -m)" == "x86_64" ] && echo "./run_server_x64.sh" || echo "./run_server_x86.sh") servercfg="${servicename}.cfg" servercfgdefault="server.cfg" servercfgdir="${serverfiles}/baseq3" diff --git a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg index 6a9b6ab79..59a6d9eb7 100644 --- a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg @@ -101,11 +101,7 @@ engine="unity3d" ## Server Specific Directories systemdir="${serverfiles}" executabledir="${serverfiles}" -if [ "$(uname -m)" == "x86_64" ]; then - executable="./7DaysToDieServer.x86_64" -else - executable="./7DaysToDieServer.x86" -fi +executable=$([ "$(uname -m)" == "x86_64" ] && echo "./7DaysToDieServer.x86_64" || echo "./7DaysToDieServer.x86") servercfgdefault="serverconfig.xml" servercfgdirdefault="${serverfiles}" servercfgfullpathdefault="${servercfgdirdefault}/${servercfgdefault}" From 378d8f0fa3a1be2e4f6596959022aef1dfec1e3d Mon Sep 17 00:00:00 2001 From: Frisasky Date: Wed, 8 May 2019 03:24:25 +0800 Subject: [PATCH 05/13] feat(install): update Return to Castle Wolfenstein package (#2344) Co-authored-by: Frisa --- lgsm/functions/install_server_files.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index adb56bf73..67b4af9fe 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -36,7 +36,7 @@ fn_install_server_files(){ elif [ "${shortname}" == "qw" ]; then remote_fileurl="https://files.linuxgsm.com/QuakeWorld/nquake.server.linux.190506.full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="nquake.server.linux.190506.full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="74405ec030463c5e1175e776ab572d32" elif [ "${shortname}" == "rtcw" ]; then - remote_fileurl="https://files.linuxgsm.com/ReturnToCastleWolfenstein/iortcw-1.51b-x86_64-server-linux-20190208.tar.bz2"; local_filedir="${tmpdir}"; local_filename="iortcw-1.51b-x86_64-server-linux-20190208.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="7e555481a3b98e168dfb5e6ddc2fb879" + remote_fileurl="https://files.linuxgsm.com/ReturnToCastleWolfenstein/iortcw-1.51c-x86_64-server-linux-20190507.tar.bz2"; local_filedir="${tmpdir}"; local_filename="iortcw-1.51c-x86_64-server-linux-20190507.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="6a3be9700372b228d1187422464e4212" elif [ "${shortname}" == "ut2k4" ]; then remote_fileurl="https://files.linuxgsm.com/UnrealTournament2004/ut2004-server-3369-2-ultimate-linux.tar.bz2"; local_filedir="${tmpdir}"; local_filename="ut2004-server-3369-2-ultimate-linux.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="67c5e2cd9c2a4b04f163962ee41eff54" elif [ "${shortname}" == "ut99" ]; then From ab48c0b7f05c732b1486a85ff865ed5df7e1282c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 7 May 2019 20:25:17 +0100 Subject: [PATCH 06/13] feat(query-raw): add TCP/UDP query to game port (#2341) --- lgsm/functions/command_dev_query_raw.sh | 50 +++++++++++++++++++------ 1 file changed, 39 insertions(+), 11 deletions(-) diff --git a/lgsm/functions/command_dev_query_raw.sh b/lgsm/functions/command_dev_query_raw.sh index 4d57e8aca..79072468f 100644 --- a/lgsm/functions/command_dev_query_raw.sh +++ b/lgsm/functions/command_dev_query_raw.sh @@ -7,8 +7,10 @@ local commandname="QUERY-RAW" local commandaction="Query Raw" local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -echo "=================================" +echo "" +echo "Query Port" +echo "==================================================================" +echo "" echo "Gamedig Raw Output" echo "=================================" echo"" @@ -33,7 +35,6 @@ echo "${gamedigcmd}" echo"" echo "${gamedigraw}" | jq echo"" -echo "=================================" echo "gsquery Raw Output" echo "=================================" echo"" @@ -44,29 +45,56 @@ fi "${functionsdir}"/query_gsquery.py -a "${ip}" -p "${queryport}" -e "${engine}" echo"" -echo "=================================" -echo "tcp Raw Output" +echo "TCP Raw Output" echo "=================================" echo"" echo "bash -c 'exec 3<> /dev/tcp/'${ip}'/'${queryport}''" bash -c 'exec 3<> /dev/tcp/'${ip}'/'${queryport}'' querystatus="$?" if [ "${querystatus}" == "0" ]; then - echo "tcp query PASS" + echo "TCP query PASS" else - echo "tcp query FAIL" + echo "TCP query FAIL" fi echo"" -echo "=================================" -echo "udp Raw Output" +echo "UDP Raw Output" echo "=================================" echo"" echo "bash -c 'exec 3<> /dev/udp/'${ip}'/'${queryport}''" bash -c 'exec 3<> /dev/udp/'${ip}'/'${queryport}'' querystatus="$?" if [ "${querystatus}" == "0" ]; then - echo "udp query PASS" + echo "UPD query PASS" +else + echo "UPD query FAIL" +fi +echo "" +echo "Game Port" +echo "==================================================================" +echo "" +echo"" +echo "TCP Raw Output" +echo "=================================" +echo"" +echo "bash -c 'exec 3<> /dev/tcp/'${ip}'/'${port}''" +bash -c 'exec 3<> /dev/tcp/'${ip}'/'${port}'' +querystatus="$?" +if [ "${querystatus}" == "0" ]; then + echo "TCP query PASS" +else + echo "TCP query FAIL" +fi + +echo"" +echo "UDP Raw Output" +echo "=================================" +echo"" +echo "bash -c 'exec 3<> /dev/udp/'${ip}'/'${port}''" +bash -c 'exec 3<> /dev/udp/'${ip}'/'${port}'' +querystatus="$?" +if [ "${querystatus}" == "0" ]; then + echo "UDP query PASS" else - echo "udp query FAIL" + echo "UDP query FAIL" fi From 66e0bd9fea82499ccc92b49e2970a530fe422fa2 Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 7 May 2019 21:55:39 +0200 Subject: [PATCH 07/13] feat(newserver): Mordhau (#2333) Co-authored-by: Christian Birk --- .../config-lgsm/mhserver/_default.cfg | 129 ++++++++++++++++++ lgsm/data/serverlist.csv | 1 + lgsm/functions/info_config.sh | 22 +++ lgsm/functions/info_glibc.sh | 3 + lgsm/functions/info_messages.sh | 16 +++ lgsm/functions/info_parms.sh | 7 + lgsm/functions/install_config.sh | 7 + 7 files changed, 185 insertions(+) create mode 100644 lgsm/config-default/config-lgsm/mhserver/_default.cfg diff --git a/lgsm/config-default/config-lgsm/mhserver/_default.cfg b/lgsm/config-default/config-lgsm/mhserver/_default.cfg new file mode 100644 index 000000000..75d80ddf1 --- /dev/null +++ b/lgsm/config-default/config-lgsm/mhserver/_default.cfg @@ -0,0 +1,129 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters +ip="0.0.0.0" +port="7777" +queryport="27015" +# Maps: FFA_Camp, FFA_Contraband, FFA_Grad, FFA_MountainPeak, FFA_Taiga, FFA_ThePit, FFA_Tourney, SKM_Camp, SKM_Contraband, SKM_Grad, SKM_MountainPeak, SKM_Taiga, SKM_ThePit, SKM_Tourney, TDM_Camp, TDM_Contraband, TDM_Grad, TDM_MountainPeak, TDM_Taiga, TDM_ThePit, TDM_Tourney +defaultmap="FFA_ThePit" + +## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +fn_parms(){ +parms="Mordhau ${defaultmap} -log -MultiHome=${ip} -MaxPlayers=${maxplayers} -Port=${port} -QueryPort=${queryport}" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) + +# More info | https://docs.linuxgsm.com/alerts#more-info +postalert="off" +postdays="7" +posttarget="https://hastebin.com" + +# Discord Alerts | https://docs.linuxgsm.com/alerts/discord +discordalert="off" +discordwebhook="webhook" + +# Email Alerts | https://docs.linuxgsm.com/alerts/email +emailalert="off" +email="email@example.com" +emailfrom="" + +# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt +iftttalert="off" +ifttttoken="accesstoken" +iftttevent="linuxgsm_alert" + +# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun +mailgunalert="off" +mailguntoken="accesstoken" +mailgundomain="example.com" +mailgunemailfrom="alert@example.com" +mailgunemail="email@myemail.com" + +# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover +pushoveralert="off" +pushovertoken="accesstoken" + +# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram +# You can add a custom cURL string eg proxy (useful in Russia) or else in "curlcustomstring". +# like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need +# any custom string in curl - simple ignore this parameter. +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +curlcustomstring="" + +## Updating | https://docs.linuxgsm.com/commands/update +updateonstart="off" + +## Backup | https://docs.linuxgsm.com/commands/backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://docs.linuxgsm.com/features/logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +# ANSI Colors +ansi="on" + +## SteamCMD Settings +# Server appid +appid="629800" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="MORDHAU" +engine="unreal4" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${serverfiles}/Mordhau" +executabledir="${systemdir}/Binaries/Linux" +executable="./MordhauServer-Linux-Shipping" +servercfgdir="${systemdir}/Saved/Config/LinuxServer" +servercfg="Game.ini" +servercfgdefault="Game.ini" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/Saved/Logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +alertlog="${lgsmlogdir}/${servicename}-alert.log" +postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 960947995..e32dd4e90 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -46,6 +46,7 @@ kf2,kf2server,Killing Floor 2 l4d,l4dserver,Left 4 Dead l4d2,l4d2server,Left 4 Dead 2 mc,mcserver,Minecraft +mh,mhserver,Mordhau mta,mtaserver,Multi Theft Auto mumble,mumbleserver,Mumble nd,ndserver,Nuclear Dawn diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 53b7637c6..410531b05 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -1146,6 +1146,26 @@ fn_info_config_stationeers(){ fi } +fn_info_config_mordhau() { + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + rconpassword="${unavailable}" + maxplayers="${unavailable}" + else + servername=$(grep "ServerName" "${servercfgfullpath}" | awk -F '=' '{print $2}') + serverpassword=$(grep "ServerPassword" "${servercfgfullpath}" | awk -F '=' '{print $2}') + rconpassword=$(grep "AdminPassword" "${servercfgfullpath}" | awk -F '=' '{print $2}') + maxplayers=$(grep "MaxSlots" "${servercfgfullpath}" | awk -F '=' '{print $2}') + + # Not set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + rconpassword=${rconpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + fi +} + # ARK: Survival Evolved if [ "${shortname}" == "ark" ]; then fn_info_config_ark @@ -1276,4 +1296,6 @@ elif [ "${shortname}" == "squad" ]; then # Stationeers elif [ "${shortname}" == "st" ]; then fn_info_config_stationeers +elif [ "${shortname}" == "mh" ]; then + fn_info_config_mordhau fi diff --git a/lgsm/functions/info_glibc.sh b/lgsm/functions/info_glibc.sh index 63760c714..26e5ec911 100644 --- a/lgsm/functions/info_glibc.sh +++ b/lgsm/functions/info_glibc.sh @@ -147,6 +147,9 @@ elif [ "${gamename}" == "NS2: Combat" ]; then elif [ "${gamename}" == "TeamSpeak 3" ]; then glibcrequired="NOT REQUIRED" glibcfix="no" +elif [ "${gamename}" == "Mordhau" ]; then + glibcrequired="2.17" + glibcfix="no" elif [ "${gamename}" == "Mumble" ]; then glibcrequired="NOT REQUIRED" glibcfix="no" diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index 701c6940e..f0c85cd95 100644 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -1179,6 +1179,20 @@ fn_info_message_mta(){ } | column -s $'\t' -t } +fn_info_message_mordhau(){ + echo -e "netstat -atunp | grep Mord" + echo -e "" + { + echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "> Game\tINBOUND\t${port}\ttcp" + # Don't do arithmetics if ever the port wasn't a numeric value + if [ "${port}" -eq "${port}" ]; then + echo -e "> Steam\tINBOUND\t$((port+1))\tudp" + fi + echo -e "> Query\tINBOUND\t${queryport}\tudp" + } | column -s $'\t' -t +} + fn_info_message_select_engine(){ # Display details depending on game or engine. if [ "${gamename}" == "7 Days To Die" ]; then @@ -1241,6 +1255,8 @@ fn_info_message_select_engine(){ fn_info_message_towerunite elif [ "${shortname}" == "unt" ]; then fn_info_message_unturned + elif [ "${shortname}" == "mh" ]; then + fn_info_message_mordhau elif [ "${gamename}" == "Multi Theft Auto" ]; then fn_info_message_mta elif [ "${gamename}" == "Mumble" ]; then diff --git a/lgsm/functions/info_parms.sh b/lgsm/functions/info_parms.sh index dd289543e..5e9cb1327 100644 --- a/lgsm/functions/info_parms.sh +++ b/lgsm/functions/info_parms.sh @@ -146,6 +146,11 @@ fn_info_config_towerunite(){ queryport=${queryport:-"0"} } +fn_info_config_mordhau(){ + port=${port:-"0"} + queryport=${queryport:-"0"} +} + fn_info_parms_unreal(){ defaultmap=${defaultmap:-"NOT SET"} queryport=$((port + 1)) @@ -221,6 +226,8 @@ elif [ "${engine}" == "spark" ]; then fn_info_parms_spark elif [ "${shortname}" == "tu" ]; then fn_info_config_towerunite +elif [ "${shortname}" == "mh" ]; then + fn_info_config_mordhau # Unreal/Unreal 2 engine elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then fn_info_parms_unreal diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index dce59b8fb..61a7ec8c6 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -427,6 +427,13 @@ elif [ "${gamename}" == "Minecraft" ]; then fn_fetch_default_config fn_default_config_remote fn_set_config_vars +elif [ "${gamename}" == "Mordhau" ]; then + gamedirname="Mordhau" + fn_check_cfgdir + array_configs+=( Game.ini ) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars elif [ "${gamename}" == "Natural Selection" ]; then gamedirname="NaturalSelection" array_configs+=( server.cfg ) From cc906640d109a7fdb3130369a701b368cf3e9059 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 7 May 2019 21:37:45 +0100 Subject: [PATCH 08/13] mhserver: correct server name (#2346) --- .../config-lgsm/mhserver/_default.cfg | 2 +- .../config-lgsm/mordhauserver/_default.cfg | 133 ++++++++++++++++++ lgsm/data/serverlist.csv | 2 +- lgsm/functions/check_system_requirements.sh | 3 + lgsm/functions/info_config.sh | 10 ++ lgsm/functions/info_glibc.sh | 5 +- lgsm/functions/info_messages.sh | 15 ++ lgsm/functions/info_parms.sh | 7 + lgsm/functions/install_config.sh | 9 +- 9 files changed, 182 insertions(+), 4 deletions(-) create mode 100644 lgsm/config-default/config-lgsm/mordhauserver/_default.cfg diff --git a/lgsm/config-default/config-lgsm/mhserver/_default.cfg b/lgsm/config-default/config-lgsm/mhserver/_default.cfg index 75d80ddf1..45c81adf5 100644 --- a/lgsm/config-default/config-lgsm/mhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mhserver/_default.cfg @@ -96,7 +96,7 @@ branch="" ## LinuxGSM Server Details # Do not edit -gamename="MORDHAU" +gamename="Mordhau" engine="unreal4" #### Directories #### diff --git a/lgsm/config-default/config-lgsm/mordhauserver/_default.cfg b/lgsm/config-default/config-lgsm/mordhauserver/_default.cfg new file mode 100644 index 000000000..b13b87cbf --- /dev/null +++ b/lgsm/config-default/config-lgsm/mordhauserver/_default.cfg @@ -0,0 +1,133 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="0.0.0.0" +port="7777" +queryport="27015" +#rconport="27020" | add to fn_params() RCONPort=${rconport}? +maxplayers="16" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="\"FFA_Camp?listen?MultiHome=${ip}?MaxPlayers=${maxplayers}?QueryPort=${queryport}?Port=${port}?\"" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) + +# More info | https://github.com/GameServerManagers/LinuxGSM/wiki/Alerts#more-info +postalert="off" +postdays="7" +posttarget="https://hastebin.com" + +# Discord Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Discord +discordalert="off" +discordwebhook="webhook" + +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# IFTTT Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/IFTTT +iftttalert="off" +ifttttoken="accesstoken" +iftttevent="linuxgsm_alert" + +# Mailgun Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/mailgun +mailgunalert="off" +mailguntoken="accesstoken" +mailgundomain="example.com" +mailgunemailfrom="alert@example.com" +mailgunemail="email@myemail.com" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +# Pushover Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushover +pushoveralert="off" +pushovertoken="accesstoken" + +# Telegram Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Telegram +# You can add a custom cURL string eg proxy (useful in Russia) or else in "curlcustomstring". +# like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need +# any custom string in curl - simple ignore this parameter. +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +curlcustomstring="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="629800" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Mordhau" +engine="unreal4" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${serverfiles}/mordhau" +executabledir="${systemdir}/Binaries/Linux" +executable="./MordhauServer-Linux-Shipping" +servercfgdir="${systemdir}/Config" +servercfg="DefaultGame.ini" +servercfgdefault="DefaultGame.ini" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/Saved/Logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +alertlog="${lgsmlogdir}/${servicename}-alert.log" +postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Github Branch Select +# Allows for the use of different function files +# from a different repo and/or branch. +githubuser="Viretick" +githubrepo="LinuxGSM" +githubbranch="custom-servers" diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index e32dd4e90..4eefca614 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -46,7 +46,7 @@ kf2,kf2server,Killing Floor 2 l4d,l4dserver,Left 4 Dead l4d2,l4d2server,Left 4 Dead 2 mc,mcserver,Minecraft -mh,mhserver,Mordhau +mh,mhserver,MORDHAU mta,mtaserver,Multi Theft Auto mumble,mumbleserver,Mumble nd,ndserver,Nuclear Dawn diff --git a/lgsm/functions/check_system_requirements.sh b/lgsm/functions/check_system_requirements.sh index ce961548d..96a73f8e6 100644 --- a/lgsm/functions/check_system_requirements.sh +++ b/lgsm/functions/check_system_requirements.sh @@ -15,6 +15,9 @@ info_distro.sh if [ "${shortname}" == "ark" ]; then ramrequirementmb="4000" ramrequirementgb="4" +elif [ "${shortname}" == "mh" ]; then + ramrequirementmb="4000" + ramrequirementgb="4" elif [ "${shortname}" == "arma3" ]; then ramrequirementmb="1000" ramrequirementgb="1" diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 410531b05..274c7b3a3 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -87,6 +87,16 @@ fn_info_config_ark(){ fi } +fn_info_config_mordhau(){ + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + else + servername=$(grep "SessionName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/SessionName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + # Not Set + servername=${servername:-"NOT SET"} + fi +} + fn_info_config_ballistic_overkill(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" diff --git a/lgsm/functions/info_glibc.sh b/lgsm/functions/info_glibc.sh index 26e5ec911..2f283b778 100644 --- a/lgsm/functions/info_glibc.sh +++ b/lgsm/functions/info_glibc.sh @@ -9,6 +9,9 @@ local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if [ "${gamename}" == "ARK: Survival Evolved" ]; then glibcrequired="2.15" glibcfix="no" +elif [ "${gamename}" == "Mordhau" ]; then + glibcrequired="2.15" + glibcfix="no" elif [ "${gamename}" == "Ballistic Overkill" ]; then glibcrequired="2.15" glibcfix="yes" @@ -147,7 +150,7 @@ elif [ "${gamename}" == "NS2: Combat" ]; then elif [ "${gamename}" == "TeamSpeak 3" ]; then glibcrequired="NOT REQUIRED" glibcfix="no" -elif [ "${gamename}" == "Mordhau" ]; then +elif [ "${gamename}" == "MORDHAU" ]; then glibcrequired="2.17" glibcfix="no" elif [ "${gamename}" == "Mumble" ]; then diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index f0c85cd95..0e86ebeff 100644 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -578,6 +578,21 @@ fn_info_message_ark(){ } | column -s $'\t' -t } +fn_info_message_mordhau(){ + echo -e "netstat -atunp | grep Mordhau" + echo -e "" + { + echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "> Game\tINBOUND\t${port}\tudp" + # Don't do arithmetics if ever the port wasn't a numeric value + if [ "${port}" -eq "${port}" ]; then + echo -e "> RAW\tINBOUND\t$((port+1))\tudp" + fi + echo -e "> Query\tINBOUND\t${queryport}\tudp" + echo -e "> RCON\tINBOUND\t${rconport}\ttcp" + } | column -s $'\t' -t +} + fn_info_message_ballisticoverkill(){ echo -e "netstat -atunp | grep BODS.x86" echo -e "" diff --git a/lgsm/functions/info_parms.sh b/lgsm/functions/info_parms.sh index 5e9cb1327..1443a55ca 100644 --- a/lgsm/functions/info_parms.sh +++ b/lgsm/functions/info_parms.sh @@ -22,6 +22,13 @@ fn_info_parms_ark(){ maxplayers=${maxplayers:-"0"} } +fn_info_parms_mordhau(){ + port=${port:-"0"} + queryport=${queryport:-"0"} + #rconport=${rconport:-"0"} + maxplayers=${maxplayers:-"0"} +} + fn_info_parms_realvirtuality(){ port=${port:-"0"} queryport=$((port + 1)) diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 61a7ec8c6..c4e613dcf 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -154,6 +154,13 @@ elif [ "${gamename}" == "ARK: Survival Evolved" ]; then fn_fetch_default_config fn_default_config_remote fn_set_config_vars +elif [ "${gamename}" == "Mordhau" ]; then + gamedirname="mordhau" + fn_check_cfgdir + array_configs+=( DefaultEngine.ini ) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars elif [ "${gamename}" == "ARMA 3" ]; then gamedirname="Arma3" fn_check_cfgdir @@ -427,7 +434,7 @@ elif [ "${gamename}" == "Minecraft" ]; then fn_fetch_default_config fn_default_config_remote fn_set_config_vars -elif [ "${gamename}" == "Mordhau" ]; then +elif [ "${gamename}" == "MORDHAU" ]; then gamedirname="Mordhau" fn_check_cfgdir array_configs+=( Game.ini ) From 1747e4ee940dcce47c19bf7b23b40bf569bfdca2 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 7 May 2019 22:21:44 +0100 Subject: [PATCH 09/13] mhserver: further fixes after accidental merge of wrong branch (#2347) --- .../config-lgsm/mhserver/_default.cfg | 2 +- .../config-lgsm/mordhauserver/_default.cfg | 133 ------------------ lgsm/functions/info_config.sh | 12 +- lgsm/functions/info_messages.sh | 21 +-- lgsm/functions/info_parms.sh | 17 +-- lgsm/functions/install_config.sh | 7 - 6 files changed, 8 insertions(+), 184 deletions(-) delete mode 100644 lgsm/config-default/config-lgsm/mordhauserver/_default.cfg diff --git a/lgsm/config-default/config-lgsm/mhserver/_default.cfg b/lgsm/config-default/config-lgsm/mhserver/_default.cfg index 45c81adf5..08a3d608c 100644 --- a/lgsm/config-default/config-lgsm/mhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mhserver/_default.cfg @@ -17,7 +17,7 @@ defaultmap="FFA_ThePit" ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters fn_parms(){ -parms="Mordhau ${defaultmap} -log -MultiHome=${ip} -MaxPlayers=${maxplayers} -Port=${port} -QueryPort=${queryport}" +parms="Mordhau ${defaultmap} -log -MultiHome=${ip} -Port=${port} -QueryPort=${queryport}" } #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/mordhauserver/_default.cfg b/lgsm/config-default/config-lgsm/mordhauserver/_default.cfg deleted file mode 100644 index b13b87cbf..000000000 --- a/lgsm/config-default/config-lgsm/mordhauserver/_default.cfg +++ /dev/null @@ -1,133 +0,0 @@ -################################## -######## Default Settings ######## -################################## -# DO NOT EDIT WILL BE OVERWRITTEN! -# Copy settings from here and use them in either -# common.cfg - applies settings to every instance -# [instance].cfg - applies settings to a specific instance - -#### Server Settings #### - -## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -ip="0.0.0.0" -port="7777" -queryport="27015" -#rconport="27020" | add to fn_params() RCONPort=${rconport}? -maxplayers="16" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="\"FFA_Camp?listen?MultiHome=${ip}?MaxPlayers=${maxplayers}?QueryPort=${queryport}?Port=${port}?\"" -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) - -# More info | https://github.com/GameServerManagers/LinuxGSM/wiki/Alerts#more-info -postalert="off" -postdays="7" -posttarget="https://hastebin.com" - -# Discord Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Discord -discordalert="off" -discordwebhook="webhook" - -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# IFTTT Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/IFTTT -iftttalert="off" -ifttttoken="accesstoken" -iftttevent="linuxgsm_alert" - -# Mailgun Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/mailgun -mailgunalert="off" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -# Pushover Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushover -pushoveralert="off" -pushovertoken="accesstoken" - -# Telegram Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Telegram -# You can add a custom cURL string eg proxy (useful in Russia) or else in "curlcustomstring". -# like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need -# any custom string in curl - simple ignore this parameter. -telegramalert="off" -telegramtoken="accesstoken" -telegramchatid="" -curlcustomstring="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="629800" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## LinuxGSM Server Details -# Do not edit -gamename="Mordhau" -engine="unreal4" - -#### Directories #### -# Edit with care - -## Server Specific Directories -systemdir="${serverfiles}/mordhau" -executabledir="${systemdir}/Binaries/Linux" -executable="./MordhauServer-Linux-Shipping" -servercfgdir="${systemdir}/Config" -servercfg="DefaultGame.ini" -servercfgdefault="DefaultGame.ini" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${lgsmdir}/backup" - -## Logging Directories -logdir="${rootdir}/log" -gamelogdir="${systemdir}/Saved/Logs" -lgsmlogdir="${logdir}/script" -consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" - -## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="Viretick" -githubrepo="LinuxGSM" -githubbranch="custom-servers" diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 274c7b3a3..131113bdf 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -87,16 +87,6 @@ fn_info_config_ark(){ fi } -fn_info_config_mordhau(){ - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - else - servername=$(grep "SessionName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/SessionName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - # Not Set - servername=${servername:-"NOT SET"} - fi -} - fn_info_config_ballistic_overkill(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -1156,7 +1146,7 @@ fn_info_config_stationeers(){ fi } -fn_info_config_mordhau() { +fn_info_config_mordhau(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" serverpassword="${unavailable}" diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index 0e86ebeff..ac6bb2e6a 100644 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -578,21 +578,6 @@ fn_info_message_ark(){ } | column -s $'\t' -t } -fn_info_message_mordhau(){ - echo -e "netstat -atunp | grep Mordhau" - echo -e "" - { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" - echo -e "> Game\tINBOUND\t${port}\tudp" - # Don't do arithmetics if ever the port wasn't a numeric value - if [ "${port}" -eq "${port}" ]; then - echo -e "> RAW\tINBOUND\t$((port+1))\tudp" - fi - echo -e "> Query\tINBOUND\t${queryport}\tudp" - echo -e "> RCON\tINBOUND\t${rconport}\ttcp" - } | column -s $'\t' -t -} - fn_info_message_ballisticoverkill(){ echo -e "netstat -atunp | grep BODS.x86" echo -e "" @@ -1199,11 +1184,7 @@ fn_info_message_mordhau(){ echo -e "" { echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" - echo -e "> Game\tINBOUND\t${port}\ttcp" - # Don't do arithmetics if ever the port wasn't a numeric value - if [ "${port}" -eq "${port}" ]; then - echo -e "> Steam\tINBOUND\t$((port+1))\tudp" - fi + echo -e "> Game\tINBOUND\t${port}\tupd" echo -e "> Query\tINBOUND\t${queryport}\tudp" } | column -s $'\t' -t } diff --git a/lgsm/functions/info_parms.sh b/lgsm/functions/info_parms.sh index 1443a55ca..34ebc793d 100644 --- a/lgsm/functions/info_parms.sh +++ b/lgsm/functions/info_parms.sh @@ -22,13 +22,6 @@ fn_info_parms_ark(){ maxplayers=${maxplayers:-"0"} } -fn_info_parms_mordhau(){ - port=${port:-"0"} - queryport=${queryport:-"0"} - #rconport=${rconport:-"0"} - maxplayers=${maxplayers:-"0"} -} - fn_info_parms_realvirtuality(){ port=${port:-"0"} queryport=$((port + 1)) @@ -148,12 +141,12 @@ fn_info_parms_stickybots(){ maxplayers=${maxplayers:-"0"} } -fn_info_config_towerunite(){ +fn_info_parms_towerunite(){ port=${port:-"0"} queryport=${queryport:-"0"} } -fn_info_config_mordhau(){ +fn_info_parms_mordhau(){ port=${port:-"0"} queryport=${queryport:-"0"} } @@ -225,16 +218,16 @@ elif [ "${shortname}" == "sbots" ]; then fn_info_parms_stickybots # Serious Sam elif [ "${shortname}" == "ss3" ]; then - fn_info_config_seriousengine35 + fn_info_parms_seriousengine35 elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then fn_info_parms_source # Spark elif [ "${engine}" == "spark" ]; then fn_info_parms_spark elif [ "${shortname}" == "tu" ]; then - fn_info_config_towerunite + fn_info_parms_towerunite elif [ "${shortname}" == "mh" ]; then - fn_info_config_mordhau + fn_info_parms_mordhau # Unreal/Unreal 2 engine elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then fn_info_parms_unreal diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index c4e613dcf..f9c7e1cb2 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -154,13 +154,6 @@ elif [ "${gamename}" == "ARK: Survival Evolved" ]; then fn_fetch_default_config fn_default_config_remote fn_set_config_vars -elif [ "${gamename}" == "Mordhau" ]; then - gamedirname="mordhau" - fn_check_cfgdir - array_configs+=( DefaultEngine.ini ) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars elif [ "${gamename}" == "ARMA 3" ]; then gamedirname="Arma3" fn_check_cfgdir From d521b3521358d95e417883d9e00639548fdfa8d9 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 7 May 2019 22:31:46 +0100 Subject: [PATCH 10/13] mhserver: further fixes after accidental merge of wrong branch (#2347) mhserver: fix further regressions --- .../config-lgsm/mhserver/_default.cfg | 4 +- .../config-lgsm/mordhauserver/_default.cfg | 133 ------------------ lgsm/functions/info_config.sh | 12 +- lgsm/functions/info_glibc.sh | 3 - lgsm/functions/info_messages.sh | 21 +-- lgsm/functions/info_parms.sh | 17 +-- lgsm/functions/install_config.sh | 7 - 7 files changed, 9 insertions(+), 188 deletions(-) delete mode 100644 lgsm/config-default/config-lgsm/mordhauserver/_default.cfg diff --git a/lgsm/config-default/config-lgsm/mhserver/_default.cfg b/lgsm/config-default/config-lgsm/mhserver/_default.cfg index 45c81adf5..e8395ed2f 100644 --- a/lgsm/config-default/config-lgsm/mhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mhserver/_default.cfg @@ -17,7 +17,7 @@ defaultmap="FFA_ThePit" ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters fn_parms(){ -parms="Mordhau ${defaultmap} -log -MultiHome=${ip} -MaxPlayers=${maxplayers} -Port=${port} -QueryPort=${queryport}" +parms="Mordhau ${defaultmap} -log -MultiHome=${ip} -Port=${port} -QueryPort=${queryport}" } #### LinuxGSM Settings #### @@ -96,7 +96,7 @@ branch="" ## LinuxGSM Server Details # Do not edit -gamename="Mordhau" +gamename="MORDHAU" engine="unreal4" #### Directories #### diff --git a/lgsm/config-default/config-lgsm/mordhauserver/_default.cfg b/lgsm/config-default/config-lgsm/mordhauserver/_default.cfg deleted file mode 100644 index b13b87cbf..000000000 --- a/lgsm/config-default/config-lgsm/mordhauserver/_default.cfg +++ /dev/null @@ -1,133 +0,0 @@ -################################## -######## Default Settings ######## -################################## -# DO NOT EDIT WILL BE OVERWRITTEN! -# Copy settings from here and use them in either -# common.cfg - applies settings to every instance -# [instance].cfg - applies settings to a specific instance - -#### Server Settings #### - -## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -ip="0.0.0.0" -port="7777" -queryport="27015" -#rconport="27020" | add to fn_params() RCONPort=${rconport}? -maxplayers="16" - -## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -fn_parms(){ -parms="\"FFA_Camp?listen?MultiHome=${ip}?MaxPlayers=${maxplayers}?QueryPort=${queryport}?Port=${port}?\"" -} - -#### LinuxGSM Settings #### - -## Notification Alerts -# (on|off) - -# More info | https://github.com/GameServerManagers/LinuxGSM/wiki/Alerts#more-info -postalert="off" -postdays="7" -posttarget="https://hastebin.com" - -# Discord Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Discord -discordalert="off" -discordwebhook="webhook" - -# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email -emailalert="off" -email="email@example.com" -emailfrom="" - -# IFTTT Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/IFTTT -iftttalert="off" -ifttttoken="accesstoken" -iftttevent="linuxgsm_alert" - -# Mailgun Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/mailgun -mailgunalert="off" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - -# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -# Pushover Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushover -pushoveralert="off" -pushovertoken="accesstoken" - -# Telegram Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Telegram -# You can add a custom cURL string eg proxy (useful in Russia) or else in "curlcustomstring". -# like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need -# any custom string in curl - simple ignore this parameter. -telegramalert="off" -telegramtoken="accesstoken" -telegramchatid="" -curlcustomstring="" - -## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update -updateonstart="off" - -## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging -consolelogging="on" -logdays="7" - -#### LinuxGSM Advanced Settings #### - -## SteamCMD Settings -# Server appid -appid="629800" -# Steam App Branch Select -# Allows to opt into the various Steam app branches. Default branch is "". -# Example: "-beta latest_experimental" -branch="" - -## LinuxGSM Server Details -# Do not edit -gamename="Mordhau" -engine="unreal4" - -#### Directories #### -# Edit with care - -## Server Specific Directories -systemdir="${serverfiles}/mordhau" -executabledir="${systemdir}/Binaries/Linux" -executable="./MordhauServer-Linux-Shipping" -servercfgdir="${systemdir}/Config" -servercfg="DefaultGame.ini" -servercfgdefault="DefaultGame.ini" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${lgsmdir}/backup" - -## Logging Directories -logdir="${rootdir}/log" -gamelogdir="${systemdir}/Saved/Logs" -lgsmlogdir="${logdir}/script" -consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" - -## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -## Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="Viretick" -githubrepo="LinuxGSM" -githubbranch="custom-servers" diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 274c7b3a3..131113bdf 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -87,16 +87,6 @@ fn_info_config_ark(){ fi } -fn_info_config_mordhau(){ - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - else - servername=$(grep "SessionName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/SessionName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - # Not Set - servername=${servername:-"NOT SET"} - fi -} - fn_info_config_ballistic_overkill(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -1156,7 +1146,7 @@ fn_info_config_stationeers(){ fi } -fn_info_config_mordhau() { +fn_info_config_mordhau(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" serverpassword="${unavailable}" diff --git a/lgsm/functions/info_glibc.sh b/lgsm/functions/info_glibc.sh index 2f283b778..63bbdd6d5 100644 --- a/lgsm/functions/info_glibc.sh +++ b/lgsm/functions/info_glibc.sh @@ -9,9 +9,6 @@ local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if [ "${gamename}" == "ARK: Survival Evolved" ]; then glibcrequired="2.15" glibcfix="no" -elif [ "${gamename}" == "Mordhau" ]; then - glibcrequired="2.15" - glibcfix="no" elif [ "${gamename}" == "Ballistic Overkill" ]; then glibcrequired="2.15" glibcfix="yes" diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index 0e86ebeff..ac6bb2e6a 100644 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -578,21 +578,6 @@ fn_info_message_ark(){ } | column -s $'\t' -t } -fn_info_message_mordhau(){ - echo -e "netstat -atunp | grep Mordhau" - echo -e "" - { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" - echo -e "> Game\tINBOUND\t${port}\tudp" - # Don't do arithmetics if ever the port wasn't a numeric value - if [ "${port}" -eq "${port}" ]; then - echo -e "> RAW\tINBOUND\t$((port+1))\tudp" - fi - echo -e "> Query\tINBOUND\t${queryport}\tudp" - echo -e "> RCON\tINBOUND\t${rconport}\ttcp" - } | column -s $'\t' -t -} - fn_info_message_ballisticoverkill(){ echo -e "netstat -atunp | grep BODS.x86" echo -e "" @@ -1199,11 +1184,7 @@ fn_info_message_mordhau(){ echo -e "" { echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" - echo -e "> Game\tINBOUND\t${port}\ttcp" - # Don't do arithmetics if ever the port wasn't a numeric value - if [ "${port}" -eq "${port}" ]; then - echo -e "> Steam\tINBOUND\t$((port+1))\tudp" - fi + echo -e "> Game\tINBOUND\t${port}\tupd" echo -e "> Query\tINBOUND\t${queryport}\tudp" } | column -s $'\t' -t } diff --git a/lgsm/functions/info_parms.sh b/lgsm/functions/info_parms.sh index 1443a55ca..34ebc793d 100644 --- a/lgsm/functions/info_parms.sh +++ b/lgsm/functions/info_parms.sh @@ -22,13 +22,6 @@ fn_info_parms_ark(){ maxplayers=${maxplayers:-"0"} } -fn_info_parms_mordhau(){ - port=${port:-"0"} - queryport=${queryport:-"0"} - #rconport=${rconport:-"0"} - maxplayers=${maxplayers:-"0"} -} - fn_info_parms_realvirtuality(){ port=${port:-"0"} queryport=$((port + 1)) @@ -148,12 +141,12 @@ fn_info_parms_stickybots(){ maxplayers=${maxplayers:-"0"} } -fn_info_config_towerunite(){ +fn_info_parms_towerunite(){ port=${port:-"0"} queryport=${queryport:-"0"} } -fn_info_config_mordhau(){ +fn_info_parms_mordhau(){ port=${port:-"0"} queryport=${queryport:-"0"} } @@ -225,16 +218,16 @@ elif [ "${shortname}" == "sbots" ]; then fn_info_parms_stickybots # Serious Sam elif [ "${shortname}" == "ss3" ]; then - fn_info_config_seriousengine35 + fn_info_parms_seriousengine35 elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then fn_info_parms_source # Spark elif [ "${engine}" == "spark" ]; then fn_info_parms_spark elif [ "${shortname}" == "tu" ]; then - fn_info_config_towerunite + fn_info_parms_towerunite elif [ "${shortname}" == "mh" ]; then - fn_info_config_mordhau + fn_info_parms_mordhau # Unreal/Unreal 2 engine elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then fn_info_parms_unreal diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index c4e613dcf..f9c7e1cb2 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -154,13 +154,6 @@ elif [ "${gamename}" == "ARK: Survival Evolved" ]; then fn_fetch_default_config fn_default_config_remote fn_set_config_vars -elif [ "${gamename}" == "Mordhau" ]; then - gamedirname="mordhau" - fn_check_cfgdir - array_configs+=( DefaultEngine.ini ) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars elif [ "${gamename}" == "ARMA 3" ]; then gamedirname="Arma3" fn_check_cfgdir From f120f7b9ee591e6ba9e42c72440ad0fa7c17fad4 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 7 May 2019 22:38:57 +0100 Subject: [PATCH 11/13] mhserver: further regressions --- lgsm/functions/info_messages.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index ac6bb2e6a..2400e8569 100644 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -1184,7 +1184,7 @@ fn_info_message_mordhau(){ echo -e "" { echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" - echo -e "> Game\tINBOUND\t${port}\tupd" + echo -e "> Game\tINBOUND\t${port}\tudp" echo -e "> Query\tINBOUND\t${queryport}\tudp" } | column -s $'\t' -t } From eddc32c7b3c7d20dabd7c7369d0e5b2290c3ac40 Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 8 May 2019 23:23:19 +0200 Subject: [PATCH 12/13] fix(mhserver): add new BeaconPort for MORDHAU (#2348) Co-authored-by: Christian Birk Joining a server will now reserve a slot in advance, fixing the issue of being booted after loading. Server owners will have to make sure that the beacon port (15000) is reachable; it can be overridden on the command line with BeaconPort= --- lgsm/config-default/config-lgsm/mhserver/_default.cfg | 3 ++- lgsm/functions/info_messages.sh | 1 + lgsm/functions/info_parms.sh | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/mhserver/_default.cfg b/lgsm/config-default/config-lgsm/mhserver/_default.cfg index e8395ed2f..4ae249588 100644 --- a/lgsm/config-default/config-lgsm/mhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mhserver/_default.cfg @@ -11,13 +11,14 @@ ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" port="7777" +beaconport="15000" queryport="27015" # Maps: FFA_Camp, FFA_Contraband, FFA_Grad, FFA_MountainPeak, FFA_Taiga, FFA_ThePit, FFA_Tourney, SKM_Camp, SKM_Contraband, SKM_Grad, SKM_MountainPeak, SKM_Taiga, SKM_ThePit, SKM_Tourney, TDM_Camp, TDM_Contraband, TDM_Grad, TDM_MountainPeak, TDM_Taiga, TDM_ThePit, TDM_Tourney defaultmap="FFA_ThePit" ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters fn_parms(){ -parms="Mordhau ${defaultmap} -log -MultiHome=${ip} -Port=${port} -QueryPort=${queryport}" +parms="Mordhau ${defaultmap} -log -MultiHome=${ip} -Port=${port} -BeaconPort=${beaconport} -QueryPort=${queryport}" } #### LinuxGSM Settings #### diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index 2400e8569..3cdfb6477 100644 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -1185,6 +1185,7 @@ fn_info_message_mordhau(){ { echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" echo -e "> Game\tINBOUND\t${port}\tudp" + echo -e "> BeaconPort\tINBOUND\t${beaconport}\tudp" echo -e "> Query\tINBOUND\t${queryport}\tudp" } | column -s $'\t' -t } diff --git a/lgsm/functions/info_parms.sh b/lgsm/functions/info_parms.sh index 34ebc793d..544c8178c 100644 --- a/lgsm/functions/info_parms.sh +++ b/lgsm/functions/info_parms.sh @@ -149,6 +149,7 @@ fn_info_parms_towerunite(){ fn_info_parms_mordhau(){ port=${port:-"0"} queryport=${queryport:-"0"} + beaconport=${beaconport:-"0"} } fn_info_parms_unreal(){ From 41877ee4b8eb98d5dca8c00a345026a62c5618c3 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 9 May 2019 18:46:21 +0100 Subject: [PATCH 13/13] release v19.6.0 --- linuxgsm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index e5c22af3b..c2607c7ab 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="190503" +version="v19.6.0" shortname="core" gameservername="core" rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"