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

Merge branch 'release/v26.2.0'

Daniel Gibbs 6 месяцев назад
Родитель
Сommit
88742414b9
67 измененных файлов с 440 добавлено и 232 удалено
  1. 30 0
      .devcontainer/devcontainer.json
  2. 3 14
      .editorconfig
  3. 2 12
      .github/FUNDING.yml
  4. 6 3
      .github/dependabot.yml
  5. 36 0
      .github/workflows/action-prettier.yml
  6. 51 0
      .github/workflows/action-super-linter.yml
  7. 29 0
      .github/workflows/action-update-copyright-years-in-license-file.yml
  8. 4 0
      .github/workflows/details-check.yml
  9. 2 2
      .github/workflows/update-check.yml
  10. 11 2
      .gitignore
  11. 3 0
      .prettierrc.json
  12. 1 0
      .shellcheckrc
  13. 5 3
      .vscode/extensions.json
  14. 2 2
      lgsm/config-default/config-lgsm/cs2server/_default.cfg
  15. 2 0
      lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg
  16. 2 1
      lgsm/config-default/config-lgsm/sfserver/_default.cfg
  17. 2 0
      lgsm/config-default/config-lgsm/tf2server/_default.cfg
  18. 6 2
      lgsm/config-default/config-lgsm/vhserver/_default.cfg
  19. 1 1
      lgsm/config-default/config-lgsm/vintsserver/_default.cfg
  20. 1 1
      lgsm/data/almalinux-8.csv
  21. 1 1
      lgsm/data/almalinux-9.csv
  22. 1 1
      lgsm/data/centos-7.csv
  23. 1 1
      lgsm/data/centos-8.csv
  24. 1 1
      lgsm/data/centos-9.csv
  25. 1 1
      lgsm/data/debian-10.csv
  26. 1 1
      lgsm/data/debian-11.csv
  27. 1 1
      lgsm/data/debian-12.csv
  28. 12 12
      lgsm/data/debian-13.csv
  29. 1 1
      lgsm/data/debian-9.csv
  30. 1 1
      lgsm/data/rhel-7.csv
  31. 1 1
      lgsm/data/rhel-8.csv
  32. 1 1
      lgsm/data/rhel-9.csv
  33. 1 1
      lgsm/data/rocky-8.csv
  34. 1 1
      lgsm/data/rocky-9.csv
  35. 1 1
      lgsm/data/ubuntu-16.04.csv
  36. 1 1
      lgsm/data/ubuntu-18.04.csv
  37. 1 1
      lgsm/data/ubuntu-20.04.csv
  38. 1 1
      lgsm/data/ubuntu-22.04.csv
  39. 1 1
      lgsm/data/ubuntu-23.04.csv
  40. 1 1
      lgsm/data/ubuntu-23.10.csv
  41. 1 1
      lgsm/data/ubuntu-24.04.csv
  42. 6 1
      lgsm/modules/alert_discord.sh
  43. 1 1
      lgsm/modules/alert_email.sh
  44. 9 9
      lgsm/modules/check.sh
  45. 43 19
      lgsm/modules/command_backup.sh
  46. 2 0
      lgsm/modules/command_check_update.sh
  47. 1 0
      lgsm/modules/command_dev_parse_game_details.sh
  48. 6 0
      lgsm/modules/command_dev_query_raw.sh
  49. 18 17
      lgsm/modules/command_fastdl.sh
  50. 1 0
      lgsm/modules/command_mods_install.sh
  51. 1 0
      lgsm/modules/command_mods_remove.sh
  52. 2 6
      lgsm/modules/command_send.sh
  53. 0 35
      lgsm/modules/compress_unreal2_maps.sh
  54. 80 0
      lgsm/modules/compress_unreal_maps.sh
  55. 0 35
      lgsm/modules/compress_ut99_maps.sh
  56. 2 2
      lgsm/modules/core_exit.sh
  57. 5 6
      lgsm/modules/core_getopt.sh
  58. 1 6
      lgsm/modules/core_modules.sh
  59. 3 3
      lgsm/modules/info_distro.sh
  60. 1 0
      lgsm/modules/info_game.sh
  61. 1 0
      lgsm/modules/info_messages.sh
  62. 1 7
      lgsm/modules/install_config.sh
  63. 1 0
      lgsm/modules/install_ut2k4_key.sh
  64. 2 2
      lgsm/modules/mods_list.sh
  65. 3 1
      lgsm/modules/update_vints.sh
  66. 16 5
      lgsm/modules/update_xnt.sh
  67. 3 2
      linuxgsm.sh

+ 30 - 0
.devcontainer/devcontainer.json

@@ -0,0 +1,30 @@
+{
+  "name": "BASH Dev Container",
+  "image": "mcr.microsoft.com/devcontainers/base:ubuntu",
+  "features": {
+    "ghcr.io/devcontainers-community/npm-features/prettier:1": {
+      "plugins": "prettier-plugin-sh"
+    },
+    "ghcr.io/devcontainers-extra/features/actionlint:1": {},
+    "ghcr.io/devcontainers-extra/features/checkov:1": {},
+    "ghcr.io/devcontainers-extra/features/markdownlint-cli:1": {},
+    "ghcr.io/devcontainers-extra/features/shellcheck:1": {},
+    "ghcr.io/devcontainers-extra/features/yamllint:2": {},
+    "ghcr.io/devcontainers/features/github-cli:1": {}
+  },
+  "customizations": {
+    "vscode": {
+      "extensions": [
+        "DavidAnson.vscode-markdownlint",
+        "editorconfig.editorconfig",
+        "esbenp.prettier-vscode",
+        "github.vscode-github-actions",
+        "GitHub.vscode-pull-request-github",
+        "redhat.vscode-yaml",
+        "timonwong.shellcheck",
+        "yzhang.markdown-all-in-one"
+      ]
+    }
+  },
+  "postCreateCommand": "npm init -y >/dev/null 2>&1 || true && npm install --no-save prettier prettier-plugin-sh prettier-plugin-jinja-template"
+}

+ 3 - 14
.editorconfig

@@ -1,28 +1,17 @@
 # EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs.
-# Atom: Please assure your Atom's config setting Tab Type is set to auto, otherwise Atom-EditorConfig may not work as expected. Also disable whitespace package.
 # http://editorconfig.org/
 
 root = true
 
 [*]
 charset = utf-8
-indent_style = tab
-indent_size = 4
-trim_trailing_whitespace = true
 end_of_line = lf
-insert_final_newline = true
-
-# YAML Files
-[*.{yml,yaml}]
-indent_size = 2
-indent_style = space
-
-# JSON Files
-[*.{json,json5,webmanifest}]
 indent_size = 2
 indent_style = space
+insert_final_newline = true
+trim_trailing_whitespace = true
 
 # BASH Files
 [*.{.sh}]
-indent_style = tab
 indent_size = 4
+indent_style = tab

+ 2 - 12
.github/FUNDING.yml

@@ -1,12 +1,2 @@
-# These are supported funding model platforms
-
-github: dgibbs64 # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
-patreon: dgibbs # Replace with a single Patreon username
-open_collective: # Replace with a single Open Collective username
-ko_fi: # Replace with a single Ko-fi username
-tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
-community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
-liberapay: # Replace with a single Liberapay username
-issuehunt: # Replace with a single IssueHunt username
-otechie: # Replace with a single Otechie username
-custom: # Replace with a single custom sponsorship URL
+github: dgibbs64
+patreon: dgibbs

+ 6 - 3
.github/dependabot.yml

@@ -1,8 +1,11 @@
-# Set update schedule for GitHub Actions
 version: 2
 updates:
   - package-ecosystem: "github-actions"
     directory: "/"
     schedule:
-      # Check for updates to GitHub Actions every weekday
-      interval: "daily"
+      interval: "weekly"
+
+  - package-ecosystem: "devcontainers"
+    directory: "/"
+    schedule:
+      interval: weekly

+ 36 - 0
.github/workflows/action-prettier.yml

