Browse Source

Merge branch 'develop' into feature/4331-ntfy

pull/4779/head
Daniel Gibbs 7 months ago
committed by GitHub
parent
commit
247bdb9bc7
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 30
      .devcontainer/devcontainer.json
  2. 17
      .editorconfig
  3. 14
      .github/FUNDING.yml
  4. 9
      .github/dependabot.yml
  5. 36
      .github/workflows/action-prettier.yml
  6. 51
      .github/workflows/action-super-linter.yml
  7. 29
      .github/workflows/action-update-copyright-years-in-license-file.yml
  8. 4
      .github/workflows/details-check.yml
  9. 6
      .github/workflows/trigger-docker-build.yml
  10. 4
      .github/workflows/update-check.yml
  11. 13
      .gitignore
  12. 3
      .prettierrc.json
  13. 1
      .shellcheckrc
  14. 8
      .vscode/extensions.json
  15. 4
      lgsm/config-default/config-lgsm/cs2server/_default.cfg
  16. 5
      lgsm/config-default/config-lgsm/ecoserver/_default.cfg
  17. 2
      lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg
  18. 5
      lgsm/config-default/config-lgsm/hzserver/_default.cfg
  19. 2
      lgsm/config-default/config-lgsm/jc2server/_default.cfg
  20. 3
      lgsm/config-default/config-lgsm/sfserver/_default.cfg
  21. 2
      lgsm/config-default/config-lgsm/tf2server/_default.cfg
  22. 2
      lgsm/config-default/config-lgsm/tfserver/_default.cfg
  23. 8
      lgsm/config-default/config-lgsm/vhserver/_default.cfg
  24. 2
      lgsm/config-default/config-lgsm/vintsserver/_default.cfg
  25. 2
      lgsm/data/almalinux-8.csv
  26. 2
      lgsm/data/almalinux-9.csv
  27. 2
      lgsm/data/centos-7.csv
  28. 2
      lgsm/data/centos-8.csv
  29. 2
      lgsm/data/centos-9.csv
  30. 2
      lgsm/data/debian-10.csv
  31. 2
      lgsm/data/debian-11.csv
  32. 2
      lgsm/data/debian-12.csv
  33. 24
      lgsm/data/debian-13.csv
  34. 2
      lgsm/data/debian-9.csv
  35. 2
      lgsm/data/rhel-7.csv
  36. 2
      lgsm/data/rhel-8.csv
  37. 2
      lgsm/data/rhel-9.csv
  38. 2
      lgsm/data/rocky-8.csv
  39. 2
      lgsm/data/rocky-9.csv
  40. 2
      lgsm/data/serverlist.csv
  41. 2
      lgsm/data/ubuntu-16.04.csv
  42. 2
      lgsm/data/ubuntu-18.04.csv
  43. 2
      lgsm/data/ubuntu-20.04.csv
  44. 2
      lgsm/data/ubuntu-22.04.csv
  45. 2
      lgsm/data/ubuntu-23.04.csv
  46. 2
      lgsm/data/ubuntu-23.10.csv
  47. 4
      lgsm/data/ubuntu-24.04.csv
  48. 118
      lgsm/modules/alert_discord.sh
  49. 2
      lgsm/modules/alert_email.sh
  50. 18
      lgsm/modules/check.sh
  51. 11
      lgsm/modules/check_deps.sh
  52. 62
      lgsm/modules/command_backup.sh
  53. 2
      lgsm/modules/command_check_update.sh
  54. 1
      lgsm/modules/command_dev_parse_game_details.sh
  55. 6
      lgsm/modules/command_dev_query_raw.sh
  56. 35
      lgsm/modules/command_fastdl.sh
  57. 1
      lgsm/modules/command_mods_install.sh
  58. 1
      lgsm/modules/command_mods_remove.sh
  59. 2
      lgsm/modules/command_monitor.sh
  60. 29
      lgsm/modules/command_postdetails.sh
  61. 8
      lgsm/modules/command_send.sh
  62. 35
      lgsm/modules/compress_unreal2_maps.sh
  63. 80
      lgsm/modules/compress_unreal_maps.sh
  64. 35
      lgsm/modules/compress_ut99_maps.sh
  65. 4
      lgsm/modules/core_exit.sh
  66. 11
      lgsm/modules/core_getopt.sh
  67. 7
      lgsm/modules/core_modules.sh
  68. 2
      lgsm/modules/core_steamcmd.sh
  69. 6
      lgsm/modules/info_distro.sh
  70. 1
      lgsm/modules/info_game.sh
  71. 3
      lgsm/modules/info_messages.sh
  72. 8
      lgsm/modules/install_config.sh
  73. 1
      lgsm/modules/install_ut2k4_key.sh
  74. 5
      lgsm/modules/mods_list.sh
  75. 6
      lgsm/modules/query_gsquery.py
  76. 2
      lgsm/modules/update_fctr.sh
  77. 2
      lgsm/modules/update_jk2.sh
  78. 2
      lgsm/modules/update_mc.sh
  79. 19
      lgsm/modules/update_mcb.sh
  80. 2
      lgsm/modules/update_mta.sh
  81. 2
      lgsm/modules/update_pmc.sh
  82. 2
      lgsm/modules/update_ts3.sh
  83. 2
      lgsm/modules/update_ut99.sh
  84. 6
      lgsm/modules/update_vints.sh
  85. 23
      lgsm/modules/update_xnt.sh
  86. 5
      linuxgsm.sh

