Browse Source

Merge branch 'develop' into patch-1

pull/4882/head
Daniel Gibbs 2 months ago
committed by GitHub
parent
commit
5fb9817935
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 56
      .devcontainer/devcontainer.json
  2. 17
      .editorconfig
  3. 11
      .github/linters/.codespellrc
  4. 2
      .github/linters/.flake8
  5. 23
      .github/linters/.markdown-lint.yml
  6. 1
      .github/linters/.shellcheckrc
  7. 25
      .github/linters/.yaml-lint.yml
  8. 30
      .github/pull_request_template.md
  9. 2
      .github/workflows/action-prettier.yml
  10. 14
      .github/workflows/action-super-linter.yml
  11. 2
      .github/workflows/action-update-copyright-years-in-license-file.yml
  12. 2
      .github/workflows/add-to-project.yml
  13. 10
      .github/workflows/details-check-generate-matrix.sh
  14. 7
      .github/workflows/details-check.yml
  15. 2
      .github/workflows/git-sync.yml
  16. 4
      .github/workflows/potential-duplicates.yml
  17. 12
      .github/workflows/serverlist-validate-game-icons.sh
  18. 9
      .github/workflows/serverlist-validate.sh
  19. 3
      .github/workflows/serverlist-validate.yml
  20. 2
      .github/workflows/trigger-docker-build.yml
  21. 4
      .github/workflows/update-check.yml
  22. 4
      .github/workflows/update-copyright-years-in-license-file.yml
  23. 0
      .github/workflows/version-check.sh
  24. 3
      .prettierignore
  25. 2
      .prettierrc
  26. 2
      .prettierrc.json
  27. 2
      .shellcheckrc
  28. 20
      .vscode/extensions.json
  29. 30
      CODE_OF_CONDUCT.md
  30. 133
      CONTRIBUTING.md
  31. 2
      LICENSE.md
  32. 32
      README.md
  33. 2
      lgsm/config-default/config-lgsm/armarserver/_default.cfg
  34. 2
      lgsm/config-default/config-lgsm/necserver/_default.cfg
  35. 2
      lgsm/config-default/config-lgsm/ns2cserver/_default.cfg
  36. 2
      lgsm/config-default/config-lgsm/ns2server/_default.cfg
  37. 2
      lgsm/config-default/config-lgsm/pwserver/_default.cfg
  38. 2
      lgsm/data/debian-13.csv
  39. 2
      lgsm/data/name-left.csv
  40. 2
      lgsm/data/name-right.csv
  41. 18
      lgsm/modules/README.md
  42. 61
      lgsm/modules/alert.sh
  43. 21
      lgsm/modules/alert_discord.sh
  44. 0
      lgsm/modules/alert_email.sh
  45. 2
      lgsm/modules/alert_gotify.sh
  46. 2
      lgsm/modules/alert_ifttt.sh
  47. 26
      lgsm/modules/alert_ntfy.sh
  48. 2
      lgsm/modules/alert_pushbullet.sh
  49. 4
      lgsm/modules/alert_pushover.sh
  50. 66
      lgsm/modules/alert_rocketchat.sh
  51. 96
      lgsm/modules/alert_slack.sh
  52. 10
      lgsm/modules/alert_telegram.sh
  53. 0
      lgsm/modules/check.sh
  54. 0
      lgsm/modules/check_config.sh
  55. 6
      lgsm/modules/check_deps.sh
  56. 0
      lgsm/modules/check_executable.sh
  57. 0
      lgsm/modules/check_gamedig.sh
  58. 2
      lgsm/modules/check_glibc.sh
  59. 0
      lgsm/modules/check_ip.sh
  60. 1
      lgsm/modules/check_last_update.sh
  61. 0
      lgsm/modules/check_logs.sh
  62. 2
      lgsm/modules/check_permissions.sh
  63. 0
      lgsm/modules/check_root.sh
  64. 0
      lgsm/modules/check_status.sh
  65. 0
      lgsm/modules/check_steamcmd.sh
  66. 0
      lgsm/modules/check_system_dir.sh
  67. 2
      lgsm/modules/check_system_requirements.sh
  68. 0
      lgsm/modules/check_tmuxception.sh
  69. 0
      lgsm/modules/check_version.sh
  70. 0
      lgsm/modules/command_backup.sh
  71. 0
      lgsm/modules/command_check_update.sh
  72. 0
      lgsm/modules/command_console.sh
  73. 2
      lgsm/modules/command_debug.sh
  74. 2
      lgsm/modules/command_details.sh
  75. 0
      lgsm/modules/command_dev_clear_modules.sh
  76. 0
      lgsm/modules/command_dev_debug.sh
  77. 0
      lgsm/modules/command_dev_detect_deps.sh
  78. 2
      lgsm/modules/command_dev_detect_glibc.sh
  79. 0
      lgsm/modules/command_dev_detect_ldd.sh
  80. 0
      lgsm/modules/command_dev_parse_distro_details.sh
  81. 0
      lgsm/modules/command_dev_parse_game_details.sh
  82. 8
      lgsm/modules/command_dev_query_raw.sh
  83. 0
      lgsm/modules/command_dev_ui.sh
  84. 2
      lgsm/modules/command_fastdl.sh
  85. 0
      lgsm/modules/command_install.sh
  86. 0
      lgsm/modules/command_install_resources_mta.sh
  87. 23
      lgsm/modules/command_mods_install.sh
  88. 21
      lgsm/modules/command_mods_remove.sh
  89. 0
      lgsm/modules/command_mods_update.sh
  90. 4
      lgsm/modules/command_monitor.sh
  91. 4
      lgsm/modules/command_postdetails.sh
  92. 0
      lgsm/modules/command_restart.sh
  93. 0
      lgsm/modules/command_send.sh
  94. 4
      lgsm/modules/command_skeleton.sh
  95. 0
      lgsm/modules/command_start.sh
  96. 4
      lgsm/modules/command_stop.sh
  97. 0
      lgsm/modules/command_test_alert.sh
  98. 0
      lgsm/modules/command_ts3_server_pass.sh
  99. 0
      lgsm/modules/command_update.sh
  100. 39
      lgsm/modules/command_update_linuxgsm.sh

56
.devcontainer/devcontainer.json

@ -1,30 +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"
"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

@ -12,6 +12,21 @@ insert_final_newline = true
trim_trailing_whitespace = true
# BASH Files
[*.{.sh}]
[*.sh]
indent_size = 4
indent_style = tab
# JSON Files (Biome formatting)
[*.json]
indent_style = tab
indent_size = 2
# Steam appmanifest files (Valve ACF format)
[*.acf]
indent_style = tab
indent_size = 4
# Python
[*.py]
indent_style = space
indent_size = 4

11
.github/linters/.codespellrc