@@ -0,0 +1,36 @@
+name: Prettier
+
+on:
+  workflow_dispatch:
+  push:
+    branches:
+      - "*"
+
+concurrency:
+  group: prettier-${{ github.ref }}
+  cancel-in-progress: true
+
+permissions:
+  contents: write
+
+jobs:
+  prettier:
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v5
+        with:
+          persist-credentials: false
+
+      - name: Install Prettier and plugins
+        run: |
+          npm install --no-save prettier prettier-plugin-sh prettier-plugin-jinja-template
+
+      - name: Prettify code
+        uses: creyD/prettier_action@v4.6
+        with:
+          prettier_plugins: "prettier-plugin-sh prettier-plugin-jinja-template"
+          prettier_options: --write .
+          github_token: ${{ secrets.GITHUB_TOKEN }}
+          commit_message: "chore(prettier): format code"

+ 51 - 0
.github/workflows/action-super-linter.yml

@@ -0,0 +1,51 @@
+name: Super Linter
+
+on:
+  workflow_dispatch:
+  push:
+    branches:
+      - "*"
+
+concurrency:
+  group: super-linter-${{ github.ref }}
+  cancel-in-progress: true
+
+permissions: {}
+
+jobs:
+  build:
+    name: Lint
+    runs-on: ubuntu-latest
+
+    permissions:
+      contents: read
+      packages: read
+      # To report GitHub Actions status checks
+      statuses: write
+
+    steps:
+      - name: Checkout code
+        uses: actions/checkout@v5
+        with:
+          # super-linter needs the full git history to get the
+          # list of files that changed across commits
+          fetch-depth: 0
+          persist-credentials: false
+
+      - name: Install Prettier plugins (for summary formatting)
+        run: |
+          npm install --no-save prettier prettier-plugin-sh prettier-plugin-jinja-template || true
+
+      - name: Super-linter
+        uses: super-linter/super-linter@v8
+        env:
+          # To report GitHub Actions status checks
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+          VALIDATE_GITHUB_ACTIONS_ZIZMOR: false
+          VALIDATE_JSCPD: false
+          VALIDATE_JSON_PRETTIER: false
+          VALIDATE_MARKDOWN_PRETTIER: false
+          VALIDATE_NATURAL_LANGUAGE: false
+          VALIDATE_SHELL_SHFMT: false
+          VALIDATE_TERRAFORM_TERRASCAN: false
+          VALIDATE_YAML_PRETTIER: false

+ 29 - 0
.github/workflows/action-update-copyright-years-in-license-file.yml

@@ -0,0 +1,29 @@
+name: Update copyright year(s) in license file
+
+on:
+  workflow_dispatch:
+  schedule:
+    - cron: "0 3 1 1 *" # 03:00 AM on January 1
+
+permissions:
+  contents: write
+
+jobs:
+  update-license-year:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v5
+        with:
+          fetch-depth: 0
+          persist-credentials: false
+      - name: Action Update License Year
+        uses: FantasticFiasco/action-update-license-year@v3
+        with:
+          token: ${{ secrets.GITHUB_TOKEN }}
+          path: LICENSE.md
+      - name: Merge pull request
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        run: |
+          gh pr merge --merge --delete-branch

+ 4 - 0
.github/workflows/details-check.yml

@@ -68,6 +68,10 @@ jobs:
           else
             curl -f -o config "https://raw.githubusercontent.com/GameServerManagers/Game-Server-Configs/main/${{ matrix.shortname }}/${{ steps.sets-servercfgname.outputs.servercfgname }}"
           fi
+
+      - name: Pre-load LinuxGSM
+        run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server details
+
       - name: Display config
         run: |
           if [ "${{ steps.sets-servercfgname.outputs.servercfgname }}" == "" ]; then

+ 2 - 2
.github/workflows/update-check.yml

@@ -13,12 +13,12 @@ concurrency:
 jobs:
   update-check:
     if: github.repository_owner == 'GameServerManagers'
-    continue-on-error: true
     runs-on: ubuntu-latest
 
     strategy:
+      fail-fast: false
       matrix:
-        shortname: [css, fctr, jk2, mc, mcb, mta, pmc, ts3, ut99, vints]
+        shortname: [css, fctr, jk2, mc, mcb, mta, pmc, ts3, ut99, vints, xnt]
 
     steps:
       - name: Download linuxgsm.sh

+ 11 - 2
.gitignore

