Просмотр исходного кода

Merge branch 'release/v22.1.0'

Daniel Gibbs 4 лет назад
Родитель
Сommit
0550a8c837
44 измененных файлов с 656 добавлено и 105 удалено
  1. 6 0
      .github/workflows/create-release.yml
  2. 6 0
      .github/workflows/labeler.yml
  3. 6 0
      .github/workflows/lock.yml
  4. 3 0
      .github/workflows/version-check.yml
  5. 1 1
      lgsm/config-default/config-lgsm/arkserver/_default.cfg
  6. 1 1
      lgsm/config-default/config-lgsm/arma3server/_default.cfg
  7. 187 0
      lgsm/config-default/config-lgsm/armarserver/_default.cfg
  8. 3 0
      lgsm/config-default/config-lgsm/mcbserver/_default.cfg
  9. 1 5
      lgsm/config-default/config-lgsm/ns2server/_default.cfg
  10. 184 0
      lgsm/config-default/config-lgsm/pc2server/_default.cfg
  11. 1 1
      lgsm/config-default/config-lgsm/sdtdserver/_default.cfg
  12. 1 1
      lgsm/config-default/config-lgsm/tfcserver/_default.cfg
  13. 7 2
      lgsm/config-default/config-lgsm/untserver/_default.cfg
  14. 1 0
      lgsm/data/almalinux-8.csv
  15. 1 0
      lgsm/data/centos-7.csv
  16. 1 0
      lgsm/data/centos-8.csv
  17. 2 1
      lgsm/data/debian-10.csv
  18. 4 3
      lgsm/data/debian-11.csv
  19. 2 1
      lgsm/data/debian-9.csv
  20. 1 0
      lgsm/data/rhel-7.csv
  21. 1 0
      lgsm/data/rhel-8.csv
  22. 1 0
      lgsm/data/rocky-8.csv
  23. 2 0
      lgsm/data/serverlist.csv
  24. 2 1
      lgsm/data/ubuntu-18.04.csv
  25. 2 1
      lgsm/data/ubuntu-20.04.csv
  26. 2 1
      lgsm/data/ubuntu-21.04.csv
  27. 2 1
      lgsm/data/ubuntu-21.10.csv
  28. 2 1
      lgsm/data/ubuntu-22.04.csv
  29. 8 0
      lgsm/functions/check_config.sh
  30. 0 6
      lgsm/functions/core_dl.sh
  31. 6 1
      lgsm/functions/core_functions.sh
  32. 2 0
      lgsm/functions/fix.sh
  33. 17 0
      lgsm/functions/fix_armar.sh
  34. 0 55
      lgsm/functions/info_distro.sh
  35. 124 9
      lgsm/functions/info_game.sh
  36. 26 2
      lgsm/functions/info_messages.sh
  37. 12 0
      lgsm/functions/install_config.sh
  38. 9 2
      lgsm/functions/mods_list.sh
  39. 8 4
      lgsm/functions/update_minecraft_bedrock.sh
  40. 7 1
      linuxgsm.sh
  41. 1 1
      tests/tests_fctrserver.sh
  42. 1 1
      tests/tests_jc2server.sh
  43. 1 1
      tests/tests_mcserver.sh
  44. 1 1
      tests/tests_ts3server.sh

+ 6 - 0
.github/workflows/create-release.yml

@@ -5,8 +5,14 @@ on:
     # branches to consider in the event; optional, defaults to all
     # branches to consider in the event; optional, defaults to all
     branches:
     branches:
       - master
       - master
+permissions:
+  contents: read
+
 jobs:
 jobs:
   update_release_draft:
   update_release_draft:
+    permissions:
+      contents: write  # for release-drafter/release-drafter to create a github release
+      pull-requests: write  # for release-drafter/release-drafter to add label to PR
     runs-on: ubuntu-latest
     runs-on: ubuntu-latest
     steps:
     steps:
       # Drafts your next Release notes as Pull Requests are merged into "master"
       # Drafts your next Release notes as Pull Requests are merged into "master"

+ 6 - 0
.github/workflows/labeler.yml

@@ -3,8 +3,14 @@ on:
   issues:
   issues:
     types: [opened, edited]
     types: [opened, edited]
 
 
+permissions:
+  contents: read
+
 jobs:
 jobs:
   triage:
   triage:
+    permissions:
+      contents: read  # for github/issue-labeler to get repo contents
+      issues: write  # for github/issue-labeler to create or remove labels
     runs-on: ubuntu-latest
     runs-on: ubuntu-latest
     steps:
     steps:
     - uses: github/issue-labeler@v2.5
     - uses: github/issue-labeler@v2.5

+ 6 - 0
.github/workflows/lock.yml

@@ -4,8 +4,14 @@ on:
   schedule:
   schedule:
     - cron: '0 0 * * *'
     - cron: '0 0 * * *'
 
 
+permissions:
+  contents: read
+
 jobs:
 jobs:
   lock:
   lock:
+    permissions:
+      issues: write  # for dessant/lock-threads to lock issues
+      pull-requests: write  # for dessant/lock-threads to lock PRs
     runs-on: ubuntu-latest
     runs-on: ubuntu-latest
     steps:
     steps:
       - uses: dessant/lock-threads@v3
       - uses: dessant/lock-threads@v3

+ 3 - 0
.github/workflows/version-check.yml

@@ -7,6 +7,9 @@ name: Version Check
 on: push
 on: push
 
 
 # A workflow run is made up of one or more jobs that can run sequentially or in parallel
 # A workflow run is made up of one or more jobs that can run sequentially or in parallel
+permissions:
+  contents: read
+
 jobs:
 jobs:
   # This workflow contains a single job called "build"
   # This workflow contains a single job called "build"
   Version-Check:
   Version-Check:

+ 1 - 1
lgsm/config-default/config-lgsm/arkserver/_default.cfg

@@ -158,7 +158,7 @@ consoleinteract="no"
 # Do not edit
 # Do not edit
 gamename="ARK: Survival Evolved"
 gamename="ARK: Survival Evolved"
 engine="unreal4"
 engine="unreal4"
-glibc="2.15"
+glibc="2.17"
 
 
 #### Directories ####
 #### Directories ####
 # Edit with care
 # Edit with care

+ 1 - 1
lgsm/config-default/config-lgsm/arma3server/_default.cfg

@@ -32,7 +32,7 @@ servermods=""
 bepath=""
 bepath=""
 
 
 ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
 ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
-startparameters="-ip=${ip} -port=${port} -cfg=${networkcfgfullpath} -config=${servercfgfullpath} -mod=${mods} -servermod=${servermods} -bepath=${bepath} -autoinit -loadmissiontomemory"
+startparameters="-ip=${ip} -port=${port} -cfg=${networkcfgfullpath} -config=${servercfgfullpath} -mod='${mods}' -servermod=${servermods} -bepath=${bepath} -autoinit -loadmissiontomemory"
 
 
 #### LinuxGSM Settings ####
 #### LinuxGSM Settings ####
 
 

+ 187 - 0
lgsm/config-default/config-lgsm/armarserver/_default.cfg