30
.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"
}

17
.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

14
.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

9
.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
.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/[email protected]
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
.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
.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
.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

6
.github/workflows/trigger-docker-build.yml

@ -1,5 +1,7 @@
name: Trigger Docker Build
on:
workflow_dispatch:
release:
types:
- published
@ -16,7 +18,7 @@ jobs:
owner: GameServerManagers
repo: docker-linuxgsm
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
workflow_file_name: docker-publish.yml
workflow_file_name: action-docker-publish.yml
trigger_build_docker-gameserver:
if: github.repository_owner == 'GameServerManagers'
@ -30,4 +32,4 @@ jobs:
owner: GameServerManagers
repo: docker-gameserver
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
workflow_file_name: docker-publish.yml
workflow_file_name: action-docker-publish.yml

4
.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

13
.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
.prettierrc.json

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

1
.shellcheckrc

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

8
.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"
]
}

4
lgsm/config-default/config-lgsm/cs2server/_default.cfg

@ -183,8 +183,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"

5
lgsm/config-default/config-lgsm/ecoserver/_default.cfg

@ -8,8 +8,11 @@
#### Game Server Settings ####
## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters
usertoken=""
## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
startparameters="-nogui"
startparameters="-nogui -userToken=${usertoken}"
#### LinuxGSM Settings ####

2
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"

5
lgsm/config-default/config-lgsm/hzserver/_default.cfg

@ -12,7 +12,6 @@
ip="0.0.0.0"
port="7777"
queryport="27015"
servername="LinuxGSM"
## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
startparameters="-log -port=${port} -queryport=${queryport} -steamservername=${servername}"
@ -167,8 +166,8 @@ glibc="2.17"
systemdir="${serverfiles}/TSSGame"
executabledir="${systemdir}/Binaries/Linux"
executable="./TSSGameServer-Linux-Shipping"
servercfgdir="${systemdir}/Saved/Config/LinuxServer"
servercfg="GameUserSettings.ini"
servercfgdir="${systemdir}"
servercfg="GameServerSettings.ini"
servercfgdefault="GameUserSettings.ini"
servercfgfullpath="${servercfgdir}/${servercfg}"

2
lgsm/config-default/config-lgsm/jc2server/_default.cfg

@ -144,7 +144,7 @@ stopmode="2"
# 4: gsquery
# 5: tcp
querymode="2"
querytype="jc2mp"
querytype="jc2m"
## Console type
consoleverbose="yes"

3
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
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"

2
lgsm/config-default/config-lgsm/tfserver/_default.cfg

