From 099d94017acb633a4cf52560a212c3490a214240 Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 25 May 2023 22:36:03 +0200 Subject: [PATCH] feature(newserver): Operation: Harsh Doorstop (#4112) * feat(newserver): Operation: Harsh Doorstop --------- Co-authored-by: Daniel Gibbs --- .../config-lgsm/inssserver/_default.cfg | 2 +- .../config-lgsm/ohdserver/_default.cfg | 191 ++++++++++++++++++ lgsm/data/almalinux-8.csv | 2 + lgsm/data/almalinux-9.csv | 2 + lgsm/data/centos-7.csv | 2 + lgsm/data/centos-8.csv | 2 + lgsm/data/centos-9.csv | 2 + lgsm/data/debian-10.csv | 2 + lgsm/data/debian-11.csv | 2 + lgsm/data/debian-12.csv | 2 + lgsm/data/debian-9.csv | 2 + lgsm/data/rhel-7.csv | 2 + lgsm/data/rhel-8.csv | 2 + lgsm/data/rhel-9.csv | 2 + lgsm/data/rocky-8.csv | 2 + lgsm/data/rocky-9.csv | 2 + lgsm/data/serverlist.csv | 1 + lgsm/data/ubuntu-16.04.csv | 2 + lgsm/data/ubuntu-18.04.csv | 2 + lgsm/data/ubuntu-20.04.csv | 2 + lgsm/data/ubuntu-21.04.csv | 2 + lgsm/data/ubuntu-21.10.csv | 2 + lgsm/data/ubuntu-22.04.csv | 2 + lgsm/modules/info_game.sh | 66 +++--- lgsm/modules/info_messages.sh | 11 + lgsm/modules/install_config.sh | 7 + 26 files changed, 293 insertions(+), 25 deletions(-) create mode 100644 lgsm/config-default/config-lgsm/ohdserver/_default.cfg diff --git a/lgsm/config-default/config-lgsm/inssserver/_default.cfg b/lgsm/config-default/config-lgsm/inssserver/_default.cfg index 5317f6be9..eb26d9211 100644 --- a/lgsm/config-default/config-lgsm/inssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/inssserver/_default.cfg @@ -20,7 +20,7 @@ defaultscenario="Scenario_Crossing_Push_Security" maxplayers="28" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -## Parameter Docs | https://sandstorm-support.newworldinteractive.com/hc/en-us/articles/360049211072-Server-Admin-Guide +## Parameter Docs | https://mod.io/g/insurgencysandstorm/r/server-admin-guide startparameters="${defaultmap}?Scenario=${defaultscenario}?MaxPlayers=${maxplayers} -Port=${port} -QueryPort=${queryport} -hostname='${servername}' -Rcon -RconPassword=${rconpassword} -RconListenPort=${rconport} -log" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/ohdserver/_default.cfg b/lgsm/config-default/config-lgsm/ohdserver/_default.cfg new file mode 100644 index 000000000..4e855eb81 --- /dev/null +++ b/lgsm/config-default/config-lgsm/ohdserver/_default.cfg @@ -0,0 +1,191 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT, ANY CHANGES 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. + +#### Game Server Settings #### + +## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters +ip="0.0.0.0" +port="7777" +queryport="27005" +servername="LinuxGSM Server" +serverpassword="" +# Maps: risala, khafji_p, lamdong, montecassino, argonne +defaultmap="AAS-TestMap" +maxplayers="16" + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +startparameters="${defaultmap}?MaxPlayers=${maxplayers}?Password=${serverpassword} -Port=${port} -QueryPort=${queryport} -SteamServerName='${servername}' -log" + +#### LinuxGSM Settings #### + +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + +## Notification Alerts +# (on|off) + +# Display IP | https://docs.linuxgsm.com/alerts#display-ip +displayip="" + +# More info | https://docs.linuxgsm.com/alerts#more-info +postalert="off" + +# 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="" + +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + +# 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" +mailgunapiregion="us" +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" +pushoveruserkey="userkey" + +# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat +rocketchatalert="off" +rocketchatwebhook="webhook" +rocketchattoken="" + +# Slack Alerts | https://docs.linuxgsm.com/alerts/slack +slackalert="off" +slackwebhook="webhook" + +# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram +# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +telegramapi="api.telegram.org" +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" + +## Monitor | https://docs.linuxgsm.com/commands/monitor +# Query delay time +querydelay="1" + +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors +ansi="on" + +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time +sleeptime="0.5" + +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd +# Server appid +appid="950900" +steamcmdforcewindows="no" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="" +betapassword="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="false" + +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode +# 1: tmux kill +# 2: CTRL+c +# 3: quit +# 4: quit 120s +# 5: stop +# 6: q +# 7: exit +# 8: 7 Days to Die +# 9: GoldSrc +# 10: Avorion +# 11: end +stopmode="2" + +## Query mode +# 1: session only +# 2: gamedig (gsquery fallback) +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Console type +consoleverbose="yes" +consoleinteract="no" + +## Game Server Details +# Do not edit +gamename="Operation: Harsh Doorstop" +engine="unreal4" +glibc="2.17" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}/HarshDoorstop" +executabledir="${systemdir}/Binaries/Linux" +executable="./HarshDoorstopServer-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" +gamelog="${gamelogdir}/${selfname}-game.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/data/almalinux-8.csv b/lgsm/data/almalinux-8.csv index eb72d965e..58882431c 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,ncurses-libs.i686 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,ncurses-libs.i686 ns ns2,speex,tbb ns2c,speex.i686,tbb.i686 +ohd onset,mariadb-connector-c opfor pc diff --git a/lgsm/data/almalinux-9.csv b/lgsm/data/almalinux-9.csv index eb72d965e..58882431c 100644 --- a/lgsm/data/almalinux-9.csv +++ b/lgsm/data/almalinux-9.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,ncurses-libs.i686 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,ncurses-libs.i686 ns ns2,speex,tbb ns2c,speex.i686,tbb.i686 +ohd onset,mariadb-connector-c opfor pc diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index cd537127e..1f8357148 100644 --- a/lgsm/data/centos-7.csv +++ b/lgsm/data/centos-7.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,ncurses-libs.i686 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,ncurses-libs.i686 ns ns2,speex,tbb ns2c,speex.i686,tbb.i686 +ohd onset,mariadb-connector-c opfor pc diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index eb72d965e..58882431c 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,ncurses-libs.i686 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,ncurses-libs.i686 ns ns2,speex,tbb ns2c,speex.i686,tbb.i686 +ohd onset,mariadb-connector-c opfor pc diff --git a/lgsm/data/centos-9.csv b/lgsm/data/centos-9.csv index eb72d965e..58882431c 100644 --- a/lgsm/data/centos-9.csv +++ b/lgsm/data/centos-9.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,ncurses-libs.i686 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,ncurses-libs.i686 ns ns2,speex,tbb ns2c,speex.i686,tbb.i686 +ohd onset,mariadb-connector-c opfor pc diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index eca612229..228a03624 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,libtinfo5:i386 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 ns2c,speex:i386,libtbb2 +ohd onset,libmariadb-dev opfor pc diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index 0eecc40fd..1944a7c23 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,libtinfo5:i386 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 ns2c,speex:i386,libtbb2 +ohd onset,libmariadb-dev opfor pc diff --git a/lgsm/data/debian-12.csv b/lgsm/data/debian-12.csv index 2bd92c32d..5c6169cd3 100644 --- a/lgsm/data/debian-12.csv +++ b/lgsm/data/debian-12.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,libtinfo5:i386 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,libtinfo5:i386 ns ns2,speex,libtbb12 ns2c,speex:i386,libtbb12 +ohd onset,libmariadb-dev opfor pc diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index 8a4fd6df4..eaaed82c0 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,libtinfo5:i386 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 ns2c,speex:i386,libtbb2 +ohd onset,libmariadb-dev opfor pc diff --git a/lgsm/data/rhel-7.csv b/lgsm/data/rhel-7.csv index dbf578bb9..14729d731 100644 --- a/lgsm/data/rhel-7.csv +++ b/lgsm/data/rhel-7.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,ncurses-libs.i686 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,ncurses-libs.i686 ns ns2,speex,tbb ns2c,speex.i686,tbb.i686 +ohd onset,mariadb-connector-c opfor pc diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv index eb72d965e..58882431c 100644 --- a/lgsm/data/rhel-8.csv +++ b/lgsm/data/rhel-8.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,ncurses-libs.i686 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,ncurses-libs.i686 ns ns2,speex,tbb ns2c,speex.i686,tbb.i686 +ohd onset,mariadb-connector-c opfor pc diff --git a/lgsm/data/rhel-9.csv b/lgsm/data/rhel-9.csv index eb72d965e..58882431c 100644 --- a/lgsm/data/rhel-9.csv +++ b/lgsm/data/rhel-9.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,ncurses-libs.i686 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,ncurses-libs.i686 ns ns2,speex,tbb ns2c,speex.i686,tbb.i686 +ohd onset,mariadb-connector-c opfor pc diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index eb72d965e..58882431c 100644 --- a/lgsm/data/rocky-8.csv +++ b/lgsm/data/rocky-8.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,ncurses-libs.i686 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,ncurses-libs.i686 ns ns2,speex,tbb ns2c,speex.i686,tbb.i686 +ohd onset,mariadb-connector-c opfor pc diff --git a/lgsm/data/rocky-9.csv b/lgsm/data/rocky-9.csv index eb72d965e..58882431c 100644 --- a/lgsm/data/rocky-9.csv +++ b/lgsm/data/rocky-9.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,ncurses-libs.i686 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,ncurses-libs.i686 ns ns2,speex,tbb ns2c,speex.i686,tbb.i686 +ohd onset,mariadb-connector-c opfor pc diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index e462e32e6..b442460dc 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -74,6 +74,7 @@ nmrih,nmrihserver,No More Room in Hell,ubuntu-22.04 ns,nsserver,Natural Selection,ubuntu-22.04 ns2,ns2server,Natural Selection 2,ubuntu-22.04 ns2c,ns2cserver,NS2: Combat,ubuntu-22.04 +ohd,ohdserver,Operation: Harsh Doorstop,ubuntu-22.04 onset,onsetserver,Onset,ubuntu-20.04 opfor,opforserver,Opposing Force,ubuntu-22.04 pc,pcserver,Project Cars,ubuntu-22.04 diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index 387a862d9..4c20ca0a7 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,libtinfo5:i386 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 ns2c,speex:i386,libtbb2 +ohd onset,libmariadb-dev opfor pc diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index eca612229..228a03624 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,libtinfo5:i386 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 ns2c,speex:i386,libtbb2 +ohd onset,libmariadb-dev opfor pc diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index a07d23a0b..ce7c8dee4 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,libtinfo5:i386 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 ns2c,speex:i386,libtbb2 +ohd onset,libmariadb-dev opfor pc diff --git a/lgsm/data/ubuntu-21.04.csv b/lgsm/data/ubuntu-21.04.csv index 0eecc40fd..1944a7c23 100644 --- a/lgsm/data/ubuntu-21.04.csv +++ b/lgsm/data/ubuntu-21.04.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,libtinfo5:i386 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 ns2c,speex:i386,libtbb2 +ohd onset,libmariadb-dev opfor pc diff --git a/lgsm/data/ubuntu-21.10.csv b/lgsm/data/ubuntu-21.10.csv index e1504baca..0358b8545 100644 --- a/lgsm/data/ubuntu-21.10.csv +++ b/lgsm/data/ubuntu-21.10.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,libtinfo5:i386 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 ns2c,speex:i386,libtbb2 +ohd onset,libmariadb-dev opfor pc diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index 06190f47e..88bffb66e 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,libtinfo5:i386 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 ns2c,speex:i386,libtbb2 +ohd onset,libmariadb-dev opfor pc diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index 3b5081ad6..6e9d87f0d 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -1339,13 +1339,13 @@ fn_info_game_mc() { configip="${configip:-"0.0.0.0"}" gamemode="${gamemode:-"NOT SET"}" maxplayers="${maxplayers:-"0"}" - port="${port:-"NOT SET"}" + port="${port:-"0"}" queryenabled="${queryenabled:-"NOT SET"}" if [ -z "${queryport}" ]; then queryport="${port}" fi rconpassword="${rconpassword:-"NOT SET"}" - rconport="${rconport:-"NOT SET"}" + rconport="${rconport:-"0"}" servername="${servername:-"NOT SET"}" worldname="${worldname:-"NOT SET"}" } @@ -1451,6 +1451,22 @@ fn_info_game_nec() { serverpassword="${serverpassword:-"NOT SET"}" } +# Config Type: ini +# Parameters: true +# Comment: ; or # +# Example: ServerName=SERVERNAME +# Filetype: ini +fn_info_game_ohd(){ + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_ini rconenabled "bEnabled" + fn_info_game_ini rconport "ListenPort" + fn_info_game_ini rconpassword "Password" + fi + rconenabled="${rconenabled:-"false"}" + rconport="${rconport:-"0"}" + rconpassword="${rconpassword:-"NOT SET"}" +} + # Config Type: json # Parameters: false # Comment: // or /* */ @@ -1733,20 +1749,20 @@ fn_info_game_rw() { configip=$(grep "server_ip" "${servercfgfullpath}" | grep -v "database_mysql_server_ip" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/server_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - rconpassword=${rconpassword:-"NOT SET"} - rconport=${rconport:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - port2=${port2:-"0"} - port3=${port3:-"0"} - port4=${port4:-"0"} - queryport=${queryport:-"0"} - httpqueryport=${httpport:-"0"} - gamemode=${gamemode:-"NOT SET"} - worldname=${worldname:-"NOT SET"} - configip=${configip:-"0.0.0.0"} + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + rconpassword="${rconpassword:-"NOT SET"}" + rconport="${rconport:-"0"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + port2="${port2:-"0"}" + port3="${port3:-"0"}" + port4="${port4:-"0"}" + queryport="${queryport:-"0"}" + httpqueryport="${httpport:-"0"}" + gamemode="${gamemode:-"NOT SET"}" + worldname="${worldname:-"NOT SET"}" + configip="${configip:-"0.0.0.0"}" fi } @@ -1766,17 +1782,17 @@ fn_info_game_samp() { servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/^rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') port=$(grep "port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - queryport=${port} - rconport=${port} + queryport="${port}" + rconport="${port}" maxplayers=$(grep "maxplayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') # Not set - servername=${servername:-"NOT SET"} - rconpassword=${rconpassword:-"NOT SET"} - port=${port:-"7777"} - queryport=${port:-"7777"} - rconport=${rconport:-"7777"} - maxplayers=${maxplayers:-"12"} + servername="${servername:-"NOT SET"}" + rconpassword="${rconpassword:-"NOT SET"}" + port="${port:-"7777"}" + queryport="${port:-"7777"}" + rconport="${rconport:-"7777"}" + maxplayers="${maxplayers:-"12"}" fi } @@ -2267,6 +2283,8 @@ elif [ "${shortname}" == "mta" ]; then fn_info_game_mta elif [ "${shortname}" == "nec" ]; then fn_info_game_nec +elif [ "${shortname}" == "ohd" ]; then + fn_info_game_ohd elif [ "${shortname}" == "onset" ]; then fn_info_game_onset elif [ "${shortname}" == "pc" ]; then diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index c22685293..b4cc65652 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -1193,6 +1193,15 @@ fn_info_message_nec() { } | column -s $'\t' -t } +fn_info_message_ohd() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "RCON" rconport tcp + } | column -s $'\t' -t +} + fn_info_message_onset() { { fn_port "header" @@ -1754,6 +1763,8 @@ fn_info_message_select_engine() { fn_info_message_mta elif [ "${shortname}" == "nec" ]; then fn_info_message_nec + elif [ "${shortname}" == "ohd" ]; then + fn_info_message_ohd elif [ "${shortname}" == "onset" ]; then fn_info_message_onset elif [ "${shortname}" == "pc" ]; then diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index b39539020..9cdb319a9 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -505,6 +505,13 @@ elif [ "${shortname}" == "hldms" ]; then fn_default_config_remote fn_set_config_vars fn_list_config_locations +elif [ "${shortname}" == "ohd" ]; then + gamedirname="OperationHarshDoorstop" + array_configs+=(Game.ini) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "opfor" ]; then gamedirname="OpposingForce" array_configs+=(server.cfg)