@ -0,0 +1,11 @@
[codespell]
# Skip data tables that contain many short server identifiers (e.g. "fof", "nd")
skip =
lgsm/data/*.csv,
package-lock.json,
*/package-lock.json,
node_modules,
*/node_modules/*
# Ignore common identifiers/acronyms and extensions used throughout LinuxGSM
ignore-words-list = distroname,fof,nd,sav,parms,ThirdParty

2
.github/linters/.flake8

@ -0,0 +1,2 @@
[flake8]
max-line-length = 120

23
.github/linters/.markdown-lint.yml

@ -0,0 +1,23 @@
# Configuration for markdownlint (used by Super Linter)
# MD041: README starts with HTML badges in this repo.
MD041: false
# MD051: GitHub heading anchor generation can differ (emoji, punctuation).
MD051: false
# MD013: The project documentation frequently contains long URLs/commands.
MD013: false
# MD033: The main README uses inline HTML for badges.
MD033: false
# Match existing list formatting in this repo.
MD007:
indent: 4
MD030:
ul_single: 3
ol_single: 2
ul_multi: 3
ol_multi: 2

1
.github/linters/.shellcheckrc

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

25
.github/linters/.yaml-lint.yml

@ -0,0 +1,25 @@
extends: default
rules:
document-start: disable
truthy: disable
line-length:
max: 200
level: warning
allow-non-breakable-words: true
allow-non-breakable-inline-mappings: true
braces:
min-spaces-inside: 0
max-spaces-inside: 1
min-spaces-inside-empty: 0
max-spaces-inside-empty: 0
empty-lines:
max: 2
max-start: 0
max-end: 0
comments:
min-spaces-from-content: 1

30
.github/pull_request_template.md

@ -6,30 +6,30 @@ Fixes #[issue]
## Type of change
- [ ] Bug fix (a change which fixes an issue).
- [ ] New feature (a change which adds functionality).
- [ ] New Server (new server added).
- [ ] Refactor (restructures existing code).
- [ ] Comment update (typo, spelling, explanation, examples, etc).
- [ ] Bug fix (a change which fixes an issue).
- [ ] New feature (a change which adds functionality).
- [ ] New Server (new server added).
- [ ] Refactor (restructures existing code).
- [ ] Comment update (typo, spelling, explanation, examples, etc).
## Checklist
PR will not be merged until all steps are complete.
- [ ] This pull request links to an issue.
- [ ] This pull request uses the `develop` branch as its base.
- [ ] This pull request subject follows the Conventional Commits standard.
- [ ] This code follows the style guidelines of this project.
- [ ] I have performed a self-review of my code.
- [ ] I have checked that this code is commented where required.
- [ ] I have provided a detailed enough description of this PR.
- [ ] I have checked if documentation needs updating.
- [ ] This pull request links to an issue.
- [ ] This pull request uses the `develop` branch as its base.
- [ ] This pull request subject follows the Conventional Commits standard.
- [ ] This code follows the style guidelines of this project.
- [ ] I have performed a self-review of my code.
- [ ] I have checked that this code is commented where required.
- [ ] I have provided a detailed enough description of this PR.
- [ ] I have checked if documentation needs updating.
## Documentation
If documentation does need updating either update it by creating a PR (preferred) or request a documentation update.
- User docs: https://github.com/GameServerManagers/LinuxGSM-Docs
- Dev docs: https://github.com/GameServerManagers/LinuxGSM-Dev-Docs
- User docs: <https://github.com/GameServerManagers/LinuxGSM-Docs>
- Dev docs: <https://github.com/GameServerManagers/LinuxGSM-Dev-Docs>
**Thank you for your Pull Request!**

2
.github/workflows/action-prettier.yml

@ -19,7 +19,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
persist-credentials: false

14
.github/workflows/action-super-linter.yml

@ -25,11 +25,12 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
# super-linter needs the full git history to get the
# list of files that changed across commits
fetch-depth: 0
# Shallow clone reduces transient fetch failures (HTTP 500) from GitHub.
# We lint the whole codebase instead of relying on git history.
fetch-depth: 1
fetch-tags: false
persist-credentials: false
- name: Install Prettier plugins (for summary formatting)
@ -41,11 +42,14 @@ jobs:
env:
# To report GitHub Actions status checks
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_BIOME_FORMAT: false
VALIDATE_BIOME_LINT: false
VALIDATE_GITHUB_ACTIONS_ZIZMOR: false
VALIDATE_JSCPD: false
VALIDATE_JSON_PRETTIER: false
VALIDATE_MARKDOWN_PRETTIER: false
VALIDATE_NATURAL_LANGUAGE: false
VALIDATE_PYTHON_RUFF_FORMAT: false
VALIDATE_SHELL_SHFMT: false
VALIDATE_TERRAFORM_TERRASCAN: false
VALIDATE_TRIVY: false
VALIDATE_YAML_PRETTIER: false

2
.github/workflows/action-update-copyright-years-in-license-file.yml

@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false

2
.github/workflows/add-to-project.yml

@ -5,6 +5,8 @@ on:
- opened
- labeled
permissions: {}
jobs:
add-to-project:
if: github.repository_owner == 'GameServerManagers'

10
.github/workflows/details-check-generate-matrix.sh

@ -14,10 +14,12 @@ while read -r line; do
export gamename
distro=$(echo "$line" | awk -F, '{ print $4 }')
export distro
echo -n "{" >> "shortnamearray.json"
echo -n "\"shortname\":" >> "shortnamearray.json"
echo -n "\"${shortname}\"" >> "shortnamearray.json"
echo -n "}," >> "shortnamearray.json"
{
echo -n "{";
echo -n "\"shortname\":";
echo -n "\"${shortname}\"";
echo -n "},";
} >> "shortnamearray.json"
done < <(tail -n +2 serverlist.csv)
sed -i '$ s/.$//' "shortnamearray.json"
echo -n "]" >> "shortnamearray.json"

7
.github/workflows/details-check.yml

@ -6,6 +6,9 @@ on:
branches:
- develop
permissions:
contents: read
concurrency:
group: details-check-${{ github.ref_name }}
cancel-in-progress: true
@ -28,7 +31,7 @@ jobs:
run: |
shortnamearray=$(cat shortnamearray.json)
echo "${shortnamearray}"
echo -n "matrix=${shortnamearray}" >> $GITHUB_OUTPUT
echo -n "matrix=${shortnamearray}" >> "$GITHUB_OUTPUT"
details-check:
if: github.repository_owner == 'GameServerManagers'
@ -41,7 +44,7 @@ jobs:
steps:
- name: Download linuxgsm.sh
run: wget https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/${GITHUB_REF#refs/heads/}/linuxgsm.sh; chmod +x linuxgsm.sh
run: wget "https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/${GITHUB_REF#refs/heads/}/linuxgsm.sh"; chmod +x linuxgsm.sh
- name: Install dependencies
run: sudo apt-get install libxml2-utils jq

2
.github/workflows/git-sync.yml

@ -7,6 +7,8 @@ on:
- master
- develop
permissions: {}
jobs:
gitHub-to-bitbucket:
if: github.repository_owner == 'GameServerManagers'

4
.github/workflows/potential-duplicates.yml

@ -3,6 +3,10 @@ on:
issues:
types:
- opened
permissions:
issues: write
jobs:
potential-duplicates:
if: github.repository_owner == 'GameServerManagers'

12
.github/workflows/serverlist-validate-game-icons.sh

@ -2,6 +2,8 @@
cd "${datadir}" || exit
exitcode=0
echo ""
echo "Checking that all the game servers listed in serverlist.csv have a shortname-icon.png file"
for shortname in $(tail -n +2 serverlist.csv | cut -d ',' -f1); do
@ -16,9 +18,11 @@ done
echo ""
echo "Checking if an unexpected gameicon exists"
for gameicon in $(ls -1 gameicons); do
shopt -s nullglob
for gameiconpath in gameicons/*; do
gameicon="$(basename "${gameiconpath}")"
# check if $gameicon is in serverlist.csv
if ! grep -q "${gameicon%-icon.png}" serverlist.csv; then
if ! grep -q -F "${gameicon%-icon.png}" serverlist.csv; then
echo "ERROR: gameicon ${gameicon} is not in serverlist.csv"
exitcode=1
else
@ -28,7 +32,7 @@ done
echo ""
echo "Checking that the number of gameicons matches the number of servers in serverlist.csv"
gameiconcount="$(ls -1 gameicons | wc -l)"
gameiconcount="$(find gameicons -mindepth 1 -maxdepth 1 -type f | wc -l)"
serverlistcount="$(tail -n +2 serverlist.csv | wc -l)"
if [ "${gameiconcount}" -ne "${serverlistcount}" ]; then
echo "ERROR: game icons (${gameiconcount}) does not match serverlist.csv ($serverlistcount)"
@ -37,4 +41,4 @@ else
echo "OK: gameiconcount ($gameiconcount) matches serverlistcount ($serverlistcount)"
fi
exit ${exitcode}
exit "${exitcode}"

9
.github/workflows/serverlist-validate.sh

@ -3,12 +3,15 @@ echo "Checking that all the game servers are listed in all csv files"
echo "this check will ensure serverlist.csv has the same number of lines (-2 lines) as the other csv files"
# count the number of lines in the serverlist.csv
cd "${datadir}" || exit
exitcode=0
serverlistcount="$(tail -n +2 serverlist.csv | wc -l)"
echo "serverlistcount: $serverlistcount"
# get list of all csv files starting with ubunutu debian centos
csvlist="$(ls -1 | grep -E '^(ubuntu|debian|centos|rhel|almalinux|rocky).*\.csv$')"
shopt -s nullglob
csvlist=(ubuntu*.csv debian*.csv centos*.csv rhel*.csv almalinux*.csv rocky*.csv)
# loop though each csv file and make sure the number of lines is the same as the serverlistcount
for csv in $csvlist; do
for csv in "${csvlist[@]}"; do
csvcount="$(wc -l < "${csv}")"
csvcount=$((csvcount - 2))
if [ "$csvcount" -ne "$serverlistcount" ]; then
@ -35,4 +38,4 @@ for shortname in $(tail -n +2 serverlist.csv | cut -d ',' -f1); do
fi
done
exit ${exitcode}
exit "${exitcode}"

3
.github/workflows/serverlist-validate.yml

@ -3,6 +3,9 @@ on:
workflow_dispatch:
push:
permissions:
contents: read
jobs:
serverlist-validate:
if: github.repository_owner == 'GameServerManagers'

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

@ -6,6 +6,8 @@ on:
types:
- published
permissions: {}
jobs:
trigger_build_docker-linuxgsm:
if: github.repository_owner == 'GameServerManagers'

4
.github/workflows/update-check.yml

@ -6,6 +6,8 @@ on:
branches:
- develop
permissions: {}
concurrency:
group: update-check-${{ github.ref_name }}
cancel-in-progress: true
@ -22,7 +24,7 @@ jobs:
steps:
- name: Download linuxgsm.sh
run: wget https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/${GITHUB_REF#refs/heads/}/linuxgsm.sh; chmod +x linuxgsm.sh
run: wget "https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/${GITHUB_REF#refs/heads/}/linuxgsm.sh"; chmod +x linuxgsm.sh
- name: Install dependencies
run: sudo dpkg --add-architecture i386; sudo apt-get update;

4
.github/workflows/update-copyright-years-in-license-file.yml

@ -4,6 +4,10 @@ on:
schedule:
- cron: "0 3 1 1 *" # 03:00 AM on January 1
permissions:
contents: write
pull-requests: write
jobs:
update-license-year:
if: github.repository_owner == 'GameServerManagers'

0
.github/workflows/version-check.sh

3
.prettierignore

@ -0,0 +1,3 @@
# Prettier auto-commit runs with GITHUB_TOKEN (GitHub App).
# GitHub blocks that token from creating/updating anything under .github/workflows.
.github/workflows/**

2
.prettierrc

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

2
.prettierrc.json

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

2
.shellcheckrc

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

20
.vscode/extensions.json

@ -1,12 +1,12 @@
{
"recommendations": [
"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"
]
"recommendations": [
"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"
]
}

30
CODE_OF_CONDUCT.md

@ -17,24 +17,24 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our
community include:
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- Focusing on what is best not just for us as individuals, but for the
overall community
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities

133
CONTRIBUTING.md

@ -8,31 +8,31 @@ The following is a set of guidelines for contributing to LinuxGSM, which are hos
[Contributing to LinuxGSM](#contributing-to-linuxgsm)
- [Table of Contents](#table-of-contents)
- [Code of Conduct](#code-of-conduct)
- [🎉 Bug/Enhancement Contributions 🐛](#bug-enhancement-contributions)
- [🐛Reporting Bugs](#reporting-bugs)
- [Before Submitting A Bug Report](#before-submitting-a-bug-report)
- [How Do I Submit A (Good) Bug Report?](#how-do-i-submit-a--good--bug-report-)
- [🎉Suggesting Features](#suggesting-features)
- [Before Submitting An Feature Suggestion](#before-submitting-an-feature-suggestion)
- [How Do I Submit A (Good) Feature Suggestion?](#how-do-i-submit-a--good--feature-suggestion-)
- [🎮 Game Server Requests](#game-server-requests)
- [Before Submitting a Game Server Request](#before-submitting-a-game-server-request)
- [How Do I Submit A (Good) Game Server Request?](#how-do-i-submit-a--good--game-server-request-)
- [🎮 Game Server Specific Issues](#game-server-specific-issues)
- [💻 Code Contributions](#code-contributions)
- [Pull Requests](#pull-requests)
- [Pull Request naming convention](#pull-request-naming-convention)
- [Testing](#testing)
- [Pull Request Status Checks](#pull-request-status-checks)
- [Test Environment](#test-environment)
- [:wine_glass: Styleguides](#-wine-glass--styleguides)
- [Git Commit Messages](#git-commit-messages)
- [BASH Styleguide](#bash-styleguide)
- [:blue_book: Document Contributions](#-blue-book--document-contributions)
- [Documentation Styleguide](#documentation-styleguide)
- [Issue and Pull Request Labels](#issue-and-pull-request-labels)
- [Table of Contents](#table-of-contents)
- [Code of Conduct](#code-of-conduct)
- [🎉 Bug/Enhancement Contributions 🐛](#bug-enhancement-contributions)
- [🐛Reporting Bugs](#reporting-bugs)
- [Before Submitting A Bug Report](#before-submitting-a-bug-report)
- [How Do I Submit A (Good) Bug Report?](#how-do-i-submit-a--good--bug-report-)
- [🎉Suggesting Features](#suggesting-features)
- [Before Submitting An Feature Suggestion](#before-submitting-an-feature-suggestion)
- [How Do I Submit A (Good) Feature Suggestion?](#how-do-i-submit-a--good--feature-suggestion-)
- [🎮 Game Server Requests](#game-server-requests)
- [Before Submitting a Game Server Request](#before-submitting-a-game-server-request)
- [How Do I Submit A (Good) Game Server Request?](#how-do-i-submit-a--good--game-server-request-)
- [🎮 Game Server Specific Issues](#game-server-specific-issues)
- [💻 Code Contributions](#code-contributions)
- [Pull Requests](#pull-requests)
- [Pull Request naming convention](#pull-request-naming-convention)
- [Testing](#testing)
- [Pull Request Status Checks](#pull-request-status-checks)
- [Test Environment](#test-environment)
- [:wine_glass: Styleguides](#-wine-glass--styleguides)
- [Git Commit Messages](#git-commit-messages)
- [BASH Styleguide](#bash-styleguide)
- [:blue_book: Document Contributions](#-blue-book--document-contributions)
- [Documentation Styleguide](#documentation-styleguide)
- [Issue and Pull Request Labels](#issue-and-pull-request-labels)
## Code of Conduct
@ -48,20 +48,20 @@ Before creating bug reports, please check [this list](https://github.com/GameSer
#### Before Submitting A Bug Report
- **Check the [documentation](https://docs.linuxgsm.com).** You might be able to find the cause of the problem and fix things yourself.
- **Check the** [**support page**](https://linuxgsm.com/support) for links to other support options.
- **Perform a** [**cursory search**](https://github.com/search?q=org:GameServerManagers%20type:issues&type=Issues) to see if the problem has already been reported. If it has **and the issue is still open**, add a comment to the existing issue and give it a thumbs up instead of opening a new one.
- **Check the [documentation](https://docs.linuxgsm.com).** You might be able to find the cause of the problem and fix things yourself.
- **Check the** [**support page**](https://linuxgsm.com/support) for links to other support options.
- **Perform a** [**cursory search**](https://github.com/search?q=org:GameServerManagers%20type:issues&type=Issues) to see if the problem has already been reported. If it has **and the issue is still open**, add a comment to the existing issue and give it a thumbs up instead of opening a new one.
#### How Do I Submit A (Good) Bug Report?
Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/). Create an issue and provide the following information by filling in [the issues form](https://github.com/GameServerManagers/LinuxGSM/issues/new/choose).
- **Use a clear and descriptive title** for the issue to identify the problem.
- **Complete the user story** to give a summary of the issue.
- **Provide basic info** to help us understand the context of the issue.
- **Provide further info** to give specifics and more detail.
- **Give steps to reproduce** the issue, allowing developers to follow steps that lead to the issue.
- **Explain what you expect** to happen, so we know what you think should occur.
- **Use a clear and descriptive title** for the issue to identify the problem.
- **Complete the user story** to give a summary of the issue.
- **Provide basic info** to help us understand the context of the issue.
- **Provide further info** to give specifics and more detail.
- **Give steps to reproduce** the issue, allowing developers to follow steps that lead to the issue.
- **Explain what you expect** to happen, so we know what you think should occur.
### 🎉Suggesting Features
@ -69,19 +69,19 @@ This section guides you through submitting a feature suggestion for LinuxGSM, in
#### Before Submitting An Feature Suggestion
- **Check the** [**documentation**](<https://docs.linuxgsm.com/%5D(https://docs.linuxgsm.com/)>) to confirm that the enhancement doesn’t already exist.
- **Check your** [**LinuxGSM version**](https://docs.linuxgsm.com/commands/update-lgsm)**.** A newer version of LinuxGSM may already have your enhancement.
- **Perform a** [**cursory search**](https://github.com/search?q=org:GameServerManagers%20type:issues&type=Issues) to see if the enhancement has already been suggested. If it has **and the enhancement is still open**, add a comment to the existing issue and give it a thumbs up instead of opening a new one.
- **Check the** [**documentation**](<https://docs.linuxgsm.com/%5D(https://docs.linuxgsm.com/)>) to confirm that the enhancement doesn’t already exist.
- **Check your** [**LinuxGSM version**](https://docs.linuxgsm.com/commands/update-lgsm)**.** A newer version of LinuxGSM may already have your enhancement.
- **Perform a** [**cursory search**](https://github.com/search?q=org:GameServerManagers%20type:issues&type=Issues) to see if the enhancement has already been suggested. If it has **and the enhancement is still open**, add a comment to the existing issue and give it a thumbs up instead of opening a new one.
#### How Do I Submit A (Good) Feature Suggestion?
Features are tracked as [GitHub issues](https://guides.github.com/features/issues/). Create an issue and provide the following information by filling in [the issues form](https://github.com/GameServerManagers/LinuxGSM/issues/new/choose).
- **Use a clear and descriptive title** for the issue to identify the problem.
- **Complete the user story** to give a summary of the issue.
- **Provide basic info** to help us understand the context of the enhancement.
- **Provide further info** to give specifics and more detail.
- **Provide any further reading** materials that might assist in developing the enhancement.
- **Use a clear and descriptive title** for the issue to identify the problem.
- **Complete the user story** to give a summary of the issue.
- **Provide basic info** to help us understand the context of the enhancement.
- **Provide further info** to give specifics and more detail.
- **Provide any further reading** materials that might assist in developing the enhancement.
### 🎮 Game Server Requests
@ -89,14 +89,14 @@ This section guides you through submitting a game server request for LinuxGSM, F
#### Before Submitting a Game Server Request
- **Check for existing** [**game server requests**](https://github.com/GameServerManagers/LinuxGSM/labels/type%3A%20game%20server%20request) to see if the new game server has already been suggested. If it has **and if the new game server is still open**, give it a thumbs up.
- **Check the game server is supported on Linux**, this does not include Wine servers which we do not support.
- **Check for existing** [**game server requests**](https://github.com/GameServerManagers/LinuxGSM/labels/type%3A%20game%20server%20request) to see if the new game server has already been suggested. If it has **and if the new game server is still open**, give it a thumbs up.
- **Check the game server is supported on Linux**, this does not include Wine servers which we do not support.
#### How Do I Submit A (Good) Game Server Request?
- The title should be as follows: **[Server Request] Game Name**
- **Provide Steam App ID** if applicable
- **Supply any documentation/how-to guides** for the game server.
- The title should be as follows: **[Server Request] Game Name**
- **Provide Steam App ID** if applicable
- **Supply any documentation/how-to guides** for the game server.
### 🎮 Game Server Specific Issues
@ -114,10 +114,10 @@ A [list](https://docs.linuxgsm.com/support/game-server) of known game developer
The process described here has several goals:
- Maintain LinuxGSM quality.
- Fix problems that are important to users.
- Engage the community in working toward the best possible LinuxGSM.
- Enable a sustainable system for LinuxGSM maintainers to review contributions.
- Maintain LinuxGSM quality.
- Fix problems that are important to users.
- Engage the community in working toward the best possible LinuxGSM.
- Enable a sustainable system for LinuxGSM maintainers to review contributions.
Please follow these steps to have your contribution considered by the maintainers:
@ -139,24 +139,23 @@ If applied, this commit will _your subject line here_
For example:
- If applied, this commit will **refactor subsystem X for readability**
- If applied, this commit will **update getting started documentation**
- If applied, this commit will **remove deprecated methods**
- If applied, this commit will **release version 1.0.0**
- If applied, this commit will **merge pull request #123 from user/branch**
- If applied, this commit will **refactor subsystem X for readability**
- If applied, this commit will **update getting started documentation**
- If applied, this commit will **remove deprecated methods**
- If applied, this commit will **release version 1.0.0**
- If applied, this commit will **merge pull request #123 from user/branch**
Notice how this doesn’t work for the other non-imperative forms:
- If applied, this commit will **fixed bug with Y**
- If applied, this commit will **change the behaviour of X**
- If applied, this commit will **more fixes for broken stuff**
- If applied, this commit will **sweet new API methods**
- If applied, this commit will **fixed bug with Y**
- If applied, this commit will **change the behaviour of X**
- If applied, this commit will **more fixes for broken stuff**
- If applied, this commit will **sweet new API methods**
Below is an example of the subject line for a pull request:
**feat(alerts): add slack support to alerts**
**fix(csgoserver): remove SteamCMD auth requirement 32-bit workaround**
- feat(alerts): add slack support to alerts
- fix(csgoserver): remove SteamCMD auth requirement 32-bit workaround
### Testing
@ -211,10 +210,10 @@ Labels to help pinpoint what the issue or PR relates to.
variants:
- _distro_
- _engine_
- _game_
- _info_
- _distro_
- _engine_
- _game_
- _info_
**outcome** Labels
Labels that identify why an issue was closed.

2
LICENSE.md

@ -1,6 +1,6 @@
# The MIT License (MIT)
Copyright (c) 2012-2025 Daniel Gibbs
Copyright (c) 2012-2026 Daniel Gibbs
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

32
README.md

@ -1,10 +1,10 @@
<p align="center">
<a href="https://linuxgsm.com"><img src="https://i.imgur.com/Eoh1jsi.jpg" alt="LinuxGSM">
<a href="https://www.codacy.com/gh/GameServerManagers/LinuxGSM/dashboard"><img src="https://img.shields.io/codacy/grade/d19c5234dc3743d8a8a14093711ca52d?style=flat-square&logo=codacy&logoColor=white" alt="Codacy grade"></a>
<a href="https://bitbucket.org/GameServerManagers/linuxgsm"><img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/GameServerManagers/LinuxGSM/git-sync.yml?color=0052CC&logo=bitbucket&style=flat-square"></a>
<a href="https://linuxgsm.com/discord"><img alt="Discord" src="https://img.shields.io/discord/127498813903601664?color=5865F2&label=%20&logo=discord&logoColor=ffffff&style=flat-square"></a>
<a href="https://developer.valvesoftware.com/wiki/SteamCMD"><img src="https://img.shields.io/badge/SteamCMD-000000?style=flat-square&amp;logo=Steam&amp;logoColor=white" alt="SteamCMD"></a>
<a href="https://github.com/GameServerManagers/LinuxGSM/blob/master/LICENSE.md"><img src="https://img.shields.io/github/license/gameservermanagers/LinuxGSM?style=flat-square" alt="MIT License"></a>
<a href="https://linuxgsm.com"><img src="https://i.imgur.com/Eoh1jsi.jpg" alt="LinuxGSM">
<a href="https://www.codacy.com/gh/GameServerManagers/LinuxGSM/dashboard"><img src="https://img.shields.io/codacy/grade/d19c5234dc3743d8a8a14093711ca52d?style=flat-square&logo=codacy&logoColor=white" alt="Codacy grade"></a>
<a href="https://bitbucket.org/GameServerManagers/linuxgsm"><img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/GameServerManagers/LinuxGSM/git-sync.yml?color=0052CC&logo=bitbucket&style=flat-square"></a>
<a href="https://linuxgsm.com/discord"><img alt="Discord" src="https://img.shields.io/discord/127498813903601664?color=5865F2&label=%20&logo=discord&logoColor=ffffff&style=flat-square"></a>
<a href="https://developer.valvesoftware.com/wiki/SteamCMD"><img src="https://img.shields.io/badge/SteamCMD-000000?style=flat-square&amp;logo=Steam&amp;logoColor=white" alt="SteamCMD"></a>
<a href="https://github.com/GameServerManagers/LinuxGSM/blob/master/LICENSE.md"><img src="https://img.shields.io/github/license/gameservermanagers/LinuxGSM?style=flat-square" alt="MIT License"></a>
</p>
[LinuxGSM](https://linuxgsm.com) is the command-line tool for quick, simple deployment and management of Linux dedicated game servers.
@ -17,21 +17,21 @@ Traditionally game servers are not easy to manage yourself. Admins often have to
100+ game servers supported
- :truck: Installer
- :mag: Monitor
- :phone: Alerts
- :cloud: Updater
- :blue_book: Server Details
- :floppy_disk: Backup
- :computer: Console
- :truck: Installer
- :mag: Monitor
- :phone: Alerts
- :cloud: Updater
- :blue_book: Server Details
- :floppy_disk: Backup
- :computer: Console
## :penguin: Compatibility
LinuxGSM will run on popular distros as long as the minimum requirements are met.
- Ubuntu
- Debian
- CentOS
- Ubuntu
- Debian
- CentOS
Other distros are likely to work but are not fully tested.

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

@ -9,7 +9,7 @@
#### Game Server Settings ####
# https://community.bistudio.com/wiki/Arma_Reforger:Server_Hosting
# MaxFPS to limit the used Server resouces
# MaxFPS to limit the used Server resources
maxfps="60"
# Profile Name

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

@ -8,7 +8,7 @@
#### Game Server Settings ####
## Pre-defined Paramters | https://docs.linuxgsm.com/configuration/start-parameters#predefined-parameters
## Pre-defined Parameters | https://docs.linuxgsm.com/configuration/start-parameters#predefined-parameters
worldname="MyWorld"
## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters

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

@ -19,7 +19,7 @@ httppassword="CHANGE_ME"
httpport="8080"
mods=""
serverpassword=""
# Add the following line to the parms if you want a private server. Ensuring
# Add the following line to the params if you want a private server. Ensuring
# that the password variable above is not left empty.
# -password \"${serverpassword}\"

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

@ -20,7 +20,7 @@ httppassword="CHANGE_ME"
httpport="8080"
modserverport="27031"
serverpassword=""
# Add the following line to the parms if you want a private server. Ensuring
# Add the following line to the params if you want a private server. Ensuring
# that the password variable above is not left empty.
# -password '${serverpassword}'

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

@ -11,7 +11,7 @@
## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters
servername="LinuxGSM"
# For community servers (serverlist) you need to change these settings (publicip & publicport) in the gameserver config file aswell
# For community servers (serverlist) you need to change these settings (publicip & publicport) in the gameserver config file as well
port="8211"
steamport="27015"

2
lgsm/data/debian-13.csv

@ -100,7 +100,7 @@ rw,openjdk-25-jre
samp
sb
sbots
scpsl,mono-complete
scpsl,mono-complete,libicu76
scpslsm,mono-complete
sdtd,telnet,expect,libxml2-utils
sf

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

2
lgsm/data/name-left.csv

@ -105,4 +105,4 @@ wonderful
xenodochial
youthful
zealous
zen
zen

1 admiring
105 xenodochial
106 youthful
107 zealous
108 zen

2
lgsm/data/name-right.csv

@ -234,4 +234,4 @@ wright
wu
yalow
yonath
zhukovsky
zhukovsky

1 albattani
234 wu
235 yalow
236 yonath
237 zhukovsky

18
lgsm/modules/README.md

@ -6,12 +6,12 @@ These modules are scripts that are called upon by the primary script linuxgsm.sh
Modules have been named to give an idea of what the function does.
- core: Essential modules that will always run first.
- command: Primary command function.
- check: Runs checks that will either halt on or fix an issue.
- dev: development modules.
- fix: Applies a game server specific fix.
- info: retrieves information from a source such as config file or the OS.
- install: modules related to the installer.
- monitor: modules related to monitor.
- update: modules that update the game server.
- core: Essential modules that will always run first.
- command: Primary command function.
- check: Runs checks that will either halt on or fix an issue.
- dev: development modules.
- fix: Applies a game server specific fix.
- info: retrieves information from a source such as config file or the OS.
- install: modules related to the installer.
- monitor: modules related to monitor.
- update: modules that update the game server.

61
lgsm/modules/alert.sh

@ -10,13 +10,9 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Generates alert log of the details at the time of the alert.
# Used with email alerts.
fn_alert_log() {
info_distro.sh
info_game.sh
info_messages.sh
if [ -f "${alertlog}" ]; then
rm -f "${alertlog:?}"
fi
{
fn_info_messages_head
fn_info_messages_distro
@ -24,7 +20,7 @@ fn_alert_log() {
fn_info_messages_gameserver_resource
fn_info_messages_gameserver
fn_info_logs
} | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" | tee -a "${alertlog}" >/dev/null 2>&1
} | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" | tee -a "${alertlog}" > /dev/null 2>&1
}
fn_alert_test() {
@ -97,45 +93,66 @@ fn_alert_monitor_query() {
# Update alerts
fn_alert_update() {
fn_script_log_info "Sending alert: ${selfname} has received a game server update: ${localbuild}"
# If previousbuild is set show transition, else fallback to single version.
if [ -n "${previousbuild:-}" ] && [ -n "${localbuild:-}" ]; then
fn_script_log_info "Sending alert: ${selfname} updated: ${previousbuild} -> ${localbuild}"
alertmessage="${selfname} updated: ${previousbuild} -> ${localbuild}."
else
fn_script_log_info "Sending alert: ${selfname} updated to ${localbuild}"
alertmessage="${selfname} updated to ${localbuild}."
fi
alertaction="Updated"
alertemoji="🎉"
alertsound="1"
alertmessage="${selfname} has received a game server update: ${localbuild}."
# Green
alertcolourhex="#00cd00"
alertcolourdec="52480"
}
fn_alert_update_request() {
fn_script_log_info "Sending alert: ${selfname} has requested an update and needs to be restarted."
alertaction="Updating"
# Update failure alert
fn_alert_update_failed() {
# Expect updatefailureexpected (target version) and updatefailuregot (actual localbuild) if set
local updateexpected="${updatefailureexpected:-${remotebuild:-unknown}}"
local updategot="${updatefailuregot:-${localbuild:-unknown}}"
fn_script_log_error "Sending alert: ${selfname} update failed: expected ${updateexpected}, got ${updategot}"
alertaction="Update Failed"
alertemoji="❌"
alertsound="2"
alertmessage="${selfname} update failed: expected ${updateexpected}, got ${updategot}. Manual intervention required."
# Red
alertcolourhex="#cd0000"
alertcolourdec="13434880"
}
fn_alert_update_restart_request() {
fn_script_log_info "Sending alert: ${selfname} restart requested"
alertaction="Restart Requested"
alertemoji="🎉"
alertsound="1"
alertmessage="${selfname} has requested an update and needs to be restarted."
alertmessage="${selfname} has requested a restart for an update to be applied. Restarting now."
# Blue
alertcolourhex="#1e90ff"
alertcolourdec="2003199"
}
fn_alert_check_update() {
fn_script_log_info "Sending alert: ${gamename} update available: ${remotebuildversion}"
alertaction="Update available"
fn_script_log_info "Sending alert: ${gamename} update available: ${localbuild} -> ${remotebuild}"
alertaction="Update Available"
alertemoji="🎉"
alertsound="1"
alertmessage="${gamename} update available: ${remotebuildversion}"
alertmessage="${gamename} update available: ${localbuild} -> ${remotebuild}"
# Blue
alertcolourhex="#1e90ff"
alertcolourdec="2003199"
}
fn_alert_update_linuxgsm() {
fn_script_log_info "Sending alert: ${selfname} has received an LinuxGSM update"
fn_script_log_info "Sending alert: ${selfname} has received a LinuxGSM update"
alertaction="Updated"
alertemoji="🎉"
alertsound="1"
alertbody="${gamename} update available"
alertmessage="${selfname} has received an LinuxGSM update and been restarted."
alertmessage="${selfname} has received a LinuxGSM update and been restarted."
# Green
alertcolourhex="#00cd00"
alertcolourdec="52480"
@ -197,8 +214,9 @@ fn_alert_info() {
alertcolourdec="2003199"
}
# Images
alerticon="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/gameicons/${shortname}-icon.png"
info_distro.sh
info_game.sh
info_messages.sh
if [ "${alert}" == "permissions" ]; then
fn_alert_permissions
@ -210,8 +228,10 @@ elif [ "${alert}" == "test" ]; then
fn_alert_test
elif [ "${alert}" == "update" ]; then
fn_alert_update
elif [ "${alert}" == "update-request" ]; then
fn_alert_update_request
elif [ "${alert}" == "update-failed" ]; then
fn_alert_update_failed
elif [ "${alert}" == "update-restart-request" ]; then
fn_alert_update_restart_request
elif [ "${alert}" == "check-update" ]; then
fn_alert_check_update
elif [ "${alert}" == "config" ]; then
@ -237,6 +257,7 @@ else
fi
alerttitle="${alertemoji} ${alertaction} - ${servername} ${alertemoji}"
alerticon="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/gameicons/${shortname}-icon.png"
# Generate alert log.
fn_alert_log

21
lgsm/modules/alert_discord.sh

@ -43,39 +43,38 @@ json=$(
"inline": true
},
{
"name": "Server Time",
"value": "$(date)",
"name": "Server IP",
"value": "\`${alertip}:${port}\`",
"inline": true
},
{
"name": "More info",
"value": "${alerturl}",
"name": "Server Time",
"value": "$(date)",
"inline": true
}
EOF
)
if [ -n "${querytype}" ]; then
if [ -n "${alerturl}" ]; then
json+=$(
cat << EOF
,
{
"name": "Is my Game Server Online?",
"value": "https://ismygameserver.online/${imgsoquerytype}/${alertip}:${queryport}",
"name": "More info",
"value": "${alerturl}",
"inline": true
}
EOF
)
fi
if [ -n "${alerturl}" ]; then
if [ -n "${querytype}" ]; then
json+=$(
cat << EOF
,
{
"name": "More info",
"value": "${alerturl}",
"inline": true
"name": "Is my Game Server Online?",
"value": "https://ismygameserver.online/${imgsoquerytype}/${alertip}:${queryport}"
}
EOF
)

0
lgsm/modules/alert_email.sh

2
lgsm/modules/alert_gotify.sh

@ -11,7 +11,7 @@ json=$(
cat << EOF
{
"title": "${alerttitle}",
"message": "Server Name\n${servername}\n\nInformation\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\n
"message": "Server Name\n${servername}\n\nInformation\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\n
EOF
)

2
lgsm/modules/alert_ifttt.sh

@ -12,7 +12,7 @@ json=$(
{
"value1": "${selfname}",
"value2": "${alerttitle}",
"value3": "Server Name\n${servername}\n\nInformation\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\n
"value3": "Server Name\n${servername}\n\nInformation\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\n
EOF
)

26
lgsm/modules/alert_ntfy.sh

@ -35,23 +35,31 @@ else
tags="${alertemoji}"
fi
# Construct the message body
message="Server Name: ${servername}
Information: ${alertmessage}
Game: ${gamename}
Server IP: ${alertip}:${port}
Hostname: ${HOSTNAME}
Server Time: $(date)"
# Construct the message body (keep formatting consistent with other plain-text alerts)
message="Server Name
${servername}
Information
${alertmessage}
Game
${gamename}
Server IP
${alertip}:${port}
Server Time
$(date)"
# Add optional links if available
if [ -n "${querytype}" ]; then
message+="\nIs my Game Server Online?: https://ismygameserver.online/${imgsoquerytype}/${alertip}:${queryport}"
message+="\n\nIs my Game Server Online?\nhttps://ismygameserver.online/${imgsoquerytype}/${alertip}:${queryport}"
fi
# Use alerturl for the click action if available
clickurl=""
if [ -n "${alerturl}" ]; then
message+="\nMore info: ${alerturl}"
message+="\n\nMore info\n${alerturl}"
clickurl="${alerturl}"
fi

2
lgsm/modules/alert_pushbullet.sh

@ -13,7 +13,7 @@ json=$(
"channel_tag": "${channeltag}",
"type": "note",
"title": "${alerttitle}",
"body": "Server Name\n${servername}\n\nInformation\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\n
"body": "Server Name\n${servername}\n\nInformation\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\n
EOF
)

4
lgsm/modules/alert_pushover.sh

@ -22,7 +22,7 @@ else
alertpriority="0"
fi
message=" <b>Server name</b><br>${servername}<br><br><b>Information</b><br>${alertmessage}<br><br><b>Game</b><br>${gamename}<br><br><b>Server IP</b><br>${alertip}:${port}<br><br><b>Hostname</b><br>${HOSTNAME}<br><br>"
message=" <b>Server Name</b><br>${servername}<br><br><b>Information</b><br>${alertmessage}<br><br><b>Game</b><br>${gamename}<br><br><b>Server IP</b><br>${alertip}:${port}<br><br>"
if [ -n "${querytype}" ]; then
message+="<b>Is my Game Server Online?</b><br><a href='https://ismygameserver.online/${imgsoquerytype}/${alertip}:${queryport}'>Check here</a><br><br>"
@ -32,7 +32,7 @@ if [ -n "${alerturl}" ]; then
message+="<b>More info</b><br><a href='${alerturl}'>${alerturl}</a><br><br>"
fi
message+="Server Time<br>$(date)"
message+="<b>Server Time</b><br>$(date)"
pushoversend=$(curl --connect-timeout 3 -sS \
-F token="${pushovertoken}" \

66
lgsm/modules/alert_rocketchat.sh

@ -40,38 +40,20 @@ json=$(
{
"short": false,
"title": "Server IP",
"value": "${alertip}:${port}"
},
{
"short": false,
"title": "Hostname",
"value": "${HOSTNAME}"
},
{
"short": false,
"title": "More info",
"value": "${alerturl}"
},
{
"short": false,
"title": "Server Time",
"value": "$(date)"
"value": "\`${alertip}:${port}\`"
}
]
}
]
}
EOF
)
if [ -n "${querytype}" ]; then
json+=$(
cat << EOF
,
{
"short": false,
"title": "Is my Game Server Online?",
"value": "<https://ismygameserver.online/${imgsoquerytype}/${alertip}:${queryport}|Check here>"
},
}
EOF
)
fi
@ -79,55 +61,19 @@ fi
if [ -n "${alerturl}" ]; then
json+=$(
cat << EOF
,
{
"short": false,
"title": "More info",
"value": "${alerturl}"
},
}
EOF
)
fi
json+=$(
cat << EOF
{
"alias": "LinuxGSM",
"text": "*${alerttitle}*",
"attachments": [
{
"title": "",
"color": "${alertcolourhex}",
"author_name": "LinuxGSM Alert",
"author_link": "https://linuxgsm.com",
"author_icon": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg",
"thumb_url": "${alerticon}",
"text": "",
"fields": [
{
"short": false,
"title": "Server Name",
"value": "${servername}"
},
{
"short": false,
"title": "Information",
"value": "${alertmessage}"
},
{
"short": false,
"title": "Game",
"value": "${gamename}"
},
{
"short": false,
"title": "Server IP",
"value": "${alertip}:${port}"
},
{
"short": false,
"title": "Hostname",
"value": "${HOSTNAME}"
},
,
{
"short": false,
"title": "Server Time",

96
lgsm/modules/alert_slack.sh

@ -50,10 +50,6 @@ json=$(
"type": "mrkdwn",
"text": "*Server IP*\n\`${alertip}:${port}\`"
},
{
"type": "mrkdwn",
"text": "*Hostname*\n${HOSTNAME}"
},
{
"type": "mrkdwn",
"text": "*Server Time*\n$(date)"
@ -62,41 +58,22 @@ json=$(
"accessory": {
"type": "image",
"image_url": "${alerticon}",
"alt_text": "cute cat"
"alt_text": "LinuxGSM game icon"
}
},
{
"type": "context",
"elements": [
{
"type": "image",
"image_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg",
"alt_text": "LinuxGSM icon"
},
{
"type": "plain_text",
"text": "Sent by LinuxGSM ${version}",
"emoji": true
}
]
}
]
}
]
}
EOF
)
if [ -n "${querytype}" ]; then
json+=$(
cat << EOF
,
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Is my Game Server Online?*\n<https://ismygameserver.online/${imgsoquerytype}/${alertip}:${queryport}|Check here>"
}
},
}
EOF
)
fi
@ -104,82 +81,21 @@ fi
if [ -n "${alerturl}" ]; then
json+=$(
cat << EOF
,
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*More info*\n<${alerturl}|${alerturl}>"
}
},
}
EOF
)
fi
json+=$(
cat << EOF
{
"attachments": [
{
"color": "${alertcolourhex}",
"blocks": [
{
"type": "header",
"text": {
"type": "mrkdwn",
"text": "${alerttitle}",
"emoji": true
}
},
{
"type": "divider"
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Server Name*\n${servername}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Information*\n${alertmessage}"
}
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "*Game*\n${gamename}"
},
{
"type": "mrkdwn",
"text": "*Server IP*\n\`${alertip}:${port}\`"
},
{
"type": "mrkdwn",
"text": "*Hostname*\n${HOSTNAME}"
},
{
"type": "mrkdwn",
"text": "*Server Time*\n$(date)"
}
],
"accessory": {
"type": "image",
"image_url": "${alerticon}",
"alt_text": "cute cat"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Server Time*\n${alertmessage}"
}
},
,
{
"type": "context",
"elements": [

10
lgsm/modules/alert_telegram.sh

@ -14,7 +14,7 @@ json=$(
"message_thread_id": "${telegramthreadid}",
"parse_mode": "HTML",
"disable_notification": "${telegramdisablenotification}",
"text": "<b>${alerttitle}</b>\n\n<b>Server name</b>\n${servername}\n\n<b>Information</b>\n${alertmessage}\n\n<b>Game</b>\n${gamename}\n\n<b>Server IP</b>\n${alertip}:${port}\n\n<b>Hostname</b>\n${HOSTNAME}\n\n
"text": "<b>${alerttitle}</b>\n\n<b>Server Name</b>\n${servername}\n\n<b>Information</b>\n${alertmessage}\n\n<b>Game</b>\n${gamename}\n\n<b>Server IP</b>\n${alertip}:${port}\n\n
EOF
)
@ -43,7 +43,13 @@ EOF
)
fn_print_dots "Sending Telegram alert"
telegramsend=$(curl --connect-timeout 3 -sSL -H "Content-Type: application/json" -X POST -d "$(echo -n "${json}" | jq -c .)" ${curlcustomstring} "https://${telegramapi}/bot${telegramtoken}/sendMessage" | grep "error_code")
curlcustomargs=()
if [ -n "${curlcustomstring}" ]; then
read -r -a curlcustomargs <<< "${curlcustomstring}"
fi
telegramsend=$(curl --connect-timeout 3 -sSL -H "Content-Type: application/json" -X POST -d "$(echo -n "${json}" | jq -c .)" "${curlcustomargs[@]}" "https://${telegramapi}/bot${telegramtoken}/sendMessage" | grep "error_code")
if [ -n "${telegramsend}" ]; then
fn_print_fail_nl "Sending Telegram alert: ${telegramsend}"

0
lgsm/modules/check.sh

0
lgsm/modules/check_config.sh

6
lgsm/modules/check_deps.sh

@ -75,11 +75,11 @@ fn_install_mono_repo() {
# Run the mono repo install.
eval "${cmd}"
monorepoexitcode=$?
# Did Mono repo install correctly?
if [ "${monoautoinstall}" != "1" ]; then
exitcode=$?
if [ "${exitcode}" -ne 0 ]; then
if [ "${monorepoexitcode}" -ne 0 ]; then
fn_print_failure_nl "Unable to install Mono repository."
fn_script_log_fail "Unable to install Mono repository."
else
@ -234,7 +234,7 @@ fn_install_missing_deps() {
}
fn_check_loop() {
# Loop though required depenencies checking if they are installed.
# Loop though required dependencies checking if they are installed.
for deptocheck in "${array_deps_required[@]}"; do
fn_deps_detector
done

0
lgsm/modules/check_executable.sh

0
lgsm/modules/check_gamedig.sh

2
lgsm/modules/check_glibc.sh

@ -17,7 +17,7 @@ elif [ -z "${glibc}" ]; then
fn_print_error_nl "Checking glibc: requirement unknown"
fn_script_log_error "Checking glibc: requirement unknown"
fn_sleep_time_5
elif [ "$(printf '%s\n'${glibc}'\n' "${glibcversion}" | sort -V | head -n 1)" != "${glibc}" ]; then
elif [ "$(printf '%s\n' "${glibc}" "${glibcversion}" | sort -V | head -n 1)" != "${glibc}" ]; then
fn_print_dots "Checking glibc"
fn_print_error_nl "Checking glibc: requirements not met"
fn_script_log_error "Checking glibc: requirements not met"

0
lgsm/modules/check_ip.sh

1
lgsm/modules/check_last_update.sh

@ -11,6 +11,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
if [ -f "${lockdir}/${selfname}-last-started.lock" ]; then
laststart=$(cat "${lockdir}/${selfname}-last-started.lock")
fi
if [ -f "${lockdir}/last-updated.lock" ]; then
lastupdate=$(cat "${lockdir}/last-updated.lock")
fi

0
lgsm/modules/check_logs.sh

2
lgsm/modules/check_permissions.sh

@ -249,7 +249,7 @@ fn_sys_perm_error_process() {
fi
}
## Run permisions checks when not root.
## Run permissions checks when not root.
if [ "$(whoami)" != "root" ]; then
fn_check_ownership
fn_check_permissions

0
lgsm/modules/check_root.sh

0
lgsm/modules/check_status.sh

0
lgsm/modules/check_steamcmd.sh

0
lgsm/modules/check_system_dir.sh

2
lgsm/modules/check_system_requirements.sh

@ -71,7 +71,7 @@ fi
if [ "${ramrequirementgb}" ]; then
if (($(echo "${physmemtotalgb} < ${ramrequirementgb}" | bc -l))); then
fn_print_dots "Checking RAM"
fn_print_warn_nl "Checking RAM: Minumum RAM requirements not met"
fn_print_warn_nl "Checking RAM: Minimum RAM requirements not met"
fn_print_nl "* ${ramrequirementgb}G is required, but only ${physmemtotal} is available."
fn_print_nl "* ${gamename} server may fail to run or experience poor performance."
fn_sleep_time_5

0
lgsm/modules/check_tmuxception.sh

0
lgsm/modules/check_version.sh

0
lgsm/modules/command_backup.sh

0
lgsm/modules/command_check_update.sh

0
lgsm/modules/command_console.sh

2
lgsm/modules/command_debug.sh

@ -49,7 +49,7 @@ if [ -n "${glibc}" ]; then
:
elif [ -z "${glibc}" ]; then
echo -e "${lightblue}glibc required:\t${red}UNKNOWN${default}"
elif [ "$(printf '%s\n'${glibc}'\n' ${glibcversion} | sort -V | head -n 1)" != "${glibc}" ]; then
elif [ "$(printf '%s\n' "${glibc}" "${glibcversion}" | sort -V | head -n 1)" != "${glibc}" ]; then
echo -e "${lightblue}glibc required:\t${red}${glibc} ${default}(${red}distro glibc ${glibcversion} too old${default})"
else
echo -e "${lightblue}glibc required:\t${green}${glibc}${default}"

2
lgsm/modules/command_details.sh

@ -29,7 +29,7 @@ fn_info_messages_gameserver_resource
fn_info_messages_gameserver
fn_info_messages_script
fn_info_messages_backup
# Some game servers do not have parms.
# Some game servers do not have params.
if [ "${shortname}" != "jc2" ] && [ "${shortname}" != "dst" ] && [ "${shortname}" != "pz" ] && [ "${engine}" != "renderware" ]; then
fn_info_messages_commandlineparms
fi

0
lgsm/modules/command_dev_clear_modules.sh

0
lgsm/modules/command_dev_debug.sh

0
lgsm/modules/command_dev_detect_deps.sh

2
lgsm/modules/command_dev_detect_glibc.sh

@ -63,7 +63,7 @@ for glibc_check_var in "${glibc_check_dir_array[@]}"; do
cat "${tmpdir}/detect_glibc_${glibc_check_var}.tmp" | sort | uniq | sort -r --version-sort | head -1 | tee -a "${tmpdir}/detect_glibc_highest.tmp"
echo -e ""
echo -e "Files requiring GLIBC"
echo -e "Highest verion required: filename"
echo -e "Highest version required: filename"
cat "${tmpdir}/detect_glibc_files_${glibc_check_var}.tmp"
echo -e ""
echo -e "All required GLIBC versions"

0
lgsm/modules/command_dev_detect_ldd.sh

0
lgsm/modules/command_dev_parse_distro_details.sh

0
lgsm/modules/command_dev_parse_game_details.sh

8
lgsm/modules/command_dev_query_raw.sh

@ -249,9 +249,9 @@ echo -e "${bold}${lightyellow}Query Port (${queryport}) - TCP Output${default}"
fn_messages_separator
echo -e ""
for queryip in "${queryips[@]}"; do
echo -e "${italic}bash -c 'exec 3<> /dev/tcp/'${queryip}'/'${queryport}''${default}"
echo -e "${italic}bash -c 'exec 3<> /dev/tcp/'\"${queryip}\"'/'\"${queryport}\"''${default}"
echo -e ""
timeout 3 bash -c 'exec 3<> /dev/tcp/'${queryip}'/'${queryport}''
timeout 3 bash -c 'exec 3<> /dev/tcp/'"${queryip}"'/'"${queryport}"''
querystatus="$?"
echo -e ""
if [ "${querystatus}" == "0" ]; then
@ -268,9 +268,9 @@ echo -e "${lightgreen}TCP Raw Output${default}"
fn_messages_separator
echo -e ""
for queryip in "${queryips[@]}"; do
echo -e "${italic}bash -c 'exec 3<> /dev/tcp/'${queryip}'/'${port}''${default}"
echo -e "${italic}bash -c 'exec 3<> /dev/tcp/'\"${queryip}\"'/'\"${port}\"''${default}"
echo -e ""
timeout 3 bash -c 'exec 3<> /dev/tcp/'${queryip}'/'${port}''
timeout 3 bash -c 'exec 3<> /dev/tcp/'"${queryip}"'/'"${port}"''
querystatus="$?"
echo -e ""
if [ "${querystatus}" == "0" ]; then

0
lgsm/modules/command_dev_ui.sh

2
lgsm/modules/command_fastdl.sh

@ -219,7 +219,7 @@ fn_fastdl_preview() {
core_exit.sh
fi
if [ "${engine}" == "source" ]; then
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)"

0
lgsm/modules/command_install.sh

0
lgsm/modules/command_install_resources_mta.sh

23
lgsm/modules/command_mods_install.sh

@ -47,7 +47,7 @@ while [ "${compatiblemodslistindex}" -lt "${#compatiblemodslist[@]}" ]; do
echo -e "${displayedmodname} - ${displayedmoddescription} - ${displayedmodsite}"
echo -e " * ${cyan}${displayedmodcommand}${default}"
# Increment index from the amount of values we just displayed.
let "compatiblemodslistindex+=4"
((compatiblemodslistindex += 4))
((totalmodsavailable++))
done
@ -61,16 +61,29 @@ fn_script_log_info "${totalmodsavailable} addons/mods are available for install"
## User selects a mod.
echo -e ""
while [[ ! " ${availablemodscommands[@]} " =~ " ${usermodselect} " ]]; do
while :; do
echo -en "Enter an ${cyan}addon/mod${default} to ${green}install${default} (or exit to abort): "
read -r usermodselect
# Exit if user says exit or abort.
if [ "${usermodselect}" == "exit" ] || [ "${usermodselect}" == "abort" ]; then
core_exit.sh
# Supplementary output upon invalid user input.
elif [[ ! " ${availablemodscommands[@]} " =~ " ${usermodselect} " ]]; then
fn_print_error2_nl "${usermodselect} is not a valid addon/mod."
fi
validselection=0
for availablemodcommand in "${availablemodscommands[@]}"; do
if [ "${availablemodcommand}" == "${usermodselect}" ]; then
validselection=1
break
fi
done
if [ "${validselection}" -eq 1 ]; then
break
fi
# Supplementary output upon invalid user input.
fn_print_error2_nl "${usermodselect} is not a valid addon/mod."
done
# Get mod info.
currentmod="${usermodselect}"

21
lgsm/modules/command_mods_remove.sh

@ -32,16 +32,29 @@ done
echo -e ""
# Keep prompting as long as the user input doesn't correspond to an available mod.
while [[ ! " ${installedmodslist[@]} " =~ " ${usermodselect} " ]]; do
while :; do
echo -en "Enter an ${cyan}addon/mod${default} to ${red}remove${default} (or exit to abort): "
read -r usermodselect
# Exit if user says exit or abort.
if [ "${usermodselect}" == "exit" ] || [ "${usermodselect}" == "abort" ]; then
core_exit.sh
# Supplementary output upon invalid user input.
elif [[ ! " ${availablemodscommands[@]} " =~ " ${usermodselect} " ]]; then
fn_print_error2_nl "${usermodselect} is not a valid addon/mod."
fi
validselection=0
for installedmodcommand in "${installedmodslist[@]}"; do
if [ "${installedmodcommand}" == "${usermodselect}" ]; then
validselection=1
break
fi
done
if [ "${validselection}" -eq 1 ]; then
break
fi
# Supplementary output upon invalid user input.
fn_print_error2_nl "${usermodselect} is not a valid addon/mod."
done
fn_print_warning_nl "You are about to remove ${cyan}${usermodselect}${default}."

0
lgsm/modules/command_mods_update.sh

4
lgsm/modules/command_monitor.sh

@ -164,8 +164,8 @@ fn_monitor_check_update_source() {
fn_script_log_info "Checking update: CHECKING"
fn_print_ok "Checking update"
fn_print_ok_eol_nl
fn_script_log_info "Checking update: ${selfname} has requested an update and needs to be restarted"
alert="update-request"
fn_script_log_info "Checking update: ${selfname} has requested a restart for an update to be applied"
alert="update-restart-request"
alert.sh
command_restart.sh
core_exit.sh

4
lgsm/modules/command_postdetails.sh

@ -46,7 +46,7 @@ else
fn_info_messages_gameserver
fn_info_messages_script
fn_info_messages_backup
# Some game servers do not have parms.
# Some game servers do not have params.
if [ "${shortname}" != "jc2" ] && [ "${shortname}" != "jc3" ] && [ "${shortname}" != "dst" ] && [ "${shortname}" != "pz" ] && [ "${engine}" != "renderware" ]; then
fn_info_messages_commandlineparms
fi
@ -59,7 +59,7 @@ fi
fn_print_dots "termbin.com"
link=$(cat "${postdetailslog}" | {
nc -w 3 termbin.com 9999
nc -w 10 termbin.com 9999
echo $? > /tmp/nc_exit_status
} | tr -d '\n\0')
nc_exit_status=$(cat /tmp/nc_exit_status)

0
lgsm/modules/command_restart.sh

0
lgsm/modules/command_send.sh

4
lgsm/modules/command_skeleton.sh

@ -3,7 +3,7 @@
# Author: Daniel Gibbs
# Contributors: https://linuxgsm.com/contrib
# Website: https://linuxgsm.com
# Description: Creates an copy of a game servers directorys.
# Description: Creates an copy of a game servers directories.
commandname="SKELETON"
commandaction="Skeleton"
@ -13,7 +13,7 @@ fn_firstcommand_set
fn_print_dots "Creating skeleton directory"
check.sh
# Find all directorys and create them in the skel directory
# Find all directories and create them in the skel directory
find "${rootdir}" -type d -not \( -path ./skel -prune \) | cpio -pdvm skel 2> /dev/null
exitcode=$?
if [ "${exitcode}" -ne 0 ]; then

0
lgsm/modules/command_start.sh

4
lgsm/modules/command_stop.sh

@ -16,7 +16,7 @@ fn_stop_graceful_ctrlc() {
fn_script_log_info "Graceful: CTRL+c"
# Sends CTRL+c.
tmux -L "${socketname}" send-keys -t "${sessionname}" C-c > /dev/null 2>&1
# Waits up to 30 seconds giving the server time to shutdown gracefuly.
# Waits up to 30 seconds giving the server time to shutdown gracefully.
for seconds in {1..30}; do
check_status.sh
if [ "${status}" == "0" ]; then
@ -293,7 +293,7 @@ fn_stop_graceful_avorion() {
fn_sleep_time_5
# Sends /quit.
tmux -L "${socketname}" send-keys -t "${sessionname}" /stop ENTER > /dev/null 2>&1
# Waits up to 30 seconds giving the server time to shutdown gracefuly.
# Waits up to 30 seconds giving the server time to shutdown gracefully.
for seconds in {1..30}; do
check_status.sh
if [ "${status}" == "0" ]; then

0
lgsm/modules/command_test_alert.sh

0
lgsm/modules/command_ts3_server_pass.sh

0
lgsm/modules/command_update.sh

39
lgsm/modules/command_update_linuxgsm.sh

@ -16,8 +16,9 @@ info_distro.sh
info_game.sh
# Prevent github from using a cached version of the file if dev-debug is enabled.
nocache=()
if [ -f "${rootdir}/.dev-debug" ]; then
nocache="-H \"Cache-Control: no-cache\" -H \"Pragma: no-cache\""
nocache=(-H "Cache-Control: no-cache" -H "Pragma: no-cache")
fi
fn_script_log_info "Updating LinuxGSM"
@ -26,10 +27,10 @@ fn_print_dots "Selecting repo"
fn_script_log_info "Selecting repo"
# Select remotereponame
curl ${nocache} --connect-timeout 3 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh" 1> /dev/null
curl "${nocache[@]}" --connect-timeout 3 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh" 1> /dev/null
exitcode=$?
if [ "${exitcode}" -ne "0" ]; then
curl ${nocache} --connect-timeout 3 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh" 1> /dev/null
curl "${nocache[@]}" --connect-timeout 3 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh" 1> /dev/null
exitcode=$?
if [ "${exitcode}" -ne "0" ]; then
fn_print_fail_nl "Selecting repo: Unable to to access GitHub or Bitbucket repositories"
@ -47,9 +48,9 @@ fi
# Check linuxsm.sh
echo -en "checking ${remotereponame} script [ ${italic}linuxgsm.sh${default} ]\c"
if [ "${remotereponame}" == "GitHub" ]; then
curl ${nocache} --connect-timeout 3 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh" 1> /dev/null
curl "${nocache[@]}" --connect-timeout 3 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh" 1> /dev/null
else
curl ${nocache} --connect-timeout 3 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh" 1> /dev/null
curl "${nocache[@]}" --connect-timeout 3 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh" 1> /dev/null
fi
exitcode=$?
if [ "${exitcode}" -ne 0 ]; then
@ -60,9 +61,9 @@ if [ "${exitcode}" -ne 0 ]; then
fi
if [ "${remotereponame}" == "GitHub" ]; then
tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(curl ${nocache} --connect-timeout 3 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh"))
tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(curl "${nocache[@]}" --connect-timeout 3 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh"))
else
tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(curl ${nocache} --connect-timeout 3 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh"))
tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(curl "${nocache[@]}" --connect-timeout 3 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh"))
fi
if [ "${tmp_script_diff}" != "" ]; then
@ -130,9 +131,9 @@ fi
echo -en "checking ${remotereponame} config [ ${italic}_default.cfg${default} ]\c"
fn_script_log_info "Checking ${remotereponame} config _default.cfg"
if [ "${remotereponame}" == "GitHub" ]; then
curl ${nocache} --connect-timeout 3 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg" 1> /dev/null
curl "${nocache[@]}" --connect-timeout 3 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg" 1> /dev/null
else
curl ${nocache} --connect-timeout 3 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg" 1> /dev/null
curl "${nocache[@]}" --connect-timeout 3 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg" 1> /dev/null
fi
exitcode=$?
if [ "${exitcode}" -ne 0 ]; then
@ -143,9 +144,9 @@ if [ "${exitcode}" -ne 0 ]; then
fi
if [ "${remotereponame}" == "GitHub" ]; then
config_file_diff=$(diff "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" <(curl ${nocache} --connect-timeout 3 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg"))
config_file_diff=$(diff "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" <(curl "${nocache[@]}" --connect-timeout 3 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg"))
else
config_file_diff=$(diff "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" <(curl ${nocache} --connect-timeout 3 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg"))
config_file_diff=$(diff "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" <(curl "${nocache[@]}" --connect-timeout 3 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg"))
fi
if [ "${config_file_diff}" != "" ]; then
@ -165,9 +166,9 @@ if [ -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then
echo -en "checking ${remotereponame} config [ ${italic}${distroid}-${distroversioncsv}.csv${default} ]\c"
fn_script_log_info "Checking ${remotereponame} ${distroid}-${distroversioncsv}.csv"
if [ "${remotereponame}" == "GitHub" ]; then
curl ${nocache} --connect-timeout 3 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv" 1> /dev/null
curl "${nocache[@]}" --connect-timeout 3 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv" 1> /dev/null
else
curl ${nocache} --connect-timeout 3 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv" 1> /dev/null
curl "${nocache[@]}" --connect-timeout 3 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv" 1> /dev/null
fi
exitcode=$?
if [ "${exitcode}" -ne 0 ]; then
@ -178,9 +179,9 @@ if [ -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then
fi
if [ "${remotereponame}" == "GitHub" ]; then
config_file_diff=$(diff "${datadir}/${distroid}-${distroversioncsv}.csv" <(curl ${nocache} --connect-timeout 3 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv"))
config_file_diff=$(diff "${datadir}/${distroid}-${distroversioncsv}.csv" <(curl "${nocache[@]}" --connect-timeout 3 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv"))
else
config_file_diff=$(diff "${datadir}/${distroid}-${distroversioncsv}.csv" <(curl ${nocache} --connect-timeout 3 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv"))
config_file_diff=$(diff "${datadir}/${distroid}-${distroversioncsv}.csv" <(curl "${nocache[@]}" --connect-timeout 3 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv"))
fi
if [ "${config_file_diff}" != "" ]; then
@ -204,9 +205,9 @@ if [ -n "${modulesdir}" ]; then
echo -en "checking ${remotereponame} module [ ${italic}${modulefile}${default} ]\c"
github_file_url_dir="lgsm/modules"
if [ "${remotereponame}" == "GitHub" ]; then
curl ${nocache} --connect-timeout 3 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${modulefile}" 1> /dev/null
curl "${nocache[@]}" --connect-timeout 3 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${modulefile}" 1> /dev/null
else
curl ${nocache} --connect-timeout 3 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${modulefile}" 1> /dev/null
curl "${nocache[@]}" --connect-timeout 3 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${modulefile}" 1> /dev/null
fi
exitcode=$?
if [ "${exitcode}" -ne 0 ]; then
@ -224,9 +225,9 @@ if [ -n "${modulesdir}" ]; then
else
# compare file
if [ "${remotereponame}" == "GitHub" ]; then
module_file_diff=$(diff "${modulesdir}/${modulefile}" <(curl ${nocache} --connect-timeout 3 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${modulefile}"))
module_file_diff=$(diff "${modulesdir}/${modulefile}" <(curl "${nocache[@]}" --connect-timeout 3 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${modulefile}"))
else
module_file_diff=$(diff "${modulesdir}/${modulefile}" <(curl ${nocache} --connect-timeout 3 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${modulefile}"))
module_file_diff=$(diff "${modulesdir}/${modulefile}" <(curl "${nocache[@]}" --connect-timeout 3 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${modulefile}"))
fi
# results

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save