@ -33,7 +33,7 @@ servertags="LinuxGSM"
steamsocket="0" # Use Steam Socket. 0 = off; 1 = on. Use Steam Servers for network penetration. Enable this if you don't have a public IP but you want to allow players from outside your network to join your server. If disabled, only you and other players on your LAN can join. If you have a public IP, you do not need to enable this.
## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
startparameters="ProjectWar_Start?DedicatedServer?MaxPlayers=${maxplayers} -server -game -log -MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -BeaconPort=${beaconport} -ShutDownServicePort=${shutdownport} -ConfigServerName='${selfname}' -OutIPAddress=${publicip} -ServerTags='${servertags}' -UseSteamSocket=${steamsocket} -UserDir='${serverfiles}/${selfname}' -ServerName='${servername}' -EnableParallelCharacterMovementTickFunction -EnableParallelCharacterTickFunction -UseDynamicPhysicsScene -Game.PhysicsVehicle=false -ansimalloc -Game.MaxFrameRate=35 -MaxQueueSize=${maxqueuesize} -QueueValidTime=${queuevalidtime} -QueueThreshold=${maxplayers} -ServerFightModeType=${gamemode} -IsCanSelfDamage=${damageself} -IsCanFriendDamage=${damageallies} -SaveWorldInterval=${saveinterval} -GMOverlapRatio=2 -GreenHand=${greenhand} -SensitiveWords=${allowsensitivewords} -UseACE=${anticheat} -ServerAdminAccounts='${serveradmins}' -IsShowGmTitle=${adminlabel} -ServerPassword='${serverpassword}'"
startparameters="ProjectWar_Start?DedicatedServer?MaxPlayers=${maxplayers} -server -game -log -MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -BeaconPort=${beaconport} -ShutDownServicePort=${shutdownport} -ConfigServerName='${selfname}' -OutIPAddress=${publicip} -ServerTags='${servertags}' -UseSteamSocket=${steamsocket} -UserDir='${serverfiles}/${selfname}' -ServerName='${servername}' -EnableParallelCharacterMovementTickFunction -EnableParallelCharacterTickFunction -UseDynamicPhysicsScene -Game.PhysicsVehicle=false -ansimalloc -Game.MaxFrameRate=35 -MaxQueueSize=${maxqueuesize} -QueueValidTime=${queuevalidtime} -QueueThreshold=${maxplayers} -ServerFightModeType=${gamemode} -IsCanSelfDamage=${damageself} -IsCanFriendDamage=${damageallies} -SaveWorldInterval=${saveinterval} -GMOverlapRatio=2 -GreenHand=${greenhand} -SensitiveWords=${allowsensitivewords} -UseEAC=${anticheat} -ServerAdminAccounts='${serveradmins}' -IsShowGmTitle=${adminlabel} -ServerPassword='${serverpassword}'"
#### LinuxGSM Settings ####

8
lgsm/config-default/config-lgsm/vhserver/_default.cfg

@ -184,8 +184,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"

2
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 ####

2
lgsm/data/almalinux-8.csv

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

Can't render this file because it has a wrong number of fields in line 2.

2
lgsm/data/almalinux-9.csv

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

Can't render this file because it has a wrong number of fields in line 2.

2
lgsm/data/centos-7.csv

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

Can't render this file because it has a wrong number of fields in line 2.

2
lgsm/data/centos-8.csv

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

Can't render this file because it has a wrong number of fields in line 2.

2
lgsm/data/centos-9.csv

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

Can't render this file because it has a wrong number of fields in line 2.

2
lgsm/data/debian-10.csv

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

Can't render this file because it has a wrong number of fields in line 4.

2
lgsm/data/debian-11.csv

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

Can't render this file because it has a wrong number of fields in line 2.

2
lgsm/data/debian-12.csv

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

Can't render this file because it has a wrong number of fields in line 2.

24
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,aspnetcore-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

Can't render this file because it has a wrong number of fields in line 2.

2
lgsm/data/debian-9.csv

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

Can't render this file because it has a wrong number of fields in line 2.

2
lgsm/data/rhel-7.csv

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