@@ -0,0 +1,187 @@
+##################################
+######## 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 ####
+
+# https://community.bistudio.com/wiki/Arma_Reforger:Server_Hosting
+# MaxFPS to limit the used Server resouces
+maxfps="60"
+
+# Profile Name
+serverprofile="server"
+serverprofilefullpath="${serverfiles}/profiles/${serverprofile}"
+
+## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
+startparameters="-config ${servercfgfullpath} -profile ${serverprofilefullpath} -maxFPS ${maxfps}"
+
+#### 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="5"
+
+## 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="1874900"
+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="Arma Reforger"
+engine="enfusion"
+glibc="2.27"
+
+#### Directories ####
+# Edit with care
+
+## Game Server Directories
+systemdir="${serverfiles}"
+executabledir="${serverfiles}"
+executable="./ArmaReforgerServer"
+servercfgdir="${systemdir}"
+servercfg="${selfname}_config.json"
+servercfgdefault="server.json"
+servercfgfullpath="${servercfgdir}/${servercfg}"
+
+## Backup Directory
+backupdir="${lgsmdir}/backup"
+
+## Logging Directories
+logdir="${rootdir}/log"
+lgsmlogdir="${logdir}/script"
+consolelogdir="${logdir}/console"
+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"

+ 3 - 0
lgsm/config-default/config-lgsm/mcbserver/_default.cfg

@@ -11,6 +11,9 @@
 ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
 ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
 startparameters=""
 startparameters=""
 
 
+# Version (latest|1.18.33.02)
+mcversion="latest"
+
 #### LinuxGSM Settings ####
 #### LinuxGSM Settings ####
 
 
 ## LinuxGSM Stats
 ## LinuxGSM Stats

+ 1 - 5
lgsm/config-default/config-lgsm/ns2server/_default.cfg

@@ -8,10 +8,6 @@
 
 
 #### Game Server Settings ####
 #### Game Server Settings ####
 
 
-## SteamCMD Login | https://docs.linuxgsm.com/steamcmd#steamcmd-login
-steamuser="username"
-steampass='password'
-
 ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters
 ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters
 ip="0.0.0.0"
 ip="0.0.0.0"
 port="27015"
 port="27015"
@@ -28,7 +24,7 @@ serverpassword=""
 # -password \"${serverpassword}\"
 # -password \"${serverpassword}\"
 
 
 ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
 ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
-startparameters="-name \"${servername}\" -port ${port} -webadmin -webdomain ${ip} -webuser ${webadminuser} -webpassword \"${webadminpass}\" -webport ${webadminport} -map ${defaultmap} -limit ${maxplayers} -config_path \"${servercfgdir}\" -logdir \"${gamelogdir}\" -modstorage \"${modstoragedir}\" -mods \"${mods}\""
+startparameters="-name \"${servername}\" -port ${port} -webadmin -webdomain ${ip} -webuser ${webadminuser} -webpassword \"${webadminpass}\" -webport ${webadminport} -map ${defaultmap} -limit ${maxplayers} -config_path \"${servercfgdir}\" -logdir \"${gamelogdir}\" -modstorage \"${modstoragedir}\" -mods2 \"${mods}\""
 
 
 #### LinuxGSM Settings ####
 #### LinuxGSM Settings ####
 
 

+ 184 - 0
lgsm/config-default/config-lgsm/pc2server/_default.cfg

@@ -0,0 +1,184 @@
+##################################
+######## 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 ####
+
+## SteamCMD Login | https://docs.linuxgsm.com/steamcmd#steamcmd-login
+steamuser="username"
+steampass='password'
+
+## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
+startparameters="--config ${servercfg}"
+
+#### 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="413770"
+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="Project Cars 2"
+engine="madness"
+glibc="2.15"
+
+#### Directories ####
+# Edit with care
+
+## Game Server Directories
+systemdir="${serverfiles}"
+executabledir="${serverfiles}"
+executable="./DedicatedServerCmd.elf"
+servercfgdir="${systemdir}"
+servercfg="${selfname}.cfg"
+servercfgdefault="config_sample/server.cfg"
+servercfgfullpath="${servercfgdir}/${servercfg}"
+
+## Backup Directory
+backupdir="${lgsmdir}/backup"
+
+## Logging Directories
+logdir="${rootdir}/log"
+gamelogdir="${systemdir}/logs"
+lgsmlogdir="${logdir}/script"
+consolelogdir="${logdir}/console"
+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"

+ 1 - 1
lgsm/config-default/config-lgsm/sdtdserver/_default.cfg

@@ -140,7 +140,7 @@ stopmode="8"
 # 3: gamedig
 # 3: gamedig
 # 4: gsquery
 # 4: gsquery
 # 5: tcp
 # 5: tcp
-querymode="2"
+querymode="5"
 querytype="protocol-valve"
 querytype="protocol-valve"
 
 
 ## Console type
 ## Console type

+ 1 - 1
lgsm/config-default/config-lgsm/tfcserver/_default.cfg

@@ -16,7 +16,7 @@ defaultmap="dustbowl"
 maxplayers="16"
 maxplayers="16"
 
 
 ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
 ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
-startparameters="-game tfc -strictportbind _ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}"
+startparameters="-game tfc -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}"
 
 
 #### LinuxGSM Settings ####
 #### LinuxGSM Settings ####
 
 

+ 7 - 2
lgsm/config-default/config-lgsm/untserver/_default.cfg

@@ -12,10 +12,15 @@
 ip="0.0.0.0"
 ip="0.0.0.0"
 port="27015"
 port="27015"
 maxplayers="20"
 maxplayers="20"
-defaultmap="pei"
+defaultmap="PEI"
+
+## Game Server Login Token (GSLT): Required
+# GSLT is required for running a public server.
+# More info: https://docs.linuxgsm.com/steamcmd/gslt
+gslt=""
 
 
 ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
 ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
-startparameters="-port:${port} -players:${maxplayers} --nographics -${defaultmap} -batchmode +secureserver/${selfname}"
+startparameters="-nographics -batchmode -bind ${ip} -port ${port} -maxplayers ${maxplayers} -map ${defaultmap} -gslt ${gslt} +InternetServer/${selfname}"
 
 
 #### LinuxGSM Settings ####
 #### LinuxGSM Settings ####
 
 

+ 1 - 0
lgsm/data/almalinux-8.csv

@@ -5,6 +5,7 @@ ahl
 ahl2
 ahl2
 ark
 ark
 arma3
 arma3
+armar,libcurl,openssl-libs
 av
 av
 bb
 bb
 bb2,libcurl.i686
 bb2,libcurl.i686

+ 1 - 0
lgsm/data/centos-7.csv

@@ -5,6 +5,7 @@ ahl
 ahl2
 ahl2
 ark
 ark
 arma3
 arma3
+armar,libcurl,openssl11-libs
 av
 av
 bb
 bb
 bb2,libcurl.i686
 bb2,libcurl.i686

+ 1 - 0
lgsm/data/centos-8.csv

@@ -5,6 +5,7 @@ ahl
 ahl2
 ahl2
 ark
 ark
 arma3
 arma3
+armar,libcurl,openssl-libs
 av
 av
 bb
 bb
 bb2,libcurl.i686
 bb2,libcurl.i686

+ 2 - 1
lgsm/data/debian-10.csv

@@ -1,10 +1,11 @@
-all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils
+all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils
 steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
 steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
 ac
 ac
 ahl
 ahl
 ahl2
 ahl2
 ark
 ark
 arma3
 arma3
+armar,libcurl4,libssl1.1
 av
 av
 bb
 bb
 bb2,libcurl4-gnutls-dev:i386
 bb2,libcurl4-gnutls-dev:i386

+ 4 - 3
lgsm/data/debian-11.csv