@@ -1,2 +1,11 @@
-.vscode/settings.json
-/node_modules
+# Visual Studio Code
+.vscode/*
+!.vscode/tasks.json
+!.vscode/launch.json
+!.vscode/extensions.json
+!.vscode/*.code-snippets
+.history/
+*.vsix
+
+# Node.js
+node_modules

+ 3 - 0
.prettierrc.json

@@ -0,0 +1,3 @@
+{
+  "plugins": ["prettier-plugin-sh"]
+}

+ 1 - 0
.shellcheckrc

@@ -0,0 +1 @@
+disable=SC2154

+ 5 - 3
.vscode/extensions.json

@@ -1,10 +1,12 @@
 {
   "recommendations": [
-    "ms-python.python",
+    "DavidAnson.vscode-markdownlint",
     "editorconfig.editorconfig",
-    "yzhang.markdown-all-in-one",
     "esbenp.prettier-vscode",
+    "github.vscode-github-actions",
+    "GitHub.vscode-pull-request-github",
+    "redhat.vscode-yaml",
     "timonwong.shellcheck",
-    "redhat.vscode-yaml"
+    "yzhang.markdown-all-in-one"
   ]
 }

+ 2 - 2
lgsm/config-default/config-lgsm/cs2server/_default.cfg

@@ -163,8 +163,8 @@ glibc="2.31"
 
 ## Game Server Directories
 systemdir="${serverfiles}/game/csgo"
-executabledir="${serverfiles}/game/bin/linuxsteamrt64"
-executable="./cs2"
+executabledir="${serverfiles}/game"
+executable="./cs2.sh"
 servercfgdir="${systemdir}/cfg"
 servercfg="${selfname}.cfg"
 servercfgdefault="server.cfg"

+ 2 - 0
lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg

@@ -9,6 +9,8 @@
 #### Game Server Settings ####
 
 ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters
+# Note that for HL2DM, maxplayers > 33 must be specified like so:
+# maxplayers="101 -unrestricted_maxplayers"
 ip="0.0.0.0"
 port="27015"
 clientport="27005"

+ 2 - 1
lgsm/config-default/config-lgsm/sfserver/_default.cfg

@@ -12,11 +12,12 @@
 ip="0.0.0.0"
 queryport="15777"
 beaconport="15000"
+reliableport="8888"
 port="7777"
 
 ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
 ## Game Server Docs | https://satisfactory.fandom.com/wiki/Dedicated_servers
-startparameters="FactoryGame -Port=${port} -ServerQueryPort=${queryport} -BeaconPort=${beaconport} -log"
+startparameters="FactoryGame -Port=${port} -ServerQueryPort=${queryport} -BeaconPort=${beaconport} -ReliablePort=${reliableport} -log"
 
 #### LinuxGSM Settings ####
 

+ 2 - 0
lgsm/config-default/config-lgsm/tf2server/_default.cfg

@@ -9,6 +9,8 @@
 #### Game Server Settings ####
 
 ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters
+# Note that for TF2, maxplayers > 33 must be specified like so:
+# maxplayers="101 -unrestricted_maxplayers"
 ip="0.0.0.0"
 port="27015"
 clientport="27005"

+ 6 - 2
lgsm/config-default/config-lgsm/vhserver/_default.cfg

@@ -174,8 +174,12 @@ stopmode="2"
 # 3: gamedig
 # 4: gsquery
 # 5: tcp
-querymode="2"
-querytype="protocol-valve"
+querymode="1"
+querytype=""
+
+# Deeper monitoring is possible when the server is public and not using Crossplay:
+# querymode="2"
+# querytype="protocol-valve"
 
 ## Console type
 consoleverbose="yes"

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

@@ -12,7 +12,7 @@
 startparameters="--dataPath ${servercfgdir}"
 
 ## Release Settings | https://docs.linuxgsm.com/game-servers/vintagestory#release-settings
-# Branch (stable|unstable)
+# Branch (stable|unstable|<version>)
 branch="stable"
 
 #### LinuxGSM Settings ####

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

@@ -127,7 +127,7 @@ ut2k4
 ut3
 ut99
 vh,glibc-devel,libatomic,pulseaudio-libs-devel
-vints,dotnet-runtime-7.0
+vints,dotnet-runtime-8.0
 vpmc,java-21-openjdk
 vs
 wet

+ 1 - 1
lgsm/data/almalinux-9.csv

@@ -127,7 +127,7 @@ ut2k4
 ut3
 ut99
 vh,glibc-devel,libatomic,pulseaudio-libs-devel
-vints,dotnet-runtime-7.0
+vints,dotnet-runtime-8.0
 vpmc,java-21-openjdk
 vs
 wet

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

@@ -127,7 +127,7 @@ ut2k4
 ut3
 ut99
 vh,glibc-devel,libatomic,pulseaudio-libs-devel
-vints,dotnet-runtime-7.0
+vints,dotnet-runtime-8.0
 vpmc,java-11-openjdk
 vs
 wet

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

@@ -127,7 +127,7 @@ ut2k4
 ut3
 ut99
 vh,glibc-devel,libatomic,pulseaudio-libs-devel
-vints,dotnet-runtime-7.0
+vints,dotnet-runtime-8.0
 vpmc,java-17-openjdk
 vs
 wet

+ 1 - 1
lgsm/data/centos-9.csv

@@ -127,7 +127,7 @@ ut2k4
 ut3
 ut99
 vh,glibc-devel,libatomic,pulseaudio-libs-devel
-vints,dotnet-runtime-7.0
+vints,dotnet-runtime-8.0
 vpmc,java-17-openjdk
 vs
 wet

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

@@ -127,7 +127,7 @@ ut2k4
 ut3
 ut99
 vh,libc6-dev,libatomic1,libpulse-dev
-vints,dotnet-runtime-7.0
+vints,dotnet-runtime-8.0
 vpmc,openjdk-11-jre
 vs
 wet

+ 1 - 1
lgsm/data/debian-11.csv

@@ -127,7 +127,7 @@ ut2k4
 ut3
 ut99
 vh,libc6-dev,libatomic1,libpulse-dev
-vints,dotnet-runtime-7.0
+vints,dotnet-runtime-8.0
 vpmc,openjdk-11-jre
 vs
 wet

+ 1 - 1
lgsm/data/debian-12.csv

@@ -127,7 +127,7 @@ ut2k4
 ut3
 ut99
 vh,libc6-dev,libatomic1,libpulse-dev
-vints,dotnet-runtime-7.0
+vints,dotnet-runtime-8.0
 vpmc,openjdk-17-jre
 vs
 wet

+ 12 - 12
lgsm/data/debian-13.csv

@@ -11,7 +11,7 @@ av
 bb
 bb2,libcurl4-gnutls-dev:i386
 bd
-bf1942,libncurses5:i386,libtinfo5:i386
+bf1942,libncurses5:i386
 bfv,libncurses5:i386,libstdc++5:i386
 bmdm,libncurses5:i386
 bo
@@ -31,7 +31,7 @@ cs
 cs2
 cscz
 csgo
-css,libtinfo5:i386
+css
 ct
 dab
 dayz
@@ -48,7 +48,7 @@ etl
 ets2
 fctr
 fof
-gmod,libtinfo5:i386
+gmod
 hcu
 hl2dm
 hldm
@@ -65,14 +65,14 @@ kf
 kf2
 l4d
 l4d2
-mc,openjdk-22-jre
+mc,openjdk-25-jre
 mcb
 mh
 mohaa,libstdc++5:i386
 mta,libncursesw5,libxml2-utils
 nd
 nec
-nmrih,libtinfo5:i386
+nmrih
 ns
 ns2,speex,libtbb12
 ns2c,speex:i386,libtbb12
@@ -81,12 +81,12 @@ onset,libmariadb-dev
 opfor
 pc
 pc2
-pmc,openjdk-22-jre
+pmc,openjdk-25-jre
 squad44
 pvkii
 pvr,libc++1
 pw
-pz,openjdk-22-jre,rng-tools5
+pz,openjdk-25-jre,rng-tools5
 q2
 q3
 q4
@@ -96,7 +96,7 @@ ricochet
 ro
 rtcw
 rust,lib32z1
-rw,openjdk-22-jre
+rw,openjdk-25-jre
 samp
 sb
 sbots
@@ -104,7 +104,7 @@ scpsl,mono-complete
 scpslsm,mono-complete
 sdtd,telnet,expect,libxml2-utils
 sf
-sfc,libtinfo5:i386
+sfc
 sm,telnet,expect
 sof2
 sol
@@ -127,7 +127,7 @@ ut2k4
 ut3
 ut99
 vh,libc6-dev,libatomic1,libpulse-dev
-vints,dotnet-runtime-7.0
+vints,dotnet-runtime-8.0
 vpmc,openjdk-21-jre
 vs
 wet
@@ -135,5 +135,5 @@ wf
 wmc,openjdk21-jre
 wurm,xvfb
 xnt
-zmr,libtinfo5:i386
-zps,libtinfo5:i386
+zmr
+zps

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

@@ -127,7 +127,7 @@ ut2k4
 ut3
 ut99
 vh,libc6-dev,libatomic1,libpulse-dev
-vints,dotnet-runtime-7.0
+vints,dotnet-runtime-8.0
 vpmc,openjdk-8-jre
 vs
 wet

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

@@ -127,7 +127,7 @@ ut2k4
 ut3
 ut99
 vh,glibc-devel,libatomic,pulseaudio-libs-devel
-vints,dotnet-runtime-7.0
+vints,dotnet-runtime-8.0
 vpmc,java-11-openjdk
 vs
 wet

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

@@ -127,7 +127,7 @@ ut2k4
 ut3
 ut99
 vh,glibc-devel,libatomic,pulseaudio-libs-devel
-vints,dotnet-runtime-7.0
+vints,dotnet-runtime-8.0
 vpmc,java-21-openjdk
 vs
 wet

+ 1 - 1
lgsm/data/rhel-9.csv

@@ -127,7 +127,7 @@ ut2k4
 ut3
 ut99
 vh,glibc-devel,libatomic,pulseaudio-libs-devel
-vints,dotnet-runtime-7.0
+vints,dotnet-runtime-8.0
 vpmc,java-21-openjdk
 vs
 wet

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

@@ -127,7 +127,7 @@ ut2k4
 ut3
 ut99
 vh,glibc-devel,libatomic,pulseaudio-libs-devel
-vints,dotnet-runtime-7.0
+vints,dotnet-runtime-8.0
 vpmc,java-21-openjdk
 vs
 wet

+ 1 - 1
lgsm/data/rocky-9.csv

@@ -127,7 +127,7 @@ ut2k4
 ut3
 ut99
 vh,glibc-devel,libatomic,pulseaudio-libs-devel
-vints,dotnet-runtime-7.0
+vints,dotnet-runtime-8.0
 vpmc,java-21-openjdk
 vs
 wet

+ 1 - 1
lgsm/data/ubuntu-16.04.csv

@@ -127,7 +127,7 @@ ut2k4
 ut3
 ut99
 vh,libc6-dev,libatomic1,libpulse-dev
-vints,dotnet-runtime-7.0
+vints,dotnet-runtime-8.0
 vpmc,openjdk-8-jre
 vs
 wet

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

@@ -127,7 +127,7 @@ ut2k4
 ut3
 ut99
 vh,libc6-dev,libatomic1,libpulse-dev
-vints,dotnet-runtime-7.0
+vints,dotnet-runtime-8.0
 vpmc,openjdk-11-jre
 vs
 wet

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

@@ -127,7 +127,7 @@ ut2k4
 ut3
 ut99
 vh,libc6-dev,libatomic1,libpulse-dev
-vints,dotnet-runtime-7.0
+vints,dotnet-runtime-8.0
 vpmc,openjdk-11-jre
 vs
 wet

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

@@ -127,7 +127,7 @@ ut2k4
 ut3
 ut99
 vh,libc6-dev,libatomic1,libpulse-dev
-vints,dotnet-runtime-7.0
+vints,dotnet-runtime-8.0
 vpmc,openjdk-21-jre
 vs
 wet

+ 1 - 1
lgsm/data/ubuntu-23.04.csv

@@ -127,7 +127,7 @@ ut2k4
 ut3
 ut99
 vh,libc6-dev,libatomic1,libpulse-dev
-vints,dotnet-runtime-7.0
+vints,dotnet-runtime-8.0
 vpmc,openjdk-21-jre
 vs
 wet

+ 1 - 1
lgsm/data/ubuntu-23.10.csv

@@ -127,7 +127,7 @@ ut2k4
 ut3
 ut99
 vh,libc6-dev,libatomic1,libpulse-dev
-vints,dotnet-runtime-7.0
+vints,dotnet-runtime-8.0
 vpmc,openjdk-21-jre
 vs
 wet

+ 1 - 1
lgsm/data/ubuntu-24.04.csv

@@ -127,7 +127,7 @@ ut2k4
 ut3
 ut99
 vh,libc6-dev,libatomic1,libpulse-dev
-vints,dotnet-runtime-7.0
+vints,dotnet-runtime-8.0
 vpmc,openjdk-21-jre
 vs
 wet

+ 6 - 1
lgsm/modules/alert_discord.sh

@@ -46,6 +46,11 @@ json=$(
 					"name": "Server Time",
 					"value": "$(date)",
 					"inline": true
+				},
+				{
+					"name": "More info",
+					"value": "${alerturl}",
+					"inline": true
 				}
 EOF
 )
@@ -63,7 +68,7 @@ EOF
 	)
 fi
 
-if [ -n "{alerturl}" ]; then
+if [ -n "${alerturl}" ]; then
 	json+=$(
 		cat << EOF
 				,

+ 1 - 1
lgsm/modules/alert_email.sh

@@ -15,7 +15,7 @@ else
 	mail -s "${alerttitle}" "${email}" < "${alertlog}"
 fi
 exitcode=$?
-if [ "${exitcode}" -ne 0 ]; then
+if [ "${exitcode}" -eq 0 ]; then
 	fn_print_ok_nl "Sending Email alert: ${email}"
 	fn_script_log_pass "Sending Email alert: ${email}"
 else

+ 9 - 9
lgsm/modules/check.sh

@@ -31,7 +31,7 @@ if [ "${commandname}" != "INSTALL" ] && [ "${commandname}" != "UPDATE-LGSM" ] &&
 	check_system_dir.sh
 fi
 
-allowed_commands_array=(START DEBUG)
+allowed_commands_array=(DEBUG RESTART START)
 for allowed_command in "${allowed_commands_array[@]}"; do
 	if [ "${allowed_command}" == "${commandname}" ]; then
 		check_executable.sh
@@ -39,7 +39,7 @@ for allowed_command in "${allowed_commands_array[@]}"; do
 done
 
 if [ "$(whoami)" != "root" ]; then
-	allowed_commands_array=(DEBUG START INSTALL)
+	allowed_commands_array=(DEBUG RESTART START INSTALL)
 	for allowed_command in "${allowed_commands_array[@]}"; do
 		if [ "${allowed_command}" == "${commandname}" ]; then
 			check_glibc.sh
@@ -54,21 +54,21 @@ for allowed_command in "${allowed_commands_array[@]}"; do
 	fi
 done
 
-allowed_commands_array=(BACKUP DEBUG DETAILS START UPDATE)
+allowed_commands_array=(BACKUP DEBUG DETAILS RESTART START UPDATE)
 for allowed_command in "${allowed_commands_array[@]}"; do
 	if [ "${allowed_command}" == "${commandname}" ]; then
 		check_deps.sh
 	fi
 done
 
-allowed_commands_array=(CONSOLE DEBUG MONITOR START STOP)
+allowed_commands_array=(CONSOLE DEBUG MONITOR RESTART START STOP)
 for allowed_command in "${allowed_commands_array[@]}"; do
 	if [ "${allowed_command}" == "${commandname}" ]; then
 		check_config.sh
 	fi
 done
 
-allowed_commands_array=(DEBUG DETAILS DEV-QUERY-RAW MONITOR POST_DETAILS START STOP POST-DETAILS)
+allowed_commands_array=(DEBUG DETAILS DEV-QUERY-RAW MONITOR POST_DETAILS RESTART START STOP POST-DETAILS)
 for allowed_command in "${allowed_commands_array[@]}"; do
 	if [ "${allowed_command}" == "${commandname}" ]; then
 		if [ -z "${installflag}" ]; then
@@ -77,7 +77,7 @@ for allowed_command in "${allowed_commands_array[@]}"; do
 	fi
 done
 
-allowed_commands_array=(DEBUG START UPDATE VALIDATE CHECK-UPDATE)
+allowed_commands_array=(DEBUG RESTART START UPDATE VALIDATE CHECK-UPDATE)
 for allowed_command in "${allowed_commands_array[@]}"; do
 	if [ "${allowed_command}" == "${commandname}" ]; then
 		if [ "${appid}" ]; then
@@ -86,21 +86,21 @@ for allowed_command in "${allowed_commands_array[@]}"; do
 	fi
 done
 
-allowed_commands_array=(CHANGE-PASSWORD DETAILS MONITOR START STOP UPDATE VALIDATE POST-DETAILS)
+allowed_commands_array=(CHANGE-PASSWORD DETAILS MONITOR RESTART START STOP UPDATE VALIDATE POST-DETAILS)
 for allowed_command in "${allowed_commands_array[@]}"; do
 	if [ "${allowed_command}" == "${commandname}" ]; then
 		check_status.sh
 	fi
 done
 
-allowed_commands_array=(DEBUG START INSTALL)
+allowed_commands_array=(DEBUG RESTART START INSTALL)
 for allowed_command in "${allowed_commands_array[@]}"; do
 	if [ "${allowed_command}" == "${commandname}" ]; then
 		check_system_requirements.sh
 	fi
 done
 
-allowed_commands_array=(DETAILS MONITOR START STOP UPDATE VALIDATE POST-DETAILS)
+allowed_commands_array=(DETAILS MONITOR RESTART START STOP UPDATE VALIDATE POST-DETAILS)
 for allowed_command in "${allowed_commands_array[@]}"; do
 	if [ "${allowed_command}" == "${commandname}" ]; then
 		check_gamedig.sh

+ 43 - 19
lgsm/modules/command_backup.sh

@@ -13,13 +13,13 @@ fn_firstcommand_set
 # Trap to remove lockfile on quit.
 fn_backup_trap() {
 	echo -e ""
-	echo -en "backup ${backupname}.tar.gz..."
+	echo -en "backup ${backupname}.${compressext}..."
 	fn_print_canceled_eol_nl
-	fn_script_log_info "Backup ${backupname}.tar.gz: CANCELED"
-	rm -f "${backupdir:?}/${backupname}.tar.gz" | tee -a "${lgsmlog}"
-	echo -en "backup ${backupname}.tar.gz..."
+	fn_script_log_info "Backup ${backupname}.${compressext}: CANCELED"
+	rm -f "${backupdir:?}/${backupname}.${compressext}" | tee -a "${lgsmlog}"
+	echo -en "backup ${backupname}.${compressext}..."
 	fn_print_removed_eol_nl
-	fn_script_log_info "Backup ${backupname}.tar.gz: REMOVED"
+	fn_script_log_info "Backup ${backupname}.${compressext}: REMOVED"
 	# Remove backup lockfile.
 	rm -f "${lockdir:?}/backup.lock"
 	fn_backup_start_server
@@ -110,23 +110,47 @@ fn_backup_create_lockfile() {
 	trap fn_backup_trap INT
 }
 
+fn_select_compression() {
+	if command -v zstd > /dev/null 2>&1; then
+		compressprog="zstd"
+		compressext="tar.zst"
+		compressflag="--zstd"
+	elif command -v pigz > /dev/null 2>&1; then
+		compressprog="pigz"
+		compressext="tar.gz"
+		compressflag="--use-compress-program=pigz"
+	elif command -v gzip > /dev/null 2>&1; then
+		compressprog="gzip"
+		compressext="tar.gz"
+		compressflag="--gzip"
+	else
+		compressprog=""
+		compressext="tar"
+		compressflag=""
+	fi
+}
+
 # Compressing files.
 fn_backup_compression() {
-	# Tells how much will be compressed using rootdirduexbackup value from info_distro and prompt for continue.
+
 	fn_print_info "A total of ${rootdirduexbackup} will be compressed."
-	fn_script_log_info "A total of ${rootdirduexbackup} will be compressed: ${backupdir}/${backupname}.tar.gz"
-	fn_print_dots "Backup (${rootdirduexbackup}) ${backupname}.tar.gz, in progress ..."
-	fn_script_log_info "Backup ${rootdirduexbackup} ${backupname}.tar.gz, in progress"
+	fn_script_log_info "A total of ${rootdirduexbackup} will be compressed: ${backupdir}/${backupname}.${compressext}"
+	fn_print_dots "Backup (${rootdirduexbackup}) ${backupname}.${compressext}, in progress ..."
+	fn_script_log_info "Backup ${rootdirduexbackup} ${backupname}.${compressext}, in progress"
 	excludedir=$(fn_backup_relpath)
 
-	# Check that excludedir is a valid path.
 	if [ ! -d "${excludedir}" ]; then
 		fn_print_fail_nl "Problem identifying the previous backup directory for exclusion."
 		fn_script_log_fail "Problem identifying the previous backup directory for exclusion"
 		core_exit.sh
 	fi
 
-	tar --use-compress-program=pigz -cf "${backupdir}/${backupname}.tar.gz" -C "${rootdir}" --exclude "${excludedir}" --exclude "${lockdir}" --exclude "${tmpdir}" ./.
+	if [ -n "${compressflag}" ]; then
+		tar ${compressflag} -hcf "${backupdir}/${backupname}.${compressext}" -C "${rootdir}" --exclude "${excludedir}" --exclude "${lockdir}" --exclude "${tmpdir}" ./.
+	else
+		tar -hcf "${backupdir}/${backupname}.${compressext}" -C "${rootdir}" --exclude "${excludedir}" --exclude "${lockdir}" --exclude "${tmpdir}" ./.
+	fi
+
 	exitcode=$?
 	if [ "${exitcode}" -ne 0 ]; then
 		fn_print_fail_eol
@@ -136,8 +160,8 @@ fn_backup_compression() {
 		fn_script_log_fail "Starting backup"
 	else
 		fn_print_ok_eol
-		fn_print_ok_nl "Completed: ${italic}${backupname}.tar.gz${default}, total size $(du -sh "${backupdir}/${backupname}.tar.gz" | awk '{print $1}')"
-		fn_script_log_pass "Backup created: ${backupname}.tar.gz, total size $(du -sh "${backupdir}/${backupname}.tar.gz" | awk '{print $1}')"
+		fn_print_ok "Completed: ${italic}${backupname}.${compressext}${default}, total size $(du -sh "${backupdir}/${backupname}.${compressext}" | awk '{print $1}')"
+		fn_script_log_pass "Backup created: ${backupname}.${compressext}, total size $(du -sh "${backupdir}/${backupname}.${compressext}" | awk '{print $1}')"
 		alert="backup"
 		alert.sh
 	fi
@@ -152,7 +176,7 @@ fn_backup_prune() {
 		# How many backups exceed maxbackups.
 		backupquotadiff=$((backupcount - maxbackups))
 		# How many backups exceed maxbackupdays.
-		backupsoudatedcount=$(find "${backupdir}"/ -type f -name "*.tar.gz" -mtime +"${maxbackupdays}" | wc -l)
+		backupsoudatedcount=$(find "${backupdir}"/ -type f -name "*.tar.*" -mtime +"${maxbackupdays}" | wc -l)
 		# If anything can be cleared.
 		if [ "${backupquotadiff}" -gt "0" ] || [ "${backupsoudatedcount}" -gt "0" ]; then
 			fn_print_dots "Pruning"
@@ -167,7 +191,7 @@ fn_backup_prune() {
 				fn_print_dots "Pruning: Clearing ${backupquotadiff} backup(s)"
 				fn_script_log_info "Pruning: Clearing ${backupquotadiff} backup(s)"
 				# Clear backups over quota.
-				find "${backupdir}"/ -type f -name "*.tar.gz" -printf '%T@ %p\n' | sort -rn | tail -${backupquotadiff} | cut -f2- -d" " | xargs rm
+				find "${backupdir}"/ -type f -name "*.tar.*" -printf '%T@ %p\n' | sort -rn | tail -${backupquotadiff} | cut -f2- -d" " | xargs rm
 				fn_print_ok_nl "Pruning: Clearing ${backupquotadiff} backup(s)"
 				fn_script_log_pass "Pruning: Cleared ${backupquotadiff} backup(s)"
 			# If maxbackupdays is used over maxbackups.
@@ -190,7 +214,7 @@ fn_backup_prune() {
 fn_backup_relpath() {
 	# Written by CedarLUG as a "realpath --relative-to" alternative in bash.
 	# Populate an array of tokens initialized from the rootdir components.
-	declare -a rdirtoks=($(readlink -f "${rootdir}" | sed "s/\// /g"))
+	mapfile -t rdirtoks < <(readlink -f "${rootdir}" | sed "s/\//\n/g")
 	if [ ${#rdirtoks[@]} -eq 0 ]; then
 		fn_print_fail_nl "Problem assessing rootdir during relative path assessment"
 		fn_script_log_fail "Problem assessing rootdir during relative path assessment: ${rootdir}"
@@ -198,7 +222,7 @@ fn_backup_relpath() {
 	fi
 
 	# Populate an array of tokens initialized from the backupdir components.
-	declare -a bdirtoks=($(readlink -f "${backupdir}" | sed "s/\// /g"))
+	mapfile -t bdirtoks < <(readlink -f "${backupdir}" | sed "s/\//\n/g")
 	if [ ${#bdirtoks[@]} -eq 0 ]; then
 		fn_print_fail_nl "Problem assessing backupdir during relative path assessment"
 		fn_script_log_fail "Problem assessing backupdir during relative path assessment: ${rootdir}"
@@ -243,12 +267,12 @@ fn_backup_start_server() {
 fn_print_dots ""
 check.sh
 core_logs.sh
-
+fn_select_compression
 fn_backup_check_lockfile
+fn_backup_create_lockfile
 fn_backup_init
 fn_backup_stop_server
 fn_backup_dir
-fn_backup_create_lockfile
 fn_backup_compression
 fn_backup_prune
 fn_backup_start_server

+ 2 - 0
lgsm/modules/command_check_update.sh

@@ -32,6 +32,8 @@ elif [ "${shortname}" == "vints" ]; then
 	update_vints.sh
 elif [ "${shortname}" == "ut99" ]; then
 	update_ut99.sh
+elif [ "${shortname}" == "xnt" ]; then
+	update_xnt.sh
 else
 	update_steamcmd.sh
 fi

+ 1 - 0
lgsm/modules/command_dev_parse_game_details.sh

@@ -96,6 +96,7 @@ declare -A server_details=(
 	['RCON Port']="${rconport}"
 	['RCON Web']="${rconweb}"
 	['Reserved Slots']="${reservedslots}"
+	['Reliable Messaging']="${reliableport}"
 	['RMI Port']="${rmiport}"
 	['RMI Reg Port']="${rmiregport}"
 	['Salt']="${salt}"

+ 6 - 0
lgsm/modules/command_dev_query_raw.sh

@@ -90,6 +90,12 @@ fn_messages_separator
 		echo -e "Beacon:"
 	fi
 
+	if [ -n "${reliableport}" ]; then
+		echo -e "ReliableMessaging: \t${reliableport} \t$(ss -tupl | grep -c "${reliableport}") \t$(ss -tupl | grep "${reliableport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${reliableport}" | grep udp | awk '{ print $2 }')"
+	else
+		echo -e "ReliableMessaging:"
+	fi
+
 	if [ -n "${clientport}" ]; then
 		echo -e "Client: \t${clientport} \t$(ss -tupl | grep -c "${clientport}") \t$(ss -tupl | grep "${clientport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${clientport}" | grep udp | awk '{ print $2 }')"
 	else

+ 18 - 17
lgsm/modules/command_fastdl.sh

@@ -21,13 +21,6 @@ luasvautorundir="${systemdir}/lua/autorun/server"
 luafastdlfile="lgsm_cl_force_fastdl.lua"
 luafastdlfullpath="${luasvautorundir}/${luafastdlfile}"
 
-# Check if bzip2 is installed.
-if [ ! "$(command -v bzip2 2> /dev/null)" ]; then
-	fn_print_fail "bzip2 is not installed"
-	fn_script_log_fail "bzip2 is not installed"
-	core_exit.sh
-fi
-
 # Header
 fn_print_header
 fn_print_nl "More info: ${italic}https://docs.linuxgsm.com/commands/fastdl"
@@ -112,13 +105,13 @@ fn_fastdl_dirs() {
 # Using this gist https://gist.github.com/agunnerson-ibm/efca449565a3e7356906
 fn_human_readable_file_size() {
 	local abbrevs=(
-		$((1 << 60)):ZB
-		$((1 << 50)):EB
-		$((1 << 40)):TB
-		$((1 << 30)):GB
-		$((1 << 20)):MB
-		$((1 << 10)):KB
-		$((1)):bytes
+		"1152921504606846976:ZB"
+		"1125899906842624:EB"
+		"1099511627776:TB"
+		"1073741824:GB"
+		"1048576:MB"
+		"1024:KB"
+		"1:bytes"
 	)
 
 	local bytes="${1}"
@@ -225,11 +218,17 @@ fn_fastdl_preview() {
 		fn_script_log_fail "Generating file list."
 		core_exit.sh
 	fi
-	fn_print_nl "about to compress ${totalfiles} files, total size $(fn_human_readable_file_size "${filesizetotal}" 0)"
+
+  if [ "${engine}" == "source" ]; then
+		echo -e "about to compress ${totalfiles} files, total size $(fn_human_readable_file_size "${filesizetotal}" 0)"
+	elif [ "${engine}" == "goldsrc" ]; then
+		echo -e "about to copy ${totalfiles} files, total size $(fn_human_readable_file_size "${filesizetotal}" 0)"
+	fi
+
 	fn_script_log_info "${totalfiles} files, total size $(fn_human_readable_file_size "${filesizetotal}" 0)"
 	rm -f "${tmpdir:?}/fastdl_files_to_compress.txt"
 	if ! fn_prompt_yn "Continue?" Y; then
-		fn_script_log "User exited"
+		exitcode=0
 		core_exit.sh
 	fi
 }
@@ -431,7 +430,9 @@ fn_fastdl_preview
 fn_clear_old_fastdl
 fn_fastdl_dirs
 fn_fastdl_build
-fn_fastdl_bzip2
+if [ "${engine}" == "source" ]; then
+	fn_fastdl_bzip2
+fi
 # Finished message.
 fn_print_nl "Fastdl files are located in:"
 fn_print_nl "${fastdldir}"

+ 1 - 0
lgsm/modules/command_mods_install.sh

@@ -88,6 +88,7 @@ if [ -f "${modsinstalledlistfullpath}" ]; then
 		fn_script_log_warn "${modprettyname} is already installed"
 		echo -e " * Any configs may be overwritten."
 		if ! fn_prompt_yn "Continue?" Y; then
+			exitcode=0
 			core_exit.sh
 		fi
 		fn_script_log_info "User selected to continue"

+ 1 - 0
lgsm/modules/command_mods_remove.sh

@@ -47,6 +47,7 @@ done
 fn_print_warning_nl "You are about to remove ${cyan}${usermodselect}${default}."
 echo -e " * Any custom files/configuration will be removed."
 if ! fn_prompt_yn "Continue?" Y; then
+	exitcode=0
 	core_exit.sh
 fi
 

+ 2 - 6
lgsm/modules/command_send.sh

@@ -30,12 +30,8 @@ if [ "${status}" != "0" ]; then
 	tmux -L "${socketname}" send-keys -t "${sessionname}" "${commandtosend}" ENTER
 	fn_script_log_pass "Command \"${commandtosend}\" sent to console"
 else
-	fn_print_error_nl "Server not running"
-	fn_script_log_error "Failed to access: Server not running"
-	if fn_prompt_yn "Do you want to start the server?" Y; then
-		exitbypass=1
-		command_start.sh
-	fi
+	fn_print_error_nl "Unable to send command to console. Server not running"
+	fn_script_log_error "Unable to send command to console. Server not running"
 fi
 
 core_exit.sh

+ 0 - 35
lgsm/modules/compress_unreal2_maps.sh

@@ -1,35 +0,0 @@
-#!/bin/bash
-# LinuxGSM compress_unreal2_maps.sh module
-# Author: Daniel Gibbs
-# Contributors: https://linuxgsm.com/contrib
-# Website: https://linuxgsm.com
-# Description: Compresses unreal maps.
-
-commandname="MAP-COMPRESSOR"
-commandaction="Compressing Maps"
-moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
-fn_firstcommand_set
-
-check.sh
-fn_print_header
-echo -e "Will compress all maps in:"
-echo -e ""
-pwd
-echo -e ""
-echo -e "Compressed maps saved to:"
-echo -e ""
-echo -e "${compressedmapsdir}"
-echo -e ""
-if ! fn_prompt_yn "Start compression?" Y; then
-	exitcode=0
-	core_exit.sh
-fi
-mkdir -pv "${compressedmapsdir}" > /dev/null 2>&1
-rm -rfv "${serverfiles:?}/Maps/"*.ut2.uz2
-cd "${systemdir}" || exit
-for map in "${serverfiles}/Maps/"*; do
-	./ucc-bin compress "${map}" --nohomedir
-done
-mv -fv "${serverfiles}/Maps/"*.ut2.uz2 "${compressedmapsdir}"
-
-core_exit.sh

+ 80 - 0
lgsm/modules/compress_unreal_maps.sh

@@ -0,0 +1,80 @@
+#!/bin/bash
+# LinuxGSM compress_unreal_maps.sh module
+# Author: Daniel Gibbs
+# Contributors: https://linuxgsm.com/contrib
+# Website: https://linuxgsm.com
+# Description: Compresses unreal and unreal2 resources.
+
+commandname="MAP-COMPRESSOR"
+commandaction="Compressing Maps"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+fn_firstcommand_set
+
+check.sh
+fn_print_header
+echo -e "Will compress all maps in:"
+echo -e ""
+pwd
+echo -e ""
+echo -e "Compressed maps saved to:"
+echo -e ""
+echo -e "${compressedmapsdir}"
+echo -e ""
+totalseconds=3
+for seconds in {3..1}; do
+	fn_print_warn "map compression starting in: ${totalseconds}"
+	totalseconds=$((totalseconds - 1))
+	fn_sleep_time_1
+	if [ "${seconds}" == "0" ]; then
+		break
+	fi
+done
+fn_print_nl
+mkdir -pv "${compressedmapsdir}" > /dev/null 2>&1
+
+# List of extensions to compress
+exts=(ut2 kfm rom u ucl upl int utx uax ukx usx unr umx umod uzx)
+
+# Remove old compressed files using find
+for ext in "${exts[@]}"; do
+	mapfile -t oldfiles < <(find "${serverfiles}" -name "*.${ext}.uz2" -type f)
+	if [ ${#oldfiles[@]} -gt 0 ]; then
+		echo -e "found ${#oldfiles[@]} old compressed file(s) to remove for extension: ${ext}"
+	fi
+	for file in "${oldfiles[@]}"; do
+		if rm -f "$file"; then
+			echo -en "removing file [ ${italic}$(basename "$file")${default} ]\c"
+			fn_print_ok_eol_nl
+		else
+			echo -en "removing file [ ${italic}$(basename "$file")${default} ]\c"
+			fn_print_fail_eol_nl
+		fi
+	done
+done
+
+cd "${systemdir}" || exit
+
+# Find and compress files, then move .uz2 to compressedmapsdir
+for ext in "${exts[@]}"; do
+	# Collect all files with the current extension into an array
+	mapfile -t files < <(find "${serverfiles}" -name "*.${ext}" -type f)
+	for file in "${files[@]}"; do
+		echo -en "compressing file [ ${italic}$(basename "$file") -> $(basename "$file").uz2${default} ]\c"
+		if ! ./ucc-bin compress "${file}" --nohomedir > /dev/null 2>&1; then
+			fn_print_fail_eol_nl
+			core_exit.sh
+		else
+			fn_print_ok_eol_nl
+		fi
+
+		if ! mv -f "${file}.uz2" "${compressedmapsdir}" > /dev/null 2>&1; then
+			echo -en "moving compressed file [ ${italic}$(basename "$file").uz2 -> ${compressedmapsdir}/$(basename "$file").uz2${default} ]\c"
+			fn_print_fail_eol_nl
+			core_exit.sh
+		fi
+	done
+done
+
+fn_print_ok_nl "Compression complete: All compressed files moved to: ${compressedmapsdir}"
+
+core_exit.sh

+ 0 - 35
lgsm/modules/compress_ut99_maps.sh

@@ -1,35 +0,0 @@
-#!/bin/bash
-# LinuxGSM compress_ut99_maps.sh module
-# Author: Daniel Gibbs
-# Contributors: https://linuxgsm.com/contrib
-# Website: https://linuxgsm.com
-# Description: Compresses unreal maps.
-
-commandname="MAP-COMPRESSOR"
-commandaction="Compressing Maps"
-moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
-fn_firstcommand_set
-
-check.sh
-fn_print_header
-echo -e "Will compress all maps in:"
-echo -e ""
-pwd
-echo -e ""
-echo -e "Compressed maps saved to:"
-echo -e ""
-echo -e "${compressedmapsdir}"
-echo -e ""
-if ! fn_prompt_yn "Start compression?" Y; then
-	exitcode=0
-	core_exit.sh
-fi
-mkdir -pv "${compressedmapsdir}" > /dev/null 2>&1
-rm -rfv "${serverfiles:?}/Maps/"*.unr.uz
-cd "${systemdir}" || exit
-for map in "${serverfiles}/Maps/"*; do
-	./ucc-bin compress "${map}" --nohomedir
-done
-mv -fv "${serverfiles}/Maps/"*.unr.uz "${compressedmapsdir}"
-
-core_exit.sh

+ 2 - 2
lgsm/modules/core_exit.sh

@@ -13,8 +13,8 @@ fn_exit_dev_debug() {
 		echo -e "${moduleselfname} exiting with code: ${exitcode}"
 		if [ -f "${rootdir}/dev-debug.log" ]; then
 			grep -a "modulefile=" "${rootdir}/dev-debug.log" | sed 's/modulefile=//g' > "${rootdir}/dev-debug-module-order.log"
-		elif [ -f "${lgsmlogdir}/dev-debug.log" ]; then
-			grep -a "modulefile=" "${lgsmlogdir}/dev-debug.log" | sed 's/modulefile=//g' > "${rootdir}/dev-debug-module-order.log"
+		elif [ -f "${logdir}/dev-debug.log" ]; then
+			grep -a "modulefile=" "${logdir}/dev-debug.log" | sed 's/modulefile=//g' > "${logdir}/dev-debug-module-order.log"
 		fi
 	fi
 }

+ 5 - 6
lgsm/modules/core_getopt.sh

@@ -42,8 +42,7 @@ cmd_change_password=("pw;change-password" "command_ts3_server_pass.sh" "Change T
 cmd_install_default_resources=("ir;install-default-resources" "command_install_resources_mta.sh" "Install the MTA default resources.")
 cmd_fullwipe=("fw;full-wipe;wa;wipeall" "serverwipe=1; command_wipe.sh" "Reset the map and remove blueprint data.")
 cmd_mapwipe=("mw;map-wipe;w;wipe;wi" "mapwipe=1; command_wipe.sh" "Reset the map and keep blueprint data.")
-cmd_map_compressor_u99=("mc;map-compressor" "compress_ut99_maps.sh" "Compresses all ${gamename} server maps.")
-cmd_map_compressor_u2=("mc;map-compressor" "compress_unreal2_maps.sh" "Compresses all ${gamename} server maps.")
+cmd_map_compressor_unreal=("mc;map-compressor" "compress_unreal_maps.sh" "Compresses all ${gamename} server maps.")
 cmd_install_cdkey=("cd;server-cd-key" "install_ut2k4_key.sh" "Add your server cd key.")
 cmd_install_dst_token=("ct;cluster-token" "install_dst_token.sh" "Configure cluster token.")
 cmd_install_squad_license=("li;license" "install_squad_license.sh" "Add your Squad server license.")
@@ -96,7 +95,7 @@ fi
 ## Game server exclusive commands.
 
 # FastDL command.
-if [ "${engine}" == "source" ]; then
+if [ "${engine}" == "source" ] || [ "${engine}" == "goldsrc" ]; then
 	currentopt+=("${cmd_fastdl[@]}")
 fi
 
@@ -113,13 +112,13 @@ fi
 # Unreal exclusive.
 if [ "${engine}" == "unreal2" ]; then
 	if [ "${shortname}" == "ut2k4" ]; then
-		currentopt+=("${cmd_install_cdkey[@]}" "${cmd_map_compressor_u2[@]}")
+		currentopt+=("${cmd_install_cdkey[@]}" "${cmd_map_compressor_unreal[@]}")
 	else
-		currentopt+=("${cmd_map_compressor_u2[@]}")
+		currentopt+=("${cmd_map_compressor_unreal[@]}")
 	fi
 fi
 if [ "${engine}" == "unreal" ]; then
-	currentopt+=("${cmd_map_compressor_u99[@]}")
+	currentopt+=("${cmd_map_compressor_unreal[@]}")
 fi
 
 # DST exclusive.

+ 1 - 6
lgsm/modules/core_modules.sh

@@ -8,7 +8,7 @@
 
 moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
-modulesversion="v25.1.6"
+modulesversion="v25.2.0"
 
 # Core
 
@@ -275,11 +275,6 @@ compress_unreal2_maps.sh() {
 	fn_fetch_module
 }
 
-compress_ut99_maps.sh() {
-	modulefile="${FUNCNAME[0]}"
-	fn_fetch_module
-}
-
 # Mods
 
 mods_list.sh() {

+ 3 - 3
lgsm/modules/info_distro.sh

@@ -252,11 +252,11 @@ if [ -d "${backupdir}" ]; then
 	backupcount=0
 
 	# If there are backups in backup dir.
-	if [ "$(find "${backupdir}" -name "*.tar.gz" | wc -l)" -ne "0" ]; then
+	if [ "$(find "${backupdir}" -name "*.tar.*" | wc -l)" -ne "0" ]; then
 		# number of backups.
-		backupcount="$(find "${backupdir}"/*.tar.gz | wc -l)" # integer
+		backupcount="$(find "${backupdir}"/*.tar.* | wc -l)" # integer
 		# most recent backup.
-		lastbackup="$(ls -1t "${backupdir}"/*.tar.gz | head -1)" # string
+		lastbackup="$(ls -1t "${backupdir}"/*.tar.* | head -1)" # string
 		# date of most recent backup.
 		lastbackupdate="$(date -r "${lastbackup}")" # string
 		# no of days since last backup.

+ 1 - 0
lgsm/modules/info_game.sh

@@ -1993,6 +1993,7 @@ fn_info_game_sf() {
 	port="${port:-"0"}"
 	queryport="${queryport:-"0"}"
 	beaconport="${beaconport:-"0"}"
+	reliableport="${reliableport:-"0"}"
 }
 
 # Config Type: Parameters (with an ini)

+ 1 - 0
lgsm/modules/info_messages.sh

@@ -1502,6 +1502,7 @@ fn_info_messages_sf() {
 		fn_port "Game" port udp
 		fn_port "Query" queryport udp
 		fn_port "Beacon" beaconport udp
+		fn_port "ReliableMessaging" reliableport tcp
 	} | column -s $'\t' -t
 }
 

+ 1 - 7
lgsm/modules/install_config.sh

@@ -289,7 +289,6 @@ elif [ "${shortname}" == "bt" ]; then
 elif [ "${shortname}" == "btl" ]; then
 	fn_check_cfgdir
 	array_configs+=(Game.ini)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_list_config_locations
@@ -370,7 +369,6 @@ elif [ "${shortname}" == "cs" ]; then
 	fn_list_config_locations
 elif [ "${shortname}" == "cs2" ]; then
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_list_config_locations
@@ -483,7 +481,6 @@ elif [ "${shortname}" == "hldms" ]; then
 	fn_list_config_locations
 elif [ "${shortname}" == "ohd" ]; then
 	array_configs+=(Admins.cfg Engine.ini Game.ini MapCycle.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_list_config_locations
@@ -585,7 +582,6 @@ elif [ "${shortname}" == "pvkii" ]; then
 	fn_list_config_locations
 elif [ "${shortname}" == "pw" ]; then
 	array_configs+=(PalWorldSettings.ini)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_list_config_locations
@@ -614,13 +610,11 @@ elif [ "${shortname}" == "q2" ]; then
 	fn_list_config_locations
 elif [ "${shortname}" == "q3" ]; then
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_list_config_locations
 elif [ "${shortname}" == "q4" ]; then
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_list_config_locations
@@ -783,8 +777,8 @@ elif [ "${shortname}" == "wmc" ]; then
 	fn_set_config_vars
 	fn_list_config_locations
 elif [ "${shortname}" == "xnt" ]; then
+	fix_xnt.sh
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_list_config_locations

+ 1 - 0
lgsm/modules/install_ut2k4_key.sh

@@ -27,3 +27,4 @@ else
 	echo -e "./${selfname} server-cd-key"
 fi
 echo -e ""
+core_exit.sh

+ 2 - 2
lgsm/modules/mods_list.sh

@@ -55,13 +55,13 @@ amxxtslatestfile="amxmodx-${amxxtsversion}-${amxxtsmod}-linux.tar.gz"
 amxxtsdownloadurl="https://www.amxmodx.org/release/${amxxtslatestfile}"
 amxxtsurl="${amxxtsdownloadurl}"
 # Metamod:Source
-metamodsourceversion="1.11"
+metamodsourceversion="1.12"
 metamodsourcescrapeurl="https://mms.alliedmods.net/mmsdrop/${metamodsourceversion}/mmsource-latest-linux"
 metamodsourcelatestfile=$(wget "${metamodsourcescrapeurl}" -q -O -)
 metamodsourcedownloadurl="https://www.metamodsource.net/latest.php?os=linux&version=${metamodsourceversion}"
 metamodsourceurl="${metamodsourcedownloadurl}"
 # Sourcemod
-sourcemodversion="1.11"
+sourcemodversion="1.13"
 sourcemodscrapeurl="https://sm.alliedmods.net/smdrop/${sourcemodversion}/sourcemod-latest-linux"
 sourcemodlatestfile=$(wget "${sourcemodscrapeurl}" -q -O -)
 sourcemoddownloadurl="https://www.sourcemod.net/latest.php?os=linux&version=${sourcemodversion}"

+ 3 - 1
lgsm/modules/update_vints.sh

@@ -39,8 +39,10 @@ fn_update_remotebuild() {
 	remotebuildresponse=$(curl -s "${apiurl}")
 	if [ "${branch}" == "stable" ]; then
 		remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '[ to_entries[] ] | .[].key' | grep -Ev "\-rc|\-pre" | sort -r -V | head -1)
-	else
+	elif [ "${branch}" == "unstable" ]; then
 		remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '[ to_entries[] ] | .[].key' | grep -E "\-rc|\-pre" | sort -r -V | head -1)
+	else
+		remotebuildversion="${branch}"
 	fi
 	remotebuildfilename=$(echo "${remotebuildresponse}" | jq --arg remotebuildversion "${remotebuildversion}" -r '.[$remotebuildversion].linuxserver.filename')
 	remotebuildurl=$(echo "${remotebuildresponse}" | jq --arg remotebuildversion "${remotebuildversion}" -r '.[$remotebuildversion].linuxserver.urls.cdn')

+ 16 - 5
lgsm/modules/update_xnt.sh

@@ -1,9 +1,9 @@
 #!/bin/bash
-# LinuxGSM command_ut99.sh module
+# LinuxGSM command_xnt.sh module
 # Author: Daniel Gibbs
 # Contributors: https://linuxgsm.com/contrib
 # Website: https://linuxgsm.com
-# Description: Handles updating of Unreal Tournament 99 servers.
+# Description: Handles updating of Xontic servers.
 
 moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
@@ -17,10 +17,21 @@ fn_update_dl() {
 fn_update_localbuild() {
 	# Gets local build info.
 	fn_print_dots "Checking local build: ${remotelocation}"
-
+	check_status.sh
 	# Send version command to Xonotic server.
-	tmux -L "${socketname}" send-keys -t "${sessionname}" "version\r" > /dev/null 2>&1
-	fn_sleep_time_1
+	if [ "${status}" != "0" ]; then
+		tmux -L "${socketname}" send-keys -t "${sessionname}" "version" C-m > /dev/null 2>&1
+		fn_sleep_time_1
+	else
+		exitbypass=1
+		command_start.sh
+		fn_firstcommand_reset
+		exitbypass=1
+		fn_sleep_time_5
+		tmux -L "${socketname}" send-keys -t "${sessionname}" "version" C-m > /dev/null 2>&1
+		command_stop.sh
+		fn_firstcommand_reset
+	fi
 
 	# Uses log file to get local build.
 	localbuild=$(grep "SVQC version: xonotic-v" "${consolelogdir}"/* 2> /dev/null | tail -1 | sed 's/.*SVQC version: \(xonotic-v[0-9.]*\).*/\1/' | tr -d '\000-\011\013-\037')

+ 3 - 2
linuxgsm.sh

@@ -24,7 +24,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="v25.1.6"
+version="v25.2.0"
 shortname="core"
 gameservername="core"
 commandname="CORE"
@@ -32,7 +32,8 @@ rootdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")
 selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")")
 lgsmdir="${rootdir}/lgsm"
 [ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log"
-lgsmlogdir="${logdir}/lgsm"
+lgsmlogdir="${logdir}/script"
+lgsmlog="${lgsmlogdir}/${selfname}-script.log"
 steamcmddir="${HOME}/.steam/steamcmd"
 [ -n "${LGSM_SERVERFILES}" ] && serverfiles="${LGSM_SERVERFILES}" || serverfiles="${rootdir}/serverfiles"
 modulesdir="${lgsmdir}/modules"