Can't render this file because it has a wrong number of fields in line 2.

2
lgsm/data/rhel-8.csv

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

Can't render this file because it has a wrong number of fields in line 2.

2
lgsm/data/rhel-9.csv

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

Can't render this file because it has a wrong number of fields in line 2.

2
lgsm/data/rocky-8.csv

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

Can't render this file because it has a wrong number of fields in line 2.

2
lgsm/data/rocky-9.csv

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

Can't render this file because it has a wrong number of fields in line 2.

2
lgsm/data/serverlist.csv

@ -126,7 +126,7 @@ ut2k4,ut2k4server,Unreal Tournament 2004,ubuntu-24.04
ut3,ut3server,Unreal Tournament 3,ubuntu-24.04
ut99,ut99server,Unreal Tournament 99,ubuntu-24.04
vh,vhserver,Valheim,ubuntu-24.04
vints,vintsserver,Vintage Story,ubuntu-24.04
vints,vintsserver,Vintage Story,ubuntu-22.04
vpmc,vpmcserver,Velocity Proxy MC,ubuntu-24.04
vs,vsserver,Vampire Slayer,ubuntu-24.04
wet,wetserver,Wolfenstein: Enemy Territory,ubuntu-24.04

Can't render this file because it has a wrong number of fields in line 47.

2
lgsm/data/ubuntu-16.04.csv

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

Can't render this file because it has a wrong number of fields in line 2.

2
lgsm/data/ubuntu-18.04.csv

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

Can't render this file because it has a wrong number of fields in line 2.

2
lgsm/data/ubuntu-20.04.csv

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

Can't render this file because it has a wrong number of fields in line 2.

2
lgsm/data/ubuntu-22.04.csv

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

Can't render this file because it has a wrong number of fields in line 2.

2
lgsm/data/ubuntu-23.04.csv

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

Can't render this file because it has a wrong number of fields in line 2.

2
lgsm/data/ubuntu-23.10.csv

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

Can't render this file because it has a wrong number of fields in line 2.

4
lgsm/data/ubuntu-24.04.csv

@ -5,7 +5,7 @@ ahl
ahl2
ark
arma3
armar,libcurl4
armar,libcurl4t64
ats
av
bb
@ -127,7 +127,7 @@ ut2k4
ut3
ut99
vh,libc6-dev,libatomic1,libpulse-dev
vints,aspnetcore-runtime-8.0
vints,dotnet-runtime-8.0
vpmc,openjdk-21-jre
vs
wet

Can't render this file because it has a wrong number of fields in line 2.

118
lgsm/modules/alert_discord.sh

@ -10,68 +10,86 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
json=$(
cat << EOF
{
"username": "LinuxGSM",
"avatar_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg",
"file": "content",
"embeds": [
{
"author": {
"name": "LinuxGSM Alert",
"url": "",
"icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg"
},
"title": "${alerttitle}",
"url": "",
"description": "",
"color": "${alertcolourdec}",
"type": "content",
"thumbnail": {
"url": "${alerticon}"
},
"fields": [
{
"name": "Server Name",
"value": "${servername}"
},
{
"name": "Information",
"value": "${alertmessage}"
},
{
"name": "Game",
"value": "${gamename}",
"inline": true
},
{
"name": "Server Time",
"value": "$(date)",
"inline": true
}
"username": "LinuxGSM",
"avatar_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg",
"file": "content",
"embeds": [
{
"author": {
"name": "LinuxGSM Alert",
"url": "",
"icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg"
},
"title": "${alerttitle}",
"url": "",
"description": "",
"color": "${alertcolourdec}",
"type": "content",
"thumbnail": {
"url": "${alerticon}"
},
"fields": [
{
"name": "Server Name",
"value": "${servername}"
},
{
"name": "Information",
"value": "${alertmessage}"
},
{
"name": "Game",
"value": "${gamename}",
"inline": true
},
{
"name": "Server Time",
"value": "$(date)",
"inline": true
},
{
"name": "More info",
"value": "${alerturl}",
"inline": true
}
EOF
)
if [ -n "${querytype}" ]; then
json+=$(
cat << EOF
,
{
"name": "Is my Game Server Online?",
"value": "https://ismygameserver.online/${imgsoquerytype}/${alertip}:${queryport}",
"inline": true
}
,
{
"name": "Is my Game Server Online?",
"value": "https://ismygameserver.online/${imgsoquerytype}/${alertip}:${queryport}",
"inline": true
}
EOF
)
fi
if [ -n "${alerturl}" ]; then
json+=$(
cat << EOF
,
{
"name": "More info",
"value": "${alerturl}",
"inline": true
}
EOF
)
fi
json+=$(
cat << EOF
],
"footer": {
"icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg",
"text": "Sent by LinuxGSM ${version}"
}
}
]
],
"footer": {
"icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg",
"text": "Sent by LinuxGSM ${version}"
}
}
]
}
EOF
)

2
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

18
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

11
lgsm/modules/check_deps.sh

@ -9,8 +9,8 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_install_dotnet_repo() {
if [ "${distroid}" == "ubuntu" ]; then
# if package aspnetcore-runtime-7.0 is unavailable in ubuntu repos, add the microsoft repo.
if ! apt-cache show aspnetcore-runtime-7.0 > /dev/null 2>&1; then
# if package dotnet-runtime-7.0 is unavailable in ubuntu repos, add the microsoft repo.
if ! apt-cache show dotnet-runtime-7.0 > /dev/null 2>&1; then
fn_fetch_file "https://packages.microsoft.com/config/ubuntu/${distroversion}/packages-microsoft-prod.deb" "" "" "" "/tmp" "packages-microsoft-prod.deb" "" "" "" ""
sudo dpkg -i /tmp/packages-microsoft-prod.deb
fi
@ -251,12 +251,15 @@ fn_deps_detector() {
if [ "${deptocheck}" == "libsdl2-2.0-0:i386" ] && [ -z "${appid}" ]; then
array_deps_required=("${array_deps_required[@]/libsdl2-2.0-0:i386/}")
steamcmdstatus=1
return
elif [ "${deptocheck}" == "steamcmd" ] && [ -z "${appid}" ]; then
array_deps_required=("${array_deps_required[@]/steamcmd/}")
steamcmdstatus=1
return
elif [ "${deptocheck}" == "steamcmd" ] && [ "${distroid}" == "debian" ] && ! grep -qE '[^deb]+non-free([^-]|$)' /etc/apt/sources.list; then
array_deps_required=("${array_deps_required[@]/steamcmd/}")
steamcmdstatus=1
return
# Java: Added for users using Oracle JRE to bypass check.
elif [[ ${deptocheck} == "openjdk"* ]] || [[ ${deptocheck} == "java"* ]]; then
# Is java already installed?
@ -279,9 +282,9 @@ fn_deps_detector() {
monoinstalled=false
fi
# .NET Core: A .NET Core repo needs to be installed.
elif [ "${deptocheck}" == "aspnetcore-runtime-7.0" ]; then
elif [ "${deptocheck}" == "dotnet-runtime-7.0" ]; then
# .NET is not installed.
if [ -n "${dotnetversion}" ]; then
if dotnet --list-runtimes | grep -q "Microsoft.NETCore.App 7.0"; then
depstatus=0
dotnetinstalled=true
else

62
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
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
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
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

35
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
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
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
lgsm/modules/command_monitor.sh

@ -167,7 +167,7 @@ fn_monitor_check_update_source() {
fn_script_log_info "Checking update: ${selfname} has requested an update and needs to be restarted"
alert="update-request"
alert.sh
command_update.sh
command_restart.sh
core_exit.sh
fi
fi

29
lgsm/modules/command_postdetails.sh

@ -58,18 +58,27 @@ else
fi
fn_print_dots "termbin.com"
link=$(cat "${postdetailslog}" | nc termbin.com 9999 | tr -d '\n\0')
fn_print_ok_nl "termbin.com for 30D"
fn_script_log_pass "termbin.com for 30D"
pdurl="${link}"
link=$(cat "${postdetailslog}" | {
nc -w 3 termbin.com 9999
echo $? > /tmp/nc_exit_status
} | tr -d '\n\0')
nc_exit_status=$(cat /tmp/nc_exit_status)
if [ "${nc_exit_status}" -ne 0 ]; then
fn_print_error_nl "Failed to post to termbin.com"
fn_script_log_error "Failed to post to termbin.com"
else
fn_print_ok_nl "termbin.com for 30D"
fn_script_log_pass "termbin.com for 30D"
pdurl="${link}"
if [ "${firstcommandname}" == "POST-DETAILS" ]; then
echo -e ""
echo -e "Please share the following url for support: "
echo -e "${italic}${pdurl}${default}"
if [ "${firstcommandname}" == "POST-DETAILS" ]; then
echo -e ""
echo -e "Please share the following url for support: "
echo -e "${italic}${pdurl}${default}"
fi
fn_script_log_info "${pdurl}"
alerturl="${pdurl}"
fi
fn_script_log_info "${pdurl}"
alerturl="${pdurl}"
if [ -z "${exitbypass}" ]; then
core_exit.sh

8
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

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
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

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

4
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
}

11
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.

7
lgsm/modules/core_modules.sh

@ -8,7 +8,7 @@
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
modulesversion="v25.1.5"
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() {

2
lgsm/modules/core_steamcmd.sh

@ -164,7 +164,7 @@ fn_update_steamcmd_localbuild() {
}
fn_update_steamcmd_remotebuild() {
# Get remote build info.
# Gets remote build info.
if [ -d "${steamcmddir}" ]; then
cd "${steamcmddir}" || exit
fi

6
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
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)

3
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
}
@ -1658,7 +1659,7 @@ fn_info_messages_tf() {
{
fn_port "header"
fn_port "Game" port udp
fn_port "Query" queryport tcp
fn_port "Query" queryport udp
fn_port "Beacon" beaconport udp
fn_port "Shutdown" shutdownport tcp
} | column -s $'\t' -t

8
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
lgsm/modules/install_ut2k4_key.sh

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

5
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}"
@ -189,7 +189,6 @@ mod_info_spinnertool=(MOD "spinnertool" "Spinner Tool" "https://github.com/dvdvi
mod_info_surfacefrictiontool=(MOD "surfacefrictiontool" "Surface Friction Tool" "https://github.com/dvdvideo1234/surfacefrictiontool/archive/master.zip" "surfacefrictiontool-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/SurfaceFrictionTool" "Controls the surface friction of a prop")
mod_info_magneticdipole=(MOD "magneticdipole" "Magnetic Dipole" "https://github.com/dvdvideo1234/magneticdipole/archive/master.zip" "magneticdipole-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/MagneticDipole" "Magnet entity that runs forces on its poles. Supports wire")
mod_info_environmentorganizer=(MOD "environmentorganizer" "Environment Organizer" "https://github.com/dvdvideo1234/environmentorganizer/archive/master.zip" "environmentorganizer-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/EnvironmentOrganizer" "Installs routines designed for server settings adjustment")
mod_info_precision_alignment=(MOD "precision-alignment" "Precision Alignment" "https://github.com/Mista-Tea/precision-alignment/archive/master.zip" "precision-alignment-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/Mista-Tea/precision-alignment" "Creates precise constraints and aligments")
mod_info_improved_stacker=(MOD "improved-stacker" "Improved Stacker" "https://github.com/Mista-Tea/improved-stacker/archive/master.zip" "improved-stacker-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/Mista-Tea/improved-stacker" "Stacks entities in the direction chosen")
mod_info_improved_weight=(MOD "improved-weight" "Improved Weight" "https://github.com/Mista-Tea/improved-weight/archive/master.zip" "improved-weight-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/Mista-Tea/improved-weight" "Weight tool but with more features")
mod_info_improved_antinoclip=(MOD "improved-antinoclip" "Improved Antinoclip" "https://github.com/Mista-Tea/improved-antinoclip/archive/master.zip" "improved-antinoclip-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/Mista-Tea/improved-antinoclip" "Controls clipping trough an object")

6
lgsm/modules/query_gsquery.py

@ -11,7 +11,7 @@ import socket
import sys
engine_types = ('protocol-valve', 'protocol-quake2', 'protocol-quake3', 'protocol-gamespy1',
'protocol-unreal2', 'ut3', 'minecraft', 'minecraftbe', 'jc2mp', 'mumbleping', 'soldat', 'teeworlds')
'protocol-unreal2', 'ut3', 'minecraft', 'minecraftbe', 'jc2m', 'mumbleping', 'soldat', 'teeworlds')
class gsquery:
@ -23,7 +23,7 @@ class gsquery:
idtech3query = ('protocol-quake3', 'iw3.0', 'ioquake3', 'qfusion')
minecraftquery = ('minecraft', 'lwjgl2')
minecraftbequery = ('minecraftbe')
jc2mpquery = ('jc2mp')
jc2mquery = ('jc2m')
mumblequery = ('mumbleping')
soldatquery = ('soldat')
twquery = ('teeworlds')
@ -40,7 +40,7 @@ class gsquery:
self.query_prompt_string = b'\xff\xff\xff\xffstatus\x00'
elif self.argument.engine in self.idtech3query:
self.query_prompt_string = b'\xff\xff\xff\xffgetstatus'
elif self.argument.engine in self.jc2mpquery:
elif self.argument.engine in self.jc2mquery:
self.query_prompt_string = b'\xFE\xFD\x09\x10\x20\x30\x40'
elif self.argument.engine in self.minecraftquery:
self.query_prompt_string = b'\xFE\xFD\x09\x3d\x54\x1f\x93'

2
lgsm/modules/update_fctr.sh

@ -34,7 +34,7 @@ fn_update_localbuild() {
}
fn_update_remotebuild() {
# Get remote build info.
# Gets remote build info.
apiurl="https://factorio.com/get-download/${branch}/headless/${factorioarch}"
remotebuildresponse=$(curl -s "${apiurl}")
remotebuildversion=$(echo "${remotebuildresponse}" | grep -o '[0-9]\.[0-9]\{1,\}\.[0-9]\{1,\}' | head -1)

2
lgsm/modules/update_jk2.sh

@ -31,7 +31,7 @@ fn_update_localbuild() {
}
fn_update_remotebuild() {
# Get remote build info.
# Gets remote build info.
apiurl="https://api.github.com/repos/mvdevs/jk2mv/releases/latest"
remotebuildresponse=$(curl -s "${apiurl}")
remotebuildfilename=$(echo "${remotebuildresponse}" | jq -r '.assets[]|select(.browser_download_url | contains("dedicated.zip")) | .name')

2
lgsm/modules/update_mc.sh

@ -34,7 +34,7 @@ fn_update_localbuild() {
}
fn_update_remotebuild() {
# Get remote build info.
# Gets remote build info.
apiurl="https://launchermeta.mojang.com/mc/game/version_manifest.json"
remotebuildresponse=$(curl -s "${apiurl}")
# Latest release.

19
lgsm/modules/update_mcb.sh

@ -38,7 +38,7 @@ fn_update_localbuild() {
# Gets local build info.
fn_print_dots "Checking local build: ${remotelocation}"
# Uses log file to get local build.
localbuild=$(grep Version "${consolelogdir}"/* 2> /dev/null | tail -1 | sed 's/.*Version: //' | tr -d '\000-\011\013-\037')
localbuild=$(grep -hoP 'Version:\s*\K[\d.]+' "${consolelogdir}"/* 2> /dev/null | sort -V -r | head -n1)
if [ -z "${localbuild}" ]; then
fn_print_error "Checking local build: ${remotelocation}: missing local build info"
fn_script_log_error "Missing local build info"
@ -51,15 +51,18 @@ fn_update_localbuild() {
}
fn_update_remotebuild() {
# Random number for userAgent
randomint=$(tr -dc 0-9 < /dev/urandom 2> /dev/null | head -c 4 | xargs)
# Get remote build info.
if [ "${mcversion}" == "latest" ]; then
remotebuildversion=$(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.${randomint}.212 Safari/537.36" "https://www.minecraft.net/en-us/download/server/bedrock/" | grep -o 'https://www.minecraft.net/bedrockdedicatedserver/bin-linux/[^"]*' | sed 's/.*\///' | grep -Eo "[.0-9]+[0-9]")
# Gets remote build info.
apiurl="https://net-secondary.web.minecraft-services.net/api/v1.0/download/links"
remotebuildresponse=$(curl -s "${apiurl}" | jq '.result.links[]')
# Latest preview.
if [ "${mcversion}" == "preview" ]; then
remotebuildurl=$(echo "${remotebuildresponse}" | jq -r 'select(.downloadType == "serverBedrockPreviewLinux") | .downloadUrl')
# Latest release.
else
remotebuildversion="${mcversion}"
remotebuildurl=$(echo "${remotebuildresponse}" | jq -r 'select(.downloadType == "serverBedrockLinux") | .downloadUrl')
fi
remotebuildurl="https://www.minecraft.net/bedrockdedicatedserver/bin-linux/bedrock-server-${remotebuildversion}.zip"
remotebuildversion=$(echo "${remotebuildurl}" | grep -Eo "[.0-9]+[0-9]")
remotebuildfilename="bedrock-server-${remotebuildversion}.zip"
if [ "${firstcommandname}" != "INSTALL" ]; then
fn_print_dots "Checking remote build: ${remotelocation}"

2
lgsm/modules/update_mta.sh

@ -34,7 +34,7 @@ fn_update_localbuild() {
}
fn_update_remotebuild() {
# Get remote build info.
# Gets remote build info.
apiurl="https://linux.multitheftauto.com/revision/latest.txt"
remotebuildresponse=$(curl -s "${apiurl}")
remotebuildfilename="multitheftauto_linux_x64.tar.gz"

2
lgsm/modules/update_pmc.sh

@ -32,7 +32,7 @@ fn_update_localbuild() {
}
fn_update_remotebuild() {
# Get remote build info.
# Gets remote build info.
apiurl="https://api.papermc.io/v2/projects"
# Get list of projects.
remotebuildresponse=$(curl -s "${apiurl}")

2
lgsm/modules/update_ts3.sh

@ -31,7 +31,7 @@ fn_update_localbuild() {
}
fn_update_remotebuild() {
# Get remote build info.
# Gets remote build info.
apiurl="https://www.teamspeak.com/versions/server.json"
remotebuildresponse=$(curl -s "${apiurl}")

2
lgsm/modules/update_ut99.sh

@ -32,7 +32,7 @@ fn_update_localbuild() {
}
fn_update_remotebuild() {
# Get remote build info.
# Gets remote build info.
apiurl="https://api.github.com/repos/OldUnreal/UnrealTournamentPatches/releases/latest"
remotebuildresponse=$(curl -s "${apiurl}")
remotebuildfilename=$(echo "${remotebuildresponse}" | jq -r '.assets[]|select(.browser_download_url | contains("Linux-amd64")) | .name')

6
lgsm/modules/update_vints.sh

@ -34,13 +34,15 @@ fn_update_localbuild() {
}
fn_update_remotebuild() {
# Get remote build info.
# Gets remote build info.
apiurl="http://api.vintagestory.at/stable-unstable.json"
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')

23
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')
@ -36,7 +47,7 @@ fn_update_localbuild() {
}
fn_update_remotebuild() {
# Get remote build info.
# Gets remote build info.
apiurl="https://api.github.com/repos/xonotic/xonotic/tags"
remotebuildresponse=$(curl -s "${apiurl}")
remotebuildtag=$(echo "${remotebuildresponse}" | jq -r '.[0].name')

5
linuxgsm.sh

@ -24,7 +24,7 @@ if [ -f ".dev-debug" ]; then
set -x
fi
version="v25.1.5"
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"

Loading…
Cancel
Save