@@ -1,10 +1,11 @@
-all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils
+all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils
 steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
 steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
 ac
 ac
 ahl
 ahl
 ahl2
 ahl2
 ark
 ark
 arma3
 arma3
+armar,libcurl4,libssl1.1
 av
 av
 bb
 bb
 bb2,libcurl4-gnutls-dev:i386
 bb2,libcurl4-gnutls-dev:i386
@@ -78,7 +79,7 @@ pmc,openjdk-17-jre
 pstbs,libgconf-2-4
 pstbs,libgconf-2-4
 pvkii
 pvkii
 pvr,libc++1
 pvr,libc++1
-pz,openjdk-16-jre,rng-tools
+pz,openjdk-17-jre,rng-tools
 q2
 q2
 q3
 q3
 ql
 ql
@@ -87,7 +88,7 @@ ricochet
 ro
 ro
 rtcw
 rtcw
 rust,lib32z1
 rust,lib32z1
-rw,openjdk-16-jre
+rw,openjdk-17-jre
 samp
 samp
 sb
 sb
 sbots
 sbots

+ 2 - 1
lgsm/data/debian-9.csv

@@ -1,10 +1,11 @@
-all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils
+all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils
 steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
 steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
 ac
 ac
 ahl
 ahl
 ahl2
 ahl2
 ark
 ark
 arma3
 arma3
+armar,libcurl4,libssl1.1
 av
 av
 bb
 bb
 bb2,libcurl4-gnutls-dev:i386
 bb2,libcurl4-gnutls-dev:i386

+ 1 - 0
lgsm/data/rhel-7.csv

@@ -5,6 +5,7 @@ ahl
 ahl2
 ahl2
 ark
 ark
 arma3
 arma3
+armar,libcurl,openssl11-libs
 av
 av
 bb
 bb
 bb2,libcurl.i686
 bb2,libcurl.i686

+ 1 - 0
lgsm/data/rhel-8.csv

@@ -5,6 +5,7 @@ ahl
 ahl2
 ahl2
 ark
 ark
 arma3
 arma3
+armar,libcurl,openssl-libs
 av
 av
 bb
 bb
 bb2,libcurl.i686
 bb2,libcurl.i686

+ 1 - 0
lgsm/data/rocky-8.csv

@@ -5,6 +5,7 @@ ahl
 ahl2
 ahl2
 ark
 ark
 arma3
 arma3
+armar,libcurl,openssl-libs
 av
 av
 bb
 bb
 bb2,libcurl.i686
 bb2,libcurl.i686

+ 2 - 0
lgsm/data/serverlist.csv

@@ -3,6 +3,7 @@ ahl,ahlserver,Action Half-Life
 ahl2,ahl2server,Action: Source
 ahl2,ahl2server,Action: Source
 ark,arkserver,ARK: Survival Evolved
 ark,arkserver,ARK: Survival Evolved
 arma3,arma3server,ARMA 3
 arma3,arma3server,ARMA 3
+armar,armarserver,Arma Reforger
 av,avserver,Avorion
 av,avserver,Avorion
 bb,bbserver,BrainBread
 bb,bbserver,BrainBread
 bb2,bb2server,BrainBread 2
 bb2,bb2server,BrainBread 2
@@ -72,6 +73,7 @@ ns2c,ns2cserver,NS2: Combat
 onset,onsetserver,Onset
 onset,onsetserver,Onset
 opfor,opforserver,Opposing Force
 opfor,opforserver,Opposing Force
 pc,pcserver,Project Cars
 pc,pcserver,Project Cars
+pc2,pc2server,Project Cars 2
 pmc,pmcserver,PaperMC
 pmc,pmcserver,PaperMC
 pstbs,pstbsserver,Post Scriptum: The Bloody Seventh
 pstbs,pstbsserver,Post Scriptum: The Bloody Seventh
 pvkii,pvkiiserver,Pirates Vikings & Knights II
 pvkii,pvkiiserver,Pirates Vikings & Knights II

+ 2 - 1
lgsm/data/ubuntu-18.04.csv

@@ -1,10 +1,11 @@
-all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils
+all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils
 steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
 steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
 ac
 ac
 ahl
 ahl
 ahl2
 ahl2
 ark
 ark
 arma3
 arma3
+armar,libcurl4,libssl1.1
 av
 av
 bb
 bb
 bb2,libcurl4-gnutls-dev:i386
 bb2,libcurl4-gnutls-dev:i386

+ 2 - 1
lgsm/data/ubuntu-20.04.csv

@@ -1,10 +1,11 @@
-all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils
+all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils
 steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
 steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
 ac
 ac
 ahl
 ahl
 ahl2
 ahl2
 ark
 ark
 arma3
 arma3
+armar,libcurl4,libssl1.1
 av
 av
 bb
 bb
 bb2,libcurl4-gnutls-dev:i386
 bb2,libcurl4-gnutls-dev:i386

+ 2 - 1
lgsm/data/ubuntu-21.04.csv

@@ -1,10 +1,11 @@
-all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils
+all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils
 steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
 steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
 ac
 ac
 ahl
 ahl
 ahl2
 ahl2
 ark
 ark
 arma3
 arma3
+armar,libcurl4,libssl1.1
 av
 av
 bb
 bb
 bb2,libcurl4-gnutls-dev:i386
 bb2,libcurl4-gnutls-dev:i386

+ 2 - 1
lgsm/data/ubuntu-21.10.csv

@@ -1,10 +1,11 @@
-all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils
+all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils
 steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
 steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
 ac
 ac
 ahl
 ahl
 ahl2
 ahl2
 ark
 ark
 arma3
 arma3
+armar,libcurl4,libssl1.1
 av
 av
 bb
 bb
 bb2,libcurl4-gnutls-dev:i386
 bb2,libcurl4-gnutls-dev:i386

+ 2 - 1
lgsm/data/ubuntu-22.04.csv

@@ -1,10 +1,11 @@
-all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils
+all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils
 steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
 steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
 ac
 ac
 ahl
 ahl
 ahl2
 ahl2
 ark
 ark
 arma3
 arma3
+armar,libcurl4,libssl1.1
 av
 av
 bb
 bb
 bb2,libcurl4-gnutls-dev:i386
 bb2,libcurl4-gnutls-dev:i386

+ 8 - 0
lgsm/functions/check_config.sh

@@ -25,3 +25,11 @@ elif [ -v rconpassword ]&&[ "${rconpassword}" == "CHANGE_ME" ]; then
 	fn_print_warn_nl "Default RCON Password detected"
 	fn_print_warn_nl "Default RCON Password detected"
 	fn_script_log_warn "Default RCON Password detected"
 	fn_script_log_warn "Default RCON Password detected"
 fi
 fi
+
+if [ "${shortname}" == "vh" ]&&[ -z "${serverpassword}" ]; then
+	fn_print_fail_nl "serverpassword is not set"
+	fn_script_log_fatal "serverpassword is not set"
+elif [ "${shortname}" == "vh" ]&&[ "${#serverpassword}" -le "4" ]; then
+	fn_print_fail_nl "serverpassword is to short (min 5 chars)"
+	fn_script_log_fatal "serverpassword is to short (min 5 chars)"
+fi

+ 0 - 6
lgsm/functions/core_dl.sh

@@ -597,9 +597,3 @@ fn_dl_latest_release_github(){
 		fi
 		fi
 	fi
 	fi
 }
 }
-
-# Check that curl is installed
-if [ ! "$(command -v curl 2>/dev/null)" ]; then
-	echo -e "[ FAIL ] Curl is not installed"
-	exit 1
-fi

+ 6 - 1
lgsm/functions/core_functions.sh

@@ -8,7 +8,7 @@
 
 
 functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 
-modulesversion="v21.5.1"
+modulesversion="v22.1.0"
 
 
 # Core
 # Core
 
 
@@ -341,6 +341,11 @@ functionfile="${FUNCNAME[0]}"
 fn_fetch_function
 fn_fetch_function
 }
 }
 
 
+fix_armar.sh(){
+functionfile="${FUNCNAME[0]}"
+fn_fetch_function
+}
+
 fix_bo.sh(){
 fix_bo.sh(){
 functionfile="${FUNCNAME[0]}"
 functionfile="${FUNCNAME[0]}"
 fn_fetch_function
 fn_fetch_function

+ 2 - 0
lgsm/functions/fix.sh

@@ -39,6 +39,8 @@ if [ "${commandname}" != "INSTALL" ]&&[ -z "${fixbypass}" ]; then
 
 
 	if  [ "${shortname}" == "arma3" ]; then
 	if  [ "${shortname}" == "arma3" ]; then
 		fix_arma3.sh
 		fix_arma3.sh
+	elif [ "${shortname}" == "armar" ]; then
+		fix_armar.sh
 	elif [ "${shortname}" == "ark" ]; then
 	elif [ "${shortname}" == "ark" ]; then
 		fix_ark.sh
 		fix_ark.sh
 	elif [ "${shortname}" == "bo" ]; then
 	elif [ "${shortname}" == "bo" ]; then

+ 17 - 0
lgsm/functions/fix_armar.sh

@@ -0,0 +1,17 @@
+#!/bin/bash
+# LinuxGSM fix_armar.sh module
+# Author: Daniel Gibbs
+# Contributors: http://linuxgsm.com/contrib
+# Website: https://linuxgsm.com
+# Description: Resolves an issue with Arma Reforger.
+
+functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+
+# Fixes: Profile directory doesn't exist.
+# Issue Link: https://feedback.bistudio.com/T164845
+if [ ! -d "${serverprofilefullpath}" ]; then
+	fixname="Profile directory doesn't exist"
+	fn_fix_msg_start
+	mkdir -p "${serverprofilefullpath}"
+	fn_fix_msg_end
+fi

+ 0 - 55
lgsm/functions/info_distro.sh

@@ -267,61 +267,6 @@ fi
 netint=$(${ipcommand} -o addr | grep "${ip}" | awk '{print $2}')
 netint=$(${ipcommand} -o addr | grep "${ip}" | awk '{print $2}')
 netlink=$(${ethtoolcommand} "${netint}" 2>/dev/null| grep Speed | awk '{print $2}')
 netlink=$(${ethtoolcommand} "${netint}" 2>/dev/null| grep Speed | awk '{print $2}')
 
 
-# External IP address
-if [ -z "${extip}" ]; then
-	extip="$(curl --connect-timeout 10 -s https://api.ipify.org 2>/dev/null)"
-	exitcode=$?
-	# Should ifconfig.co return an error will use last known IP.
-	if [ ${exitcode} -eq 0 ]; then
-		if [[ "${extip}" != *"DOCTYPE"* ]]; then
-			echo -e "${extip}" > "${tmpdir}/extip.txt"
-		else
-			if [ -f "${tmpdir}/extip.txt" ]; then
-				extip="$(cat "${tmpdir}/extip.txt")"
-			else
-				fn_print_error_nl "Unable to get external IP"
-			fi
-		fi
-	else
-		if [ -f "${tmpdir}/extip.txt" ]; then
-			extip="$(cat "${tmpdir}/extip.txt")"
-		else
-			fn_print_error_nl "Unable to get external IP"
-		fi
-	fi
-fi
-
-# Alert IP address
-if [ "${displayip}" ]; then
-	alertip="${displayip}"
-elif [ "${extip}" ]; then
-	alertip="${extip}"
-else
-	alertip="${ip}"
-fi
-
-# Steam Master Server - checks if detected by master server.
-if [ -z "${displaymasterserver}" ]; then
-	if [ "$(command -v jq 2>/dev/null)" ]; then
-		if [ "${ip}" ]&&[ "${port}" ]; then
-			if [ "${steammaster}" == "true" ]||[ "${commandname}" == "DEV-QUERY-RAW" ]; then
-				# Will query server IP addresses first.
-				for queryip in "${queryips[@]}"; do
-					masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${queryip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" '.response.servers[] | select((.gameport == ($port|tonumber) or (.gameport == ($queryport|tonumber)))) | .addr' | wc -l 2>/dev/null)"
-				done
-				# Should that not work it will try the external IP.
-				if [ "${masterserver}" == "0" ]; then
-					masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${extip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" '.response.servers[] | select((.gameport == ($port|tonumber) or (.gameport == ($queryport|tonumber)))) | .addr' | wc -l 2>/dev/null)"
-				fi
-				if [ "${masterserver}" == "0" ]; then
-					displaymasterserver="false"
-				else
-					displaymasterserver="true"
-				fi
-			fi
-		fi
-	fi
-fi
 # Sets the SteamCMD glibc requirement if the game server requirement is less or not required.
 # Sets the SteamCMD glibc requirement if the game server requirement is less or not required.
 if [ "${appid}" ]; then
 if [ "${appid}" ]; then
 	if [ "${glibc}" = "null" ]||[ -z "${glibc}" ]||[ "$(printf '%s\n'${glibc}'\n' "2.14" | sort -V | head -n 1)" != "2.14" ]; then
 	if [ "${glibc}" = "null" ]||[ -z "${glibc}" ]||[ "$(printf '%s\n'${glibc}'\n' "2.14" | sort -V | head -n 1)" != "2.14" ]; then

+ 124 - 9
lgsm/functions/info_game.sh

@@ -46,9 +46,9 @@ fn_info_game_ark(){
 		adminpassword="${unavailable}"
 		adminpassword="${unavailable}"
 		serverpassword="${unavailable}"
 		serverpassword="${unavailable}"
 	else
 	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]*$//')
-		adminpassword=$(grep "ServerAdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/ServerAdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' )
-		serverpassword=$( grep "ServerPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/ServerPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		servername=$(sed -nr 's/^SessionName=(.*)/\1/p' "${servercfgfullpath}")
+		adminpassword=$(sed -nr 's/^ServerAdminPassword=(.*)/\1/p' "${servercfgfullpath}")
+		serverpassword=$(sed -nr 's/^ServerPassword=(.*)/\1/p' "${servercfgfullpath}")
 
 
 		# Not set
 		# Not set
 		servername=${servername:-"NOT SET"}
 		servername=${servername:-"NOT SET"}
@@ -72,10 +72,10 @@ fn_info_game_arma3(){
 		serverpassword="${unavailable}"
 		serverpassword="${unavailable}"
 		maxplayers="${zero}"
 		maxplayers="${zero}"
 	else
 	else
-		servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
-		adminpassword=$(grep "passwordAdmin" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/passwordAdmin//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
-		serverpassword=$(grep "password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
-		maxplayers=$(grep "maxPlayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]')
+		servername=$(sed -nr 's/^hostname\s*=\s*"(.*)"\s*;/\1/p' "${servercfgfullpath}")
+		adminpassword=$(sed -nr 's/^passwordAdmin\s*=\s*"(.*)"\s*;/\1/p' "${servercfgfullpath}")
+		serverpassword=$(sed -nr 's/^password\s*=\s*"(.*)"\s*;/\1/p' "${servercfgfullpath}")
+		maxplayers=$(sed -nr 's/^maxPlayers\s*=\s*([0-9]+)\s*;/\1/p' "${servercfgfullpath}")
 
 
 		# Not set
 		# Not set
 		servername=${servername:-"NOT SET"}
 		servername=${servername:-"NOT SET"}
@@ -93,6 +93,33 @@ fn_info_game_arma3(){
 	battleeyeport=$((port+4))
 	battleeyeport=$((port+4))
 }
 }
 
 
+fn_info_game_armar(){
+	if [ -f "${servercfgfullpath}" ]; then
+		adminpassword=$(jq -r '.adminPassword' "${servercfgfullpath}")
+		configip=$(jq -r '.gameHostBindAddress' "${servercfgfullpath}")
+		maxplayers=$(jq -r '.game.playerCountLimit' "${servercfgfullpath}")
+		port=$(jq -r '.gameHostBindPort' "${servercfgfullpath}")
+		queryport=$(jq -r '.steamQueryPort' "${servercfgfullpath}")
+		servername=$(jq -r '.game.name' "${servercfgfullpath}")
+		serverpassword=$(jq -r '.game.password' "${servercfgfullpath}")
+		battleeyeport=1376
+
+
+		# Not set
+		adminpassword=${adminpassword:-"NOT SET"}
+		configip=${configip:-"0.0.0.0"}
+		maxplayers=${maxplayers:-"0"}
+		port=${port:-"0"}
+		queryport=${queryport:-"0"}
+		servername=${servername:-"NOT SET"}
+		serverpassword=${serverpassword:-"NOT SET"}
+	else
+		port=${port:-"0"}
+		servername="${unavailable}"
+		serverpassword="${unavailable}"
+	fi
+}
+
 fn_info_game_av() {
 fn_info_game_av() {
 	# Config
 	# Config
 	if [ ! -f "${servercfgfullpath}" ]; then
 	if [ ! -f "${servercfgfullpath}" ]; then
@@ -125,7 +152,7 @@ fn_info_game_av() {
 		maxplayers=${maxplayers:-"NOT SET"}
 		maxplayers=${maxplayers:-"NOT SET"}
 		servername=${servername:-"NOT SET"}
 		servername=${servername:-"NOT SET"}
 		serverpassword=${serverpassword:-"NOT SET"}
 		serverpassword=${serverpassword:-"NOT SET"}
-		port=${zero}
+		port=${port:-"0"}
 		queryport=${queryport:-"0"}
 		queryport=${queryport:-"0"}
 		steamqueryport=${steamqueryport:-"0"}
 		steamqueryport=${steamqueryport:-"0"}
 		steammasterport=${steammasterport:-"0"}
 		steammasterport=${steammasterport:-"0"}
@@ -1100,6 +1127,33 @@ fn_info_game_pc(){
 	fi
 	fi
 }
 }
 
 
+fn_info_game_pc2(){
+	# Config
+	if [ ! -f "${servercfgfullpath}" ]; then
+		servername="${unavailable}"
+		serverpassword="${unavailable}"
+		maxplayers="${zero}"
+		port="${zero}"
+		queryport="${zero}"
+		steamport="${zero}"
+	else
+		servername=$(grep "name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		serverpassword=$(grep "password " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]')
+		port=$(grep "hostPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]')
+		queryport=$(grep "queryPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]')
+		steamport=$(grep "steamPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]')
+
+		# Not set
+		servername=${servername:-"NOT SET"}
+		serverpassword=${serverpassword:-"NOT SET"}
+		maxplayers=${maxplayers:-"NOT SET"}
+		port=${port:-"NOT SET"}
+		queryport=${queryport:-"NOT SET"}
+		steamport=${steamport:-"NOT SET"}
+	fi
+}
+
 fn_info_game_pstbs(){
 fn_info_game_pstbs(){
 	# Config
 	# Config
 	if [ ! -f "${servercfgfullpath}" ]; then
 	if [ ! -f "${servercfgfullpath}" ]; then
@@ -1742,7 +1796,7 @@ fn_info_game_squad(){
 
 
 	# Parameters
 	# Parameters
 	port=${port:-"0"}
 	port=${port:-"0"}
-	queryport=${port:-"0"}
+	queryport=${queryport:-"0"}
 }
 }
 
 
 fn_info_game_st(){
 fn_info_game_st(){
@@ -2255,6 +2309,8 @@ elif [ "${shortname}" == "ark" ]; then
 	fn_info_game_ark
 	fn_info_game_ark
 elif [ "${shortname}" == "arma3" ]; then
 elif [ "${shortname}" == "arma3" ]; then
 	fn_info_game_arma3
 	fn_info_game_arma3
+elif [ "${shortname}" == "armar" ]; then
+	fn_info_game_armar
 elif [ "${shortname}" == "av" ]; then
 elif [ "${shortname}" == "av" ]; then
 	fn_info_game_av
 	fn_info_game_av
 elif [ "${shortname}" == "bf1942" ]; then
 elif [ "${shortname}" == "bf1942" ]; then
@@ -2329,6 +2385,8 @@ elif [ "${shortname}" == "onset" ]; then
 	fn_info_game_onset
 	fn_info_game_onset
 elif [ "${shortname}" == "pc" ]; then
 elif [ "${shortname}" == "pc" ]; then
 	fn_info_game_pc
 	fn_info_game_pc
+elif [ "${shortname}" == "pc2" ]; then
+	fn_info_game_pc2
 elif [ "${shortname}" == "pstbs" ]; then
 elif [ "${shortname}" == "pstbs" ]; then
 	fn_info_game_pstbs
 	fn_info_game_pstbs
 elif [ "${shortname}" == "pvr" ];then
 elif [ "${shortname}" == "pvr" ];then
@@ -2412,3 +2470,60 @@ elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsrc" ]; then
 elif [ "${engine}" == "unreal2" ]; then
 elif [ "${engine}" == "unreal2" ]; then
 	fn_info_game_unreal2
 	fn_info_game_unreal2
 fi
 fi
+
+# External IP address
+if [ -z "${extip}" ]; then
+	extip="$(curl --connect-timeout 10 -s https://api.ipify.org 2>/dev/null)"
+	exitcode=$?
+	# Should ifconfig.co return an error will use last known IP.
+	if [ ${exitcode} -eq 0 ]; then
+		if [[ "${extip}" != *"DOCTYPE"* ]]; then
+			echo -e "${extip}" > "${tmpdir}/extip.txt"
+		else
+			if [ -f "${tmpdir}/extip.txt" ]; then
+				extip="$(cat "${tmpdir}/extip.txt")"
+			else
+				fn_print_error_nl "Unable to get external IP"
+			fi
+		fi
+	else
+		if [ -f "${tmpdir}/extip.txt" ]; then
+			extip="$(cat "${tmpdir}/extip.txt")"
+		else
+			fn_print_error_nl "Unable to get external IP"
+		fi
+	fi
+fi
+
+# Alert IP address
+if [ "${displayip}" ]; then
+	alertip="${displayip}"
+elif [ "${extip}" ]; then
+	alertip="${extip}"
+else
+	alertip="${ip}"
+fi
+
+# Steam Master Server - checks if detected by master server.
+# Checked after config init, as the queryport is needed
+if [ -z "${displaymasterserver}" ]; then
+	if [ "$(command -v jq 2>/dev/null)" ]; then
+		if [ "${ip}" ]&&[ "${port}" ]; then
+			if [ "${steammaster}" == "true" ]||[ "${commandname}" == "DEV-QUERY-RAW" ]; then
+				# Will query server IP addresses first.
+				for queryip in "${queryips[@]}"; do
+					masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${queryip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" '.response.servers[] | select((.gameport == ($port|tonumber) or (.gameport == ($queryport|tonumber)))) | .addr' | wc -l 2>/dev/null)"
+				done
+				# Should that not work it will try the external IP.
+				if [ "${masterserver}" == "0" ]; then
+					masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${extip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" '.response.servers[] | select((.gameport == ($port|tonumber) or (.gameport == ($queryport|tonumber)))) | .addr' | wc -l 2>/dev/null)"
+				fi
+				if [ "${masterserver}" == "0" ]; then
+					displaymasterserver="false"
+				else
+					displaymasterserver="true"
+				fi
+			fi
+		fi
+	fi
+fi

+ 26 - 2
lgsm/functions/info_messages.sh

@@ -658,7 +658,7 @@ fn_info_message_ports_edit(){
 
 
 	startparameterslocation="${red}UNKNOWN${default}"
 	startparameterslocation="${red}UNKNOWN${default}"
 	# engines/games that require editing in the config file.
 	# engines/games that require editing in the config file.
-	local ports_edit_array=( "ac" "arma3" "bo" "bt" "cd" "dst" "eco" "idtech2" "idtech3" "idtech3_ql" "jc2" "jc3" "lwjgl2" "mcb" "mumble" "pc" "pz" "qw" "refractor" "renderware" "rw" "sb" "sdtd" "st" "stn" "ts3" "tw" "terraria" "unreal" "unreal2" "unreal3" "vints" "wurm")
+	local ports_edit_array=( "ac" "arma3" "armar" "bo" "bt" "cd" "dst" "eco" "idtech2" "idtech3" "idtech3_ql" "jc2" "jc3" "lwjgl2" "mcb" "mumble" "pc" "pc2" "pz" "qw" "refractor" "renderware" "rw" "sb" "sdtd" "st" "stn" "ts3" "tw" "terraria" "unreal" "unreal2" "unreal3" "vints" "wurm")
 	for port_edit in "${ports_edit_array[@]}"; do
 	for port_edit in "${ports_edit_array[@]}"; do
 		if [ "${shortname}" == "ut3" ]; then
 		if [ "${shortname}" == "ut3" ]; then
 			startparameterslocation="${servercfgdir}/UTWeb.ini"
 			startparameterslocation="${servercfgdir}/UTWeb.ini"
@@ -681,7 +681,9 @@ fn_info_message_ports_edit(){
 
 
 fn_info_message_ports(){
 fn_info_message_ports(){
 	echo -e "${lightblue}Useful port diagnostic command:${default}"
 	echo -e "${lightblue}Useful port diagnostic command:${default}"
-	if [ "${shortname}" == "av" ]; then
+	if [ "${shortname}" == "armar" ]; then
+		echo -e "ss -tuplwn | grep enfMain"
+	elif [ "${shortname}" == "av" ]; then
 		echo -e "ss -tuplwn | grep AvorionServer"
 		echo -e "ss -tuplwn | grep AvorionServer"
 	elif [ "${shortname}" == "bf1942" ]; then
 	elif [ "${shortname}" == "bf1942" ]; then
 		echo -e "ss -tuplwn | grep bf1942_lnxded"
 		echo -e "ss -tuplwn | grep bf1942_lnxded"
@@ -807,6 +809,15 @@ fn_info_message_arma3(){
 	} | column -s $'\t' -t
 	} | column -s $'\t' -t
 }
 }
 
 
+fn_info_message_armar(){
+	{
+		fn_port "header"
+		fn_port "Game" port udp
+		fn_port "Steam Query" queryport udp
+		fn_port "BattleEye" battleeyeport tcp
+	} | column -s $'\t' -t
+}
+
 fn_info_message_av(){
 fn_info_message_av(){
 	{
 	{
 		fn_port "header"
 		fn_port "header"
@@ -1178,6 +1189,15 @@ fn_info_message_pc(){
 	} | column -s $'\t' -t
 	} | column -s $'\t' -t
 }
 }
 
 
+fn_info_message_pc2(){
+	{
+		fn_port "header"
+		fn_port "Game" port udp
+		fn_port "Query" queryport udp
+		fn_port "Steam" steamport udp
+	} | column -s $'\t' -t
+}
+
 fn_info_message_pstbs(){
 fn_info_message_pstbs(){
 	{
 	{
 		fn_port "header"
 		fn_port "header"
@@ -1630,6 +1650,8 @@ fn_info_message_select_engine(){
 		fn_info_message_ark
 		fn_info_message_ark
 	elif [ "${shortname}" == "arma3" ]; then
 	elif [ "${shortname}" == "arma3" ]; then
 		fn_info_message_arma3
 		fn_info_message_arma3
+	elif [ "${shortname}" == "armar" ]; then
+		fn_info_message_armar
 	elif [ "${shortname}" == "av" ]; then
 	elif [ "${shortname}" == "av" ]; then
 		fn_info_message_av
 		fn_info_message_av
 	elif [ "${shortname}" == "bf1942" ]; then
 	elif [ "${shortname}" == "bf1942" ]; then
@@ -1708,6 +1730,8 @@ fn_info_message_select_engine(){
 		fn_info_message_onset
 		fn_info_message_onset
 	elif [ "${shortname}" == "pc" ]; then
 	elif [ "${shortname}" == "pc" ]; then
 		fn_info_message_pc
 		fn_info_message_pc
+	elif [ "${shortname}" == "pc2" ]; then
+		fn_info_message_pc2
 	elif [ "${shortname}" == "pstbs" ]; then
 	elif [ "${shortname}" == "pstbs" ]; then
 		fn_info_message_pstbs
 		fn_info_message_pstbs
 	elif [ "${shortname}" == "pvr" ]; then
 	elif [ "${shortname}" == "pvr" ]; then

+ 12 - 0
lgsm/functions/install_config.sh

@@ -202,6 +202,14 @@ elif [ "${shortname}" == "arma3" ]; then
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
+elif [ "${shortname}" == "armar" ]; then
+	gamedirname="ArmaReforger"
+	fn_check_cfgdir
+	array_configs+=( server.json )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
+	fn_list_config_locations
 elif [ "${shortname}" == "bo" ]; then
 elif [ "${shortname}" == "bo" ]; then
 	gamedirname="BallisticOverkill"
 	gamedirname="BallisticOverkill"
 	array_configs+=( config.txt )
 	array_configs+=( config.txt )
@@ -633,6 +641,10 @@ elif [ "${shortname}" == "pc" ]; then
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
+elif [ "${shortname}" == "pc2" ]; then
+	gamedirname="ProjectCars2"
+	fn_default_config_local
+	fn_list_config_locations
 elif [ "${shortname}" == "q2" ]; then
 elif [ "${shortname}" == "q2" ]; then
 	gamedirname="Quake2"
 	gamedirname="Quake2"
 	array_configs+=( server.cfg )
 	array_configs+=( server.cfg )

+ 9 - 2
lgsm/functions/mods_list.sh

@@ -82,6 +82,13 @@ csgopracticelatestlink=$(echo -e "${csgopracticelatest}" | jq -r '.browser_downl
 csgopuglatest=$(curl --connect-timeout 10 -sL https://api.github.com/repos/splewis/csgo-pug-setup/releases/latest | jq '.assets[]')
 csgopuglatest=$(curl --connect-timeout 10 -sL https://api.github.com/repos/splewis/csgo-pug-setup/releases/latest | jq '.assets[]')
 csgopuglatestfile=$(echo -e "${csgopuglatest}" | jq -r '.name')
 csgopuglatestfile=$(echo -e "${csgopuglatest}" | jq -r '.name')
 csgopuglatestlink=$(echo -e "${csgopuglatest}" | jq -r '.browser_download_url')
 csgopuglatestlink=$(echo -e "${csgopuglatest}" | jq -r '.browser_download_url')
+gokzlatestversion=$(curl --connect-timeout 10 -s https://api.github.com/repos/KZGlobalTeam/gokz/releases/latest | grep "tag_name" | cut -d : -f 2,3 | sed -E 's/.*"([^"]+)".*/\1/')
+gokzlatestfile="GOKZ-v${gokzlatestversion}.zip"
+gokzlatestlink="https://github.com/KZGlobalTeam/gokz/releases/download/${gokzlatestversion}/${gokzlatestfile}"
+movementapilatestversion=$(curl --connect-timeout 10 -s https://api.github.com/repos/danzayau/MovementAPI/releases/latest | grep "tag_name" | cut -d : -f 2,3 | sed -E 's/.*"([^"]+)".*/\1/')
+movementapilatestfile="MovementAPI-v${movementapilatestversion}.zip"
+movementapilatestlink="https://github.com/danzayau/MovementAPI/releases/download/${movementapilatestversion}/${movementapilatestfile}"
+
 # Oxide
 # Oxide
 oxiderustlatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/OxideMod/Oxide.Rust/releases/latest | jq -r '.assets[]|select(.browser_download_url | contains("linux")) | .browser_download_url')
 oxiderustlatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/OxideMod/Oxide.Rust/releases/latest | jq -r '.assets[]|select(.browser_download_url | contains("linux")) | .browser_download_url')
 oxidehurtworldlatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/OxideMod/Oxide.Hurtworld/releases/latest | jq -r '.assets[].browser_download_url')
 oxidehurtworldlatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/OxideMod/Oxide.Hurtworld/releases/latest | jq -r '.assets[].browser_download_url')
@@ -140,13 +147,13 @@ mod_info_steamworks=( MOD "steamworks" "SteamWorks" "${steamworksurl}" "${steamw
 mod_info_stripper=( MOD "stripper" "Stripper Source" "http://www.bailopan.net/stripper/snapshots/1.2/stripper-1.2.2-git129-linux.tar.gz" "stripper-1.2.2-git129-linux.tar.gz" "0" "LowercaseOff" "${systemdir}" "addons/stripper/maps;" "ENGINES" "Counter-Strike: Global Offensive;Counter-Strike: Source;Day of Defeat: Source;Half Life: Deathmatch;Half Life 2: Deathmatch;Insurgency;Left 4 Dead;Left 4 Dead 2;Nuclear Dawn;Team Fortress 2;" "NOTGAMES" "http://www.bailopan.net/stripper/" "Add or remove objects from map (requires MetaMod)")
 mod_info_stripper=( MOD "stripper" "Stripper Source" "http://www.bailopan.net/stripper/snapshots/1.2/stripper-1.2.2-git129-linux.tar.gz" "stripper-1.2.2-git129-linux.tar.gz" "0" "LowercaseOff" "${systemdir}" "addons/stripper/maps;" "ENGINES" "Counter-Strike: Global Offensive;Counter-Strike: Source;Day of Defeat: Source;Half Life: Deathmatch;Half Life 2: Deathmatch;Insurgency;Left 4 Dead;Left 4 Dead 2;Nuclear Dawn;Team Fortress 2;" "NOTGAMES" "http://www.bailopan.net/stripper/" "Add or remove objects from map (requires MetaMod)")
 
 
 # CS:GO Mods
 # CS:GO Mods
-mod_info_gokz=( MOD "gokz" "GOKZ" "https://bitbucket.org/kztimerglobalteam/gokz/downloads/GOKZ-latest.zip" "gokz-latest.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://bitbucket.org/kztimerglobalteam/gokz/src/master/" "Implements the KZ game mode (requires SourceMod and MetaMod)" )
+mod_info_gokz=( MOD "gokz" "GOKZ" "${gokzlatestlink}" "${gokzlatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/KZGlobalTeam/gokz" "GOKZ ${gokzlatestversion} - Implements the KZ game mode (requires SourceMod and MetaMod)" )
 mod_info_ttt=( MOD "ttt" "Trouble in Terrorist Town" "https://csgottt.com/downloads/ttt-latest-dev-${sourcemodversion}.zip" "ttt-latest.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/Bara/TroubleinTerroristTown" "Implements the TTT game mode (requires SourceMod and MetaMod)" )
 mod_info_ttt=( MOD "ttt" "Trouble in Terrorist Town" "https://csgottt.com/downloads/ttt-latest-dev-${sourcemodversion}.zip" "ttt-latest.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/Bara/TroubleinTerroristTown" "Implements the TTT game mode (requires SourceMod and MetaMod)" )
 mod_info_get5=( MOD "get5" "Get 5" "${get5url}" "${get5latestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/splewis/get5" "Plugin for competitive matches/scrims (requires SourceMod and MetaMod)" )
 mod_info_get5=( MOD "get5" "Get 5" "${get5url}" "${get5latestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/splewis/get5" "Plugin for competitive matches/scrims (requires SourceMod and MetaMod)" )
 mod_info_prac=( MOD "prac" "csgo practice mode" "${csgopracticelatestlink}" "${csgopracticelatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/splewis/csgo-practice-mode" "Practice Mode is a sourcemod plugin for helping players/teams run practices." )
 mod_info_prac=( MOD "prac" "csgo practice mode" "${csgopracticelatestlink}" "${csgopracticelatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/splewis/csgo-practice-mode" "Practice Mode is a sourcemod plugin for helping players/teams run practices." )
 mod_info_pug=( MOD "pug" "PUG" "${csgopuglatestlink}" "${csgopuglatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/splewis/csgo-pug-setup" "plugin for setting up private pug/10man games" )
 mod_info_pug=( MOD "pug" "PUG" "${csgopuglatestlink}" "${csgopuglatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/splewis/csgo-pug-setup" "plugin for setting up private pug/10man games" )
 mod_info_dhook=( MOD "dhook" "dhook" "https://forums.alliedmods.net/attachment.php?attachmentid=190123&d=1625050030" "dhooks-2.2.0d17.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://forums.alliedmods.net/showpost.php?p=2588686&postcount=589" "DHooks 2.2.0 - Required for GOKZ" )
 mod_info_dhook=( MOD "dhook" "dhook" "https://forums.alliedmods.net/attachment.php?attachmentid=190123&d=1625050030" "dhooks-2.2.0d17.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://forums.alliedmods.net/showpost.php?p=2588686&postcount=589" "DHooks 2.2.0 - Required for GOKZ" )
-mod_info_movement=( MOD "movementapi" "movementapi" "https://github.com/danzayau/MovementAPI/releases/download/2.1.0/MovementAPI-v2.1.0.zip" "MovementAPI-v2.1.0.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/danzayau/MovementAPI" "Movement API 2.1.0 - Required for GOKZ" )
+mod_info_movement=( MOD "movementapi" "movementapi" "${movementapilatestlink}" "${movementapilatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/danzayau/MovementAPI" "Movement API ${movementapilatestversion} - Required for GOKZ" )
 mod_info_cleaner=( MOD "cleaner" "cleaner" "https://github.com/e54385991/console-cleaner/archive/refs/heads/master.zip" "console-cleaner.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/e54385991/console-cleaner" "Console Cleaner - Optional for GOKZ" )
 mod_info_cleaner=( MOD "cleaner" "cleaner" "https://github.com/e54385991/console-cleaner/archive/refs/heads/master.zip" "console-cleaner.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/e54385991/console-cleaner" "Console Cleaner - Optional for GOKZ" )
 
 
 # Garry's Mod Addons
 # Garry's Mod Addons

+ 8 - 4
lgsm/functions/update_minecraft_bedrock.sh

@@ -11,13 +11,12 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 randnum=$((1 + RANDOM % 5000))
 randnum=$((1 + RANDOM % 5000))
 
 
 fn_update_minecraft_dl(){
 fn_update_minecraft_dl(){
-	latestmcbuildurl=$(curl -H "Accept-Encoding: identity" -H "Accept-Language: en" -Ls -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.${randnum}.212 Safari/537.36" "https://www.minecraft.net/en-us/download/server/bedrock/" | grep -o 'https://minecraft.azureedge.net/bin-linux/[^"]*zip')
-	fn_fetch_file "${latestmcbuildurl}" "" "" "" "${tmpdir}" "bedrock_server.${remotebuild}.zip"
+	fn_fetch_file "https://minecraft.azureedge.net/bin-linux/bedrock-server-${remotebuild}.zip" "" "" "" "${tmpdir}" "bedrock_server.${remotebuild}.zip"
 	echo -e "Extracting to ${serverfiles}...\c"
 	echo -e "Extracting to ${serverfiles}...\c"
 	if [ "${firstcommandname}" == "INSTALL" ]; then
 	if [ "${firstcommandname}" == "INSTALL" ]; then
 		unzip -oq "${tmpdir}/bedrock_server.${remotebuild}.zip" -x "server.properties" -d "${serverfiles}"
 		unzip -oq "${tmpdir}/bedrock_server.${remotebuild}.zip" -x "server.properties" -d "${serverfiles}"
 	else
 	else
-		unzip -oq "${tmpdir}/bedrock_server.${remotebuild}.zip" -x "permissions.json" "server.properties" "whitelist.json" -d "${serverfiles}"
+		unzip -oq "${tmpdir}/bedrock_server.${remotebuild}.zip" -x "permissions.json" "server.properties" "allowlist.json" -d "${serverfiles}"
 	fi
 	fi
 	local exitcode=$?
 	local exitcode=$?
 	if [ "${exitcode}" == "0" ]; then
 	if [ "${exitcode}" == "0" ]; then
@@ -82,7 +81,12 @@ fn_update_minecraft_localbuild(){
 
 
 fn_update_minecraft_remotebuild(){
 fn_update_minecraft_remotebuild(){
 	# Gets remote build info.
 	# Gets remote build info.
-	remotebuild=$(curl -H "Accept-Encoding: identity" -H "Accept-Language: en" -Ls -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.${randnum}.212 Safari/537.36" "https://www.minecraft.net/en-us/download/server/bedrock/" | grep -o 'https://minecraft.azureedge.net/bin-linux/[^"]*' | sed 's/.*\///' | grep -Eo "[.0-9]+[0-9]")
+	if [ "${mcversion}" == "latest" ]; then
+		remotebuild=$(curl -H "Accept-Encoding: identity" -H "Accept-Language: en" -Ls -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.${randnum}.212 Safari/537.36" "https://www.minecraft.net/en-us/download/server/bedrock/" | grep -o 'https://minecraft.azureedge.net/bin-linux/[^"]*' | sed 's/.*\///' | grep -Eo "[.0-9]+[0-9]")
+	else
+		remotebuild="${mcversion}"
+	fi
+
 	if [ "${firstcommandname}" != "INSTALL" ]; then
 	if [ "${firstcommandname}" != "INSTALL" ]; then
 		fn_print_dots "Checking remote build: ${remotelocation}"
 		fn_print_dots "Checking remote build: ${remotelocation}"
 		# Checks if remotebuild variable has been set.
 		# Checks if remotebuild variable has been set.

+ 7 - 1
linuxgsm.sh

@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 	set -x
 fi
 fi
 
 
-version="v21.5.1"
+version="v22.1.0"
 shortname="core"
 shortname="core"
 gameservername="core"
 gameservername="core"
 commandname="CORE"
 commandname="CORE"
@@ -51,6 +51,12 @@ userinput2="${2}"
 [ -n "${LGSM_GITHUBREPO}" ] && githubrepo="${LGSM_GITHUBREPO}" || githubrepo="LinuxGSM"
 [ -n "${LGSM_GITHUBREPO}" ] && githubrepo="${LGSM_GITHUBREPO}" || githubrepo="LinuxGSM"
 [ -n "${LGSM_GITHUBBRANCH}" ] && githubbranch="${LGSM_GITHUBBRANCH}" || githubbranch="master"
 [ -n "${LGSM_GITHUBBRANCH}" ] && githubbranch="${LGSM_GITHUBBRANCH}" || githubbranch="master"
 
 
+# Check that curl is installed before doing anything
+if [ ! "$(command -v curl 2>/dev/null)" ]; then
+	echo -e "[ FAIL ] Curl is not installed"
+	exit 1
+fi
+
 # Core function that is required first.
 # Core function that is required first.
 core_functions.sh(){
 core_functions.sh(){
 	functionfile="${FUNCNAME[0]}"
 	functionfile="${FUNCNAME[0]}"

+ 1 - 1
tests/tests_fctrserver.sh

@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 	set -x
 fi
 fi
 
 
-version="v21.5.1"
+version="v22.1.0"
 shortname="fctr"
 shortname="fctr"
 gameservername="fctrserver"
 gameservername="fctrserver"
 commandname="CORE"
 commandname="CORE"

+ 1 - 1
tests/tests_jc2server.sh

@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 	set -x
 fi
 fi
 
 
-version="v21.5.1"
+version="v22.1.0"
 shortname="jc2"
 shortname="jc2"
 gameservername="jc2server"
 gameservername="jc2server"
 commandname="CORE"
 commandname="CORE"

+ 1 - 1
tests/tests_mcserver.sh

@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 	set -x
 fi
 fi
 
 
-version="v21.5.1"
+version="v22.1.0"
 shortname="mc"
 shortname="mc"
 gameservername="mcserver"
 gameservername="mcserver"
 commandname="CORE"
 commandname="CORE"

+ 1 - 1
tests/tests_ts3server.sh

@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 	set -x
 fi
 fi
 
 
-version="v21.5.1"
+version="v22.1.0"
 shortname="ts3"
 shortname="ts3"
 gameservername="ts3server"
 gameservername="ts3server"
 commandname="CORE"
 commandname="